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.
Files changed (129) hide show
  1. package/BRAND.md +3 -3
  2. package/README.md +7 -4
  3. package/USAGE.md +49 -49
  4. package/astryx-dracula.d.ts +2 -2
  5. package/astryx-dracula.js +25 -9
  6. package/astryx-dracula.variants.d.ts +2 -2
  7. package/astryx.integration.mjs +1 -1
  8. package/icons.mjs +21 -17
  9. package/icons.tsx +69 -62
  10. package/package.json +125 -120
  11. package/shared/auth-chrome-config.ts +6 -6
  12. package/shared/auth-chrome.tsx +143 -144
  13. package/shared/auth-copy.ts +14 -14
  14. package/shared/chaptered-doc-config.ts +48 -51
  15. package/shared/chaptered-doc.tsx +267 -289
  16. package/shared/chart-hues.ts +25 -10
  17. package/shared/chart-labels.tsx +31 -30
  18. package/shared/chart-legend.tsx +55 -56
  19. package/shared/chart-panel-style.ts +3 -3
  20. package/shared/data-bar.tsx +97 -102
  21. package/shared/format-money.ts +1 -1
  22. package/shared/gallery-image.ts +6 -6
  23. package/shared/login-demo.ts +1 -1
  24. package/shared/metric-card.tsx +101 -105
  25. package/shared/metric-delta.tsx +28 -27
  26. package/shared/order-desk.tsx +205 -216
  27. package/shared/revenue-chart.tsx +145 -165
  28. package/shared/scene-castle.tsx +206 -291
  29. package/shared/scene-frame.tsx +33 -32
  30. package/shared/scene-hues.ts +17 -17
  31. package/shared/scene-tile.tsx +88 -92
  32. package/shared/settings-data.ts +119 -125
  33. package/shared/settings-rows.tsx +122 -159
  34. package/shared/sparkline.tsx +75 -88
  35. package/shared/sso-icons.tsx +10 -22
  36. package/shared/stars.tsx +16 -25
  37. package/templates/ai-chat-landing.template.mjs +5 -4
  38. package/templates/ai-chat-landing.tsx +473 -460
  39. package/templates/ai-chat.template.mjs +5 -4
  40. package/templates/ai-chat.tsx +543 -612
  41. package/templates/blank.template.mjs +5 -4
  42. package/templates/blank.tsx +18 -14
  43. package/templates/centered-hero.template.mjs +5 -4
  44. package/templates/centered-hero.tsx +55 -68
  45. package/templates/classic-gallery.template.mjs +5 -4
  46. package/templates/classic-gallery.tsx +97 -104
  47. package/templates/contact-form.template.mjs +5 -4
  48. package/templates/contact-form.tsx +247 -282
  49. package/templates/dashboard-portfolio.template.mjs +5 -4
  50. package/templates/dashboard-portfolio.tsx +717 -548
  51. package/templates/dashboard.template.mjs +5 -4
  52. package/templates/dashboard.tsx +596 -567
  53. package/templates/detail-page.template.mjs +5 -4
  54. package/templates/detail-page.tsx +546 -603
  55. package/templates/documentation-design.template.mjs +5 -4
  56. package/templates/documentation-design.tsx +231 -243
  57. package/templates/documentation-technical.template.mjs +5 -4
  58. package/templates/documentation-technical.tsx +236 -239
  59. package/templates/documentation.template.mjs +5 -4
  60. package/templates/documentation.tsx +267 -279
  61. package/templates/editor.template.mjs +5 -4
  62. package/templates/editor.tsx +844 -877
  63. package/templates/file-explorer.template.mjs +5 -4
  64. package/templates/file-explorer.tsx +566 -590
  65. package/templates/form-two-column.template.mjs +5 -4
  66. package/templates/form-two-column.tsx +195 -210
  67. package/templates/gallery-hero.template.mjs +5 -4
  68. package/templates/gallery-hero.tsx +93 -114
  69. package/templates/ide.template.mjs +5 -4
  70. package/templates/ide.tsx +407 -453
  71. package/templates/incident-console.template.mjs +5 -4
  72. package/templates/incident-console.tsx +593 -575
  73. package/templates/kanban-board.template.mjs +5 -4
  74. package/templates/kanban-board.tsx +665 -683
  75. package/templates/library.template.mjs +5 -4
  76. package/templates/library.tsx +409 -430
  77. package/templates/login-card.template.mjs +5 -4
  78. package/templates/login-card.tsx +63 -72
  79. package/templates/login-split.template.mjs +5 -4
  80. package/templates/login-split.tsx +192 -193
  81. package/templates/login-sso.template.mjs +5 -4
  82. package/templates/login-sso.tsx +257 -258
  83. package/templates/login.template.mjs +5 -4
  84. package/templates/login.tsx +53 -49
  85. package/templates/messaging-shell.template.mjs +5 -4
  86. package/templates/messaging-shell.tsx +556 -574
  87. package/templates/mixed-gallery.template.mjs +5 -4
  88. package/templates/mixed-gallery.tsx +60 -58
  89. package/templates/payment-form.template.mjs +5 -4
  90. package/templates/payment-form.tsx +882 -991
  91. package/templates/product-detail.template.mjs +5 -4
  92. package/templates/product-detail.tsx +261 -272
  93. package/templates/product-gallery.template.mjs +5 -4
  94. package/templates/product-gallery.tsx +126 -137
  95. package/templates/product-tour.template.mjs +5 -4
  96. package/templates/product-tour.tsx +741 -773
  97. package/templates/settings-dialog.template.mjs +5 -4
  98. package/templates/settings-dialog.tsx +688 -717
  99. package/templates/settings-sidebar.template.mjs +5 -4
  100. package/templates/settings-sidebar.tsx +762 -807
  101. package/templates/settings.template.mjs +5 -4
  102. package/templates/settings.tsx +289 -304
  103. package/templates/shell-nav.template.mjs +5 -4
  104. package/templates/shell-nav.tsx +212 -219
  105. package/templates/shell-side-nav.template.mjs +5 -4
  106. package/templates/shell-side-nav.tsx +135 -157
  107. package/templates/shell-top-nav.template.mjs +5 -4
  108. package/templates/shell-top-nav.tsx +182 -203
  109. package/templates/side-gallery.template.mjs +5 -4
  110. package/templates/side-gallery.tsx +85 -90
  111. package/templates/table-grouped.template.mjs +5 -4
  112. package/templates/table-grouped.tsx +1000 -1053
  113. package/templates/table-page-chart.template.mjs +5 -4
  114. package/templates/table-page-chart.tsx +400 -398
  115. package/templates/table-page-heatmap-status.template.mjs +5 -4
  116. package/templates/table-page-heatmap-status.tsx +483 -512
  117. package/templates/table-page-shoe-store-heatmap.template.mjs +5 -4
  118. package/templates/table-page-shoe-store-heatmap.tsx +748 -746
  119. package/templates/table-page.template.mjs +5 -4
  120. package/templates/table-page.tsx +396 -405
  121. package/templates/table.template.mjs +5 -4
  122. package/templates/table.tsx +92 -93
  123. package/templates/tech-report.template.mjs +5 -4
  124. package/templates/tech-report.tsx +1316 -1304
  125. package/templates/theme-showcase.template.mjs +5 -4
  126. package/templates/theme-showcase.tsx +871 -951
  127. package/theme.css +35 -77
  128. package/theme.css.d.ts +9 -0
  129. package/tokens.css +373 -380
@@ -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
- DEVICE_ROWS,
8
- INFO_TILES,
9
- LOGIN_ROWS,
10
- SOCIAL_ROWS,
11
- actionNoWrap,
12
- iconBox,
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
- label,
79
- value,
80
- action,
81
- actionKind,
82
- href,
83
- variant = 'secondary',
84
- onAction,
85
- style,
86
- hasDivider = true,
56
+ label,
57
+ value,
58
+ action,
59
+ actionKind,
60
+ href,
61
+ variant = "secondary",
62
+ onAction,
63
+ style,
64
+ hasDivider = true,
87
65
  }: InfoRow & {
88
- style?: CSSProperties;
89
- /** Draw a Divider after the row. True only at a group boundary. */
90
- hasDivider?: boolean;
66
+ style?: CSSProperties;
67
+ /** Draw a Divider after the row. True only at a group boundary. */
68
+ hasDivider?: boolean;
91
69
  }) {
92
- return (
93
- <>
94
- <HStack hAlign="between" vAlign="start" style={style}>
95
- <VStack gap={1}>
96
- <Text type="body" weight="semibold" display="block">
97
- {label}
98
- </Text>
99
- <Text type="body" color="secondary" display="block">
100
- {value}
101
- </Text>
102
- </VStack>
103
- {action &&
104
- (actionKind === 'destination' && href ? (
105
- <Link href={href} style={actionNoWrap}>
106
- {action}
107
- </Link>
108
- ) : (
109
- <Button
110
- label={action}
111
- variant={variant}
112
- size="sm"
113
- style={actionNoWrap}
114
- onClick={onAction}
115
- />
116
- ))}
117
- </HStack>
118
- {hasDivider && <Divider />}
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
- label,
125
- children,
126
- onCancel,
127
- onSave,
128
- style,
102
+ label,
103
+ children,
104
+ onCancel,
105
+ onSave,
106
+ style,
129
107
  }: {
130
- label: string;
131
- children: ReactNode;
132
- onCancel: () => void;
133
- onSave: () => void;
134
- style?: CSSProperties;
108
+ label: string;
109
+ children: ReactNode;
110
+ onCancel: () => void;
111
+ onSave: () => void;
112
+ style?: CSSProperties;
135
113
  }) {
136
- return (
137
- <VStack gap={4} style={style}>
138
- <Text type="body" weight="semibold" display="block">
139
- {label}
140
- </Text>
141
- {children}
142
- <HStack gap={2}>
143
- <Button label="Save" variant="primary" onClick={onSave} />
144
- <Button label="Cancel" variant="ghost" onClick={onCancel} />
145
- </HStack>
146
- </VStack>
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
- label,
152
- value,
153
- onEdit,
154
- style,
129
+ label,
130
+ value,
131
+ onEdit,
132
+ style,
155
133
  }: {
156
- label: string;
157
- value: string;
158
- onEdit: () => void;
159
- style?: CSSProperties;
134
+ label: string;
135
+ value: string;
136
+ onEdit: () => void;
137
+ style?: CSSProperties;
160
138
  }) {
161
- return (
162
- <HStack hAlign="between" vAlign="start" style={style}>
163
- <VStack gap={1}>
164
- <Text type="body" weight="semibold" display="block">
165
- {label}
166
- </Text>
167
- <Text type="body" color="secondary" display="block">
168
- {value}
169
- </Text>
170
- </VStack>
171
- <Button
172
- label="Edit"
173
- variant="secondary"
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
- label,
184
- value,
185
- children,
186
- isExpanded,
187
- onEdit,
188
- onCancel,
189
- onSave,
190
- style,
191
- hasDivider = true,
155
+ label,
156
+ value,
157
+ children,
158
+ isExpanded,
159
+ onEdit,
160
+ onCancel,
161
+ onSave,
162
+ style,
163
+ hasDivider = true,
192
164
  }: {
193
- label: string;
194
- value: string;
195
- children: ReactNode;
196
- isExpanded: boolean;
197
- onEdit: () => void;
198
- onCancel: () => void;
199
- onSave: () => void;
200
- style?: CSSProperties;
201
- /** Draw a Divider after the row. True only at a group boundary. */
202
- hasDivider?: boolean;
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
- return (
205
- <>
206
- {isExpanded ? (
207
- <ExpandableRowEditing
208
- label={label}
209
- onCancel={onCancel}
210
- onSave={onSave}
211
- style={style}>
212
- {children}
213
- </ExpandableRowEditing>
214
- ) : (
215
- <ExpandableRowViewing
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
  }
@@ -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 'astryx-dracula/shared/chart-hues';
5
+ import { CHART_HUES } from "astryx-dracula/shared/chart-hues";
6
6
 
7
7
  export interface SparkPoint {
8
- id: string;
9
- value: number;
8
+ id: string;
9
+ value: number;
10
10
  }
11
11
 
12
12
  interface SparklineProps {
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;
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
- data,
28
- label,
29
- positive,
30
- mode = 'max',
31
- isCompact = false,
27
+ data,
28
+ label,
29
+ positive,
30
+ mode = "max",
31
+ isCompact = false,
32
32
  }: SparklineProps) {
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
53
- viewBox={`0 0 300 ${height}`}
54
- width="100%"
55
- height={height}
56
- role="img"
57
- aria-label={label}>
58
- {data.map((point, slot) => {
59
- const barHeight = Math.max(
60
- floor,
61
- ((point.value - min) / range) * plot,
62
- );
63
- return (
64
- <rect
65
- key={point.id}
66
- x={slot * step}
67
- y={baseline - barHeight}
68
- width={barWidth}
69
- height={barHeight}
70
- rx={Math.min(2, barWidth / 2)}
71
- fill={fill}
72
- />
73
- );
74
- })}
75
- </svg>
76
- );
77
- }
78
- const max = Math.max(...data.map(point => point.value));
79
- return (
80
- <svg
81
- viewBox="0 0 300 40"
82
- width="100%"
83
- height={40}
84
- role="img"
85
- aria-label={label}>
86
- {data.map((point, day) => {
87
- const barHeight = Math.max(3, (point.value / max) * 32);
88
- return (
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
  }
@@ -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 'react';
3
+ import type { SVGProps } from "react";
4
4
 
5
5
  export const AppleIcon = (props: SVGProps<SVGSVGElement>) => (
6
- <svg
7
- viewBox="0 0 24 24"
8
- fill="currentColor"
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
- <svg
19
- viewBox="0 0 24 24"
20
- fill="currentColor"
21
- width={16}
22
- height={16}
23
- aria-hidden="true"
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 {HStack} from '@astryxdesign/core/Stack';
2
- import {Text} from '@astryxdesign/core/Text';
3
- import {Icon} from '@astryxdesign/core/Icon';
4
- import {Star} from 'lucide-react';
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
- const filled = Math.round(rating);
8
- const empty = 5 - filled;
6
+ export function StarRating({ rating, count }: { rating: number; count: number }) {
7
+ const filled = Math.round(rating);
9
8
 
10
- return (
11
- <HStack gap={1} vAlign="center">
12
- {Array.from({length: filled}, (_, i) => (
13
- <Icon key={`full-${i}`} icon={Star} size="sm" color="yellow" />
14
- ))}
15
- {/* secondary, not disabled: --color-icon-disabled #6272A4 is 2.51:1 on
16
- the card #343746, under the 3:1 non-text floor, and reads as "this
17
- control is unavailable" — but a star is a data mark, not a control.
18
- --color-icon-secondary #9AA1BC is 4.60:1, one step under the filled
19
- yellow (7.4:1), so the two halves still read as one rating. */}
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
- type: 'page',
3
- name: 'AI Chat Landing',
4
- description: 'Composer, greeting, and category toggles',
5
- category: 'marketing',
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
  };