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
@@ -7,7 +7,7 @@
7
7
  // which the chart vocabulary already uses, so the kit has one shape rather than
8
8
  // one precedent and one exception.
9
9
 
10
- export type SceneTileSize = 'lg' | 'sm';
10
+ export type SceneTileSize = "lg" | "sm";
11
11
 
12
12
  /**
13
13
  * Art-treatment hues for scene tiles. Purple-free by this module's remit.
@@ -15,35 +15,27 @@ export type SceneTileSize = 'lg' | 'sm';
15
15
  * on both dark surfaces at the disc's 0.9 opacity, including purple.
16
16
  */
17
17
  export const SCENE_HUES = {
18
- muted: 'var(--dracula-comment)',
19
- cyan: 'var(--dracula-cyan)',
20
- green: 'var(--dracula-green)',
21
- yellow: 'var(--dracula-yellow)',
22
- orange: 'var(--dracula-orange)',
23
- pink: 'var(--dracula-pink)',
24
- red: 'var(--dracula-red)',
18
+ muted: "var(--dracula-comment)",
19
+ cyan: "var(--dracula-cyan)",
20
+ green: "var(--dracula-green)",
21
+ yellow: "var(--dracula-yellow)",
22
+ orange: "var(--dracula-orange)",
23
+ pink: "var(--dracula-pink)",
24
+ red: "var(--dracula-red)",
25
25
  } as const;
26
26
 
27
27
  export type SceneHue = (typeof SCENE_HUES)[keyof typeof SCENE_HUES];
28
28
 
29
- /**
30
- * The union above constrains the KEY, not the value it resolves to. An entry
31
- * rewritten to `var(--dracula-purple)` still typechecks. `scripts/check.ts`
32
- * gates the values of this object; add the gate there if it is ever removed.
33
- * A prose rule does not stop a caller — see the remit note above.
34
- */
35
- export const SCENE_HUE_VALUES: readonly SceneHue[] = Object.values(SCENE_HUES);
36
-
37
29
  // Shared alt list for the nine-tile side/classic wall (folded into one
38
30
  // module so the two surfaces cannot drift apart again).
39
31
  export const SCENE_TILE_ALTS = [
40
- 'Moonlit ridge trail under a harvest moon',
41
- 'Late portrait in violet lamplight',
42
- 'Lamplit reading nook after midnight',
43
- 'Fog rolling over the night pines',
44
- 'Dancer caught mid-step in stage pink',
45
- 'Kitchen table set for a midnight feast',
46
- 'Castle silhouette over sleeping hills',
47
- 'Attic window glowing amber at 2am',
48
- 'Cellar shelves lined with bottled dusk',
32
+ "Moonlit ridge trail under a harvest moon",
33
+ "Late portrait in violet lamplight",
34
+ "Lamplit reading nook after midnight",
35
+ "Fog rolling over the night pines",
36
+ "Dancer caught mid-step in stage pink",
37
+ "Kitchen table set for a midnight feast",
38
+ "Castle silhouette over sleeping hills",
39
+ "Attic window glowing amber at 2am",
40
+ "Cellar shelves lined with bottled dusk",
49
41
  ] as const;
@@ -21,108 +21,96 @@
21
21
  // reached a 34px disc. The union turns that into a compile error at the call
22
22
  // site with the exact offending value named.
23
23
 
24
- import {galleryImage} from 'astryx-dracula/shared/gallery-image';
25
- import {
26
- SCENE_HUES,
27
- type SceneHue,
28
- type SceneTileSize,
29
- } from 'astryx-dracula/shared/scene-hues';
30
-
24
+ import { galleryImage } from "astryx-dracula/shared/gallery-image";
25
+ import type { SceneHue, SceneTileSize } from "astryx-dracula/shared/scene-hues";
31
26
 
32
27
  interface SceneTileProps {
33
- /**
34
- * Per-tile accent: the sm fork paints it as the moon disc (`:70`, a 34px
35
- * radius at 0.9 opacity) and as glyph dots; the lg fork paints the glyph.
36
- * One prop, three areas of very different size — the split by role is a
37
- * deliberate follow-up, not an oversight. Both areas clear 1.4.11 at the
38
- * same `SceneHue`, so the split is about which role may take which subset,
39
- * not about a second contrast axis.
40
- */
41
- hue: SceneHue;
42
- /** Accessible name for the tile art. */
43
- label: string;
44
- /** `lg` for grid thumbs, `sm` for the classic/side landscape tiles. */
45
- size?: SceneTileSize;
46
- /** Star wash for the sm landscape. Decorative, and purple-free by the same
47
- * remit as `hue`, so it takes the same union. */
48
- stars?: SceneHue;
49
- /** Positional seed so repeated sm tiles vary moon, hills, and star field.
50
- * Ignored by the lg fork (one centered glyph, no variance). */
51
- index?: number;
28
+ /**
29
+ * Per-tile accent: the sm fork paints it as the moon disc (`:70`, a 34px
30
+ * radius at 0.9 opacity) and as glyph dots; the lg fork paints the glyph.
31
+ * One prop, three areas of very different size — the split by role is a
32
+ * deliberate follow-up, not an oversight. Both areas clear 1.4.11 at the
33
+ * same `SceneHue`, so the split is about which role may take which subset,
34
+ * not about a second contrast axis.
35
+ */
36
+ hue: SceneHue;
37
+ /** Accessible name for the tile art. */
38
+ label: string;
39
+ /** `lg` for grid thumbs, `sm` for the classic/side landscape tiles. */
40
+ size?: SceneTileSize;
41
+ /** Positional seed so repeated sm tiles vary moon, hills, and star field.
42
+ * Ignored by the lg fork (one centered glyph, no variance). */
43
+ index?: number;
52
44
  }
53
45
 
54
-
55
- export function SceneTile({
56
- hue,
57
- label,
58
- size = 'lg',
59
- stars = 'var(--dracula-comment)',
60
- index = 0,
61
- }: SceneTileProps) {
62
- const moonX = 90 + ((index * 53) % 220);
63
- const moonY = 62 + ((index * 29) % 60);
64
- const hillA = 190 + ((index * 13) % 40);
65
- const hillB = 215 + ((index * 17) % 40);
66
- return (
67
- <svg
68
- viewBox="0 0 400 300"
69
- preserveAspectRatio="xMidYMid slice"
70
- style={galleryImage}
71
- role="img"
72
- aria-label={label}>
73
- <rect width="400" height="300" fill="var(--dracula-bg-light)" />
74
- {size === 'sm' && (
75
- <>
76
- {/* Stars */}
77
- <g fill={stars} opacity={0.55}>
78
- <circle cx={40 + ((index * 37) % 320)} cy={30} r={2} />
79
- <circle cx={120 + ((index * 23) % 200)} cy={52} r={1.6} />
80
- <circle cx={260 + ((index * 11) % 110)} cy={26} r={2.2} />
81
- <circle cx={330} cy={70 + ((index * 7) % 30)} r={1.6} />
82
- </g>
83
- <circle cx={moonX} cy={moonY} r={34} fill={hue} opacity={0.9} />
84
- <circle
85
- cx={moonX - 12}
86
- cy={moonY - 8}
87
- r={28}
88
- fill="var(--dracula-bg-light)"
89
- opacity={0.55}
90
- />
91
- <path
92
- d={`M0 ${hillA} Q100 ${hillA - 50} 200 ${hillA - 10} T400 ${hillA - 30} V300 H0 Z`}
93
- fill="var(--dracula-current-line)"
94
- />
95
- <path
96
- d={`M0 ${hillB} Q120 ${hillB - 40} 240 ${hillB} T400 ${hillB - 20} V300 H0 Z`}
97
- fill="var(--dracula-bg)"
98
- />
99
- </>
100
- )}
101
- {size === 'sm' ? (
102
- <g
103
- transform={`translate(${60 + ((index * 41) % 280)} ${hillB - 34})`}
104
- fill="none"
105
- stroke={hue}
106
- strokeWidth="4"
107
- strokeLinecap="round"
108
- strokeLinejoin="round">
109
- <rect x="-22" y="-22" width="44" height="44" rx={4} />
110
- <circle cx="9" cy="-9" r="2" fill={hue} stroke="none" />
111
- <path d="M-17 15 L-4 0 L5 9 L10 4 L17 12" />
112
- </g>
113
- ) : (
114
- <g
115
- transform="translate(200 150)"
116
- fill="none"
117
- stroke="var(--dracula-comment)"
118
- strokeWidth="5"
119
- strokeLinecap="round"
120
- strokeLinejoin="round">
121
- <rect x="-44" y="-44" width="88" height="88" rx="5" />
122
- <circle cx="18" cy="-18" r="2.5" fill={hue} stroke="none" />
123
- <path d="M-34 30 L-8 0 L10 18 L20 8 L34 24" />
124
- </g>
125
- )}
126
- </svg>
127
- );
46
+ export function SceneTile({ hue, label, size = "lg", index = 0 }: SceneTileProps) {
47
+ const moonX = 90 + ((index * 53) % 220);
48
+ const moonY = 62 + ((index * 29) % 60);
49
+ const hillA = 190 + ((index * 13) % 40);
50
+ const hillB = 215 + ((index * 17) % 40);
51
+ return (
52
+ <svg
53
+ viewBox="0 0 400 300"
54
+ preserveAspectRatio="xMidYMid slice"
55
+ style={galleryImage}
56
+ role="img"
57
+ aria-label={label}
58
+ >
59
+ <rect width="400" height="300" fill="var(--dracula-bg-light)" />
60
+ {size === "sm" && (
61
+ <>
62
+ {/* Stars: decorative wash, comment so purple stays reserved for tappables. */}
63
+ <g fill="var(--dracula-comment)" opacity={0.55}>
64
+ <circle cx={40 + ((index * 37) % 320)} cy={30} r={2} />
65
+ <circle cx={120 + ((index * 23) % 200)} cy={52} r={1.6} />
66
+ <circle cx={260 + ((index * 11) % 110)} cy={26} r={2.2} />
67
+ <circle cx={330} cy={70 + ((index * 7) % 30)} r={1.6} />
68
+ </g>
69
+ <circle cx={moonX} cy={moonY} r={34} fill={hue} opacity={0.9} />
70
+ <circle
71
+ cx={moonX - 12}
72
+ cy={moonY - 8}
73
+ r={28}
74
+ fill="var(--dracula-bg-light)"
75
+ opacity={0.55}
76
+ />
77
+ <path
78
+ d={`M0 ${hillA} Q100 ${hillA - 50} 200 ${hillA - 10} T400 ${hillA - 30} V300 H0 Z`}
79
+ fill="var(--dracula-current-line)"
80
+ />
81
+ <path
82
+ d={`M0 ${hillB} Q120 ${hillB - 40} 240 ${hillB} T400 ${hillB - 20} V300 H0 Z`}
83
+ fill="var(--dracula-bg)"
84
+ />
85
+ </>
86
+ )}
87
+ {size === "sm" ? (
88
+ <g
89
+ transform={`translate(${60 + ((index * 41) % 280)} ${hillB - 34})`}
90
+ fill="none"
91
+ stroke={hue}
92
+ strokeWidth="4"
93
+ strokeLinecap="round"
94
+ strokeLinejoin="round"
95
+ >
96
+ <rect x="-22" y="-22" width="44" height="44" rx={4} />
97
+ <circle cx="9" cy="-9" r="2" fill={hue} stroke="none" />
98
+ <path d="M-17 15 L-4 0 L5 9 L10 4 L17 12" />
99
+ </g>
100
+ ) : (
101
+ <g
102
+ transform="translate(200 150)"
103
+ fill="none"
104
+ stroke="var(--dracula-comment)"
105
+ strokeWidth="5"
106
+ strokeLinecap="round"
107
+ strokeLinejoin="round"
108
+ >
109
+ <rect x="-44" y="-44" width="88" height="88" rx="5" />
110
+ <circle cx="18" cy="-18" r="2.5" fill={hue} stroke="none" />
111
+ <path d="M-34 30 L-8 0 L10 18 L20 8 L34 24" />
112
+ </g>
113
+ )}
114
+ </svg>
115
+ );
128
116
  }
@@ -5,41 +5,42 @@
5
5
  // row instead of hot-updating. `react-doctor/only-export-components` catches it.
6
6
  // Three templates (settings, settings-sidebar, settings-dialog) read from here,
7
7
  // so this data is genuinely shared rather than co-located by accident.
8
- import type {CSSProperties} from 'react';
9
- import type {LucideIcon} from 'lucide-react';
8
+
9
+ import type { LucideIcon } from "lucide-react";
10
10
  import {
11
- Bell,
12
- Briefcase,
13
- CreditCard,
14
- FileText,
15
- Fingerprint,
16
- Globe,
17
- KeyRound,
18
- Laptop,
19
- Lock,
20
- Share2,
21
- ShieldCheck,
22
- Smartphone,
23
- SquarePen,
24
- Tablet,
25
- User,
26
- UserCog,
27
- } from 'lucide-react';
11
+ Bell,
12
+ Briefcase,
13
+ CreditCard,
14
+ FileText,
15
+ Fingerprint,
16
+ Globe,
17
+ KeyRound,
18
+ Laptop,
19
+ Lock,
20
+ Share2,
21
+ ShieldCheck,
22
+ Smartphone,
23
+ SquarePen,
24
+ Tablet,
25
+ User,
26
+ UserCog,
27
+ } from "lucide-react";
28
+ import type { CSSProperties } from "react";
28
29
 
29
30
  export interface SettingsNavItem {
30
- label: string;
31
- icon: LucideIcon;
31
+ label: string;
32
+ icon: LucideIcon;
32
33
  }
33
34
 
34
35
  export const NAV_ITEMS: SettingsNavItem[] = [
35
- {label: 'Personal information', icon: User},
36
- {label: 'Login & security', icon: Lock},
37
- {label: 'Privacy', icon: ShieldCheck},
38
- {label: 'Notifications', icon: Bell},
39
- {label: 'Taxes', icon: FileText},
40
- {label: 'Payments', icon: CreditCard},
41
- {label: 'Languages & currency', icon: Globe},
42
- {label: 'Travel for work', icon: Briefcase},
36
+ { label: "Personal information", icon: User },
37
+ { label: "Login & security", icon: Lock },
38
+ { label: "Privacy", icon: ShieldCheck },
39
+ { label: "Notifications", icon: Bell },
40
+ { label: "Taxes", icon: FileText },
41
+ { label: "Payments", icon: CreditCard },
42
+ { label: "Languages & currency", icon: Globe },
43
+ { label: "Travel for work", icon: Briefcase },
43
44
  ];
44
45
 
45
46
  /**
@@ -49,45 +50,45 @@ export const NAV_ITEMS: SettingsNavItem[] = [
49
50
  * outrank the panel's own primary, `ghost` would leave an action with no
50
51
  * affordance at all. Only the two that can be are offered.
51
52
  */
52
- export type RowActionVariant = 'secondary' | 'destructive';
53
+ export type RowActionVariant = "secondary" | "destructive";
53
54
  export interface InfoRow {
54
- label: string;
55
- value: string;
56
- action: string;
57
- /**
58
- * What `action` actually is. 'action' (the default) changes state in place
59
- * and renders a Button; 'destination' navigates and renders a Link. Stated
60
- * in the data rather than inferred from `href` or read off the label, so
61
- * renaming "View" cannot silently turn a destination back into an action.
62
- */
63
- actionKind?: 'action' | 'destination';
64
- /** Where a 'destination' action goes. Read only when actionKind is 'destination'. */
65
- href?: string;
66
- /**
67
- * Visual weight of the trailing Button. `secondary` is the default and the
68
- * right answer for almost every row. `destructive` is for a row whose action
69
- * ends or destroys something — disconnecting an account, deleting data — so
70
- * that control agrees with the templates' inline Deactivate/Delete buttons
71
- * instead of rendering identically to "Create" sitting above it. Stated
72
- * here for the same reason `actionKind` is: the renderer cannot recover it
73
- * from the label without reading the English verb off the row, which is how
74
- * "View" became a button in the first place. Ignored for a `'destination'`
75
- * row, which renders a Link and takes no variant.
76
- */
77
- variant?: RowActionVariant;
78
- /**
79
- * What the Button does, when something wants it to. Optional on purpose: a
80
- * row with no `onAction` renders an inert control, which is the honest
81
- * default for a showcase with no backend — better than a toggle that flips
82
- * "Connected" to "Disconnected" and pretends a call happened. A consumer
83
- * that has a real handler passes one and the row goes live. Nothing here
84
- * simulates a result or invents state to make the button look busy.
85
- */
86
- onAction?: () => void;
55
+ label: string;
56
+ value: string;
57
+ action: string;
58
+ /**
59
+ * What `action` actually is. 'action' (the default) changes state in place
60
+ * and renders a Button; 'destination' navigates and renders a Link. Stated
61
+ * in the data rather than inferred from `href` or read off the label, so
62
+ * renaming "View" cannot silently turn a destination back into an action.
63
+ */
64
+ actionKind?: "action" | "destination";
65
+ /** Where a 'destination' action goes. Read only when actionKind is 'destination'. */
66
+ href?: string;
67
+ /**
68
+ * Visual weight of the trailing Button. `secondary` is the default and the
69
+ * right answer for almost every row. `destructive` is for a row whose action
70
+ * ends or destroys something — disconnecting an account, deleting data — so
71
+ * that control agrees with the templates' inline Deactivate/Delete buttons
72
+ * instead of rendering identically to "Create" sitting above it. Stated
73
+ * here for the same reason `actionKind` is: the renderer cannot recover it
74
+ * from the label without reading the English verb off the row, which is how
75
+ * "View" became a button in the first place. Ignored for a `'destination'`
76
+ * row, which renders a Link and takes no variant.
77
+ */
78
+ variant?: RowActionVariant;
79
+ /**
80
+ * What the Button does, when something wants it to. Optional on purpose: a
81
+ * row with no `onAction` renders an inert control, which is the honest
82
+ * default for a showcase with no backend — better than a toggle that flips
83
+ * "Connected" to "Disconnected" and pretends a call happened. A consumer
84
+ * that has a real handler passes one and the row goes live. Nothing here
85
+ * simulates a result or invents state to make the button look busy.
86
+ */
87
+ onAction?: () => void;
87
88
  }
88
89
 
89
90
  export const LOGIN_ROWS: InfoRow[] = [
90
- {label: 'Password', value: 'Not created', action: 'Create'},
91
+ { label: "Password", value: "Not created", action: "Create" },
91
92
  ];
92
93
 
93
94
  // Disconnecting ends an account link the user set up on purpose, so it is the
@@ -95,73 +96,100 @@ export const LOGIN_ROWS: InfoRow[] = [
95
96
  // position. LOGIN_ROWS' "Create" is the opposite (it adds a password) and
96
97
  // keeps the default `secondary`.
97
98
  export const SOCIAL_ROWS: InfoRow[] = [
98
- {label: 'Google', value: 'Connected', action: 'Disconnect', variant: 'destructive'},
99
+ { label: "Google", value: "Connected", action: "Disconnect", variant: "destructive" },
99
100
  ];
100
101
 
101
102
  export interface DeviceRow {
102
- label: string;
103
- isCurrent?: boolean;
104
- location: string;
105
- action?: string;
103
+ label: string;
104
+ isCurrent?: boolean;
105
+ location: string;
106
+ action?: string;
106
107
  }
107
108
 
108
109
  export const DEVICE_ROWS: DeviceRow[] = [
109
- {
110
- label: 'OS X 10.15.7 · Chrome',
111
- isCurrent: true,
112
- location: 'Brașov, Transylvania · March 30, 2026 at 19:31',
113
- },
114
- {label: 'Session', location: 'August 9, 2023 at 04:19', action: 'Log out'},
115
- {
116
- label: 'OS X 10.15.7 · unknown',
117
- location: 'Whitby, England · April 14, 2023 at 17:47',
118
- action: 'Log out',
119
- },
110
+ {
111
+ label: "OS X 10.15.7 · Chrome",
112
+ isCurrent: true,
113
+ location: "Brașov, Transylvania · March 30, 2026 at 19:31",
114
+ },
115
+ { label: "Session", location: "August 9, 2023 at 04:19", action: "Log out" },
116
+ {
117
+ label: "OS X 10.15.7 · unknown",
118
+ location: "Whitby, England · April 14, 2023 at 17:47",
119
+ action: "Log out",
120
+ },
120
121
  ];
121
122
 
122
123
  export interface InfoTileData {
123
- icon: LucideIcon;
124
- title: string;
125
- body: string;
124
+ icon: LucideIcon;
125
+ title: string;
126
+ body: string;
126
127
  }
127
128
 
128
129
  export const INFO_TILES: InfoTileData[] = [
129
- {
130
- icon: Lock,
131
- title: "Why isn't my info shown here?",
132
- body: "We're veiling some crypt details to protect your identity.",
133
- },
134
- {
135
- icon: SquarePen,
136
- title: 'Which details can be edited?',
137
- body: "Contact runes and personal details can be edited. If these were used to verify your identity, you'll need to be verified anew before your next stay, or to keep hosting your crypt.",
138
- },
139
- {
140
- icon: Share2,
141
- title: 'What info is shared with others?',
142
- body: 'We only release contact runes after a booking is sealed.',
143
- },
130
+ {
131
+ icon: Lock,
132
+ title: "Why isn't my info shown here?",
133
+ body: "We're veiling some crypt details to protect your identity.",
134
+ },
135
+ {
136
+ icon: SquarePen,
137
+ title: "Which details can be edited?",
138
+ body: "Contact runes and personal details can be edited. If these were used to verify your identity, you'll need to be verified anew before your next stay, or to keep hosting your crypt.",
139
+ },
140
+ {
141
+ icon: Share2,
142
+ title: "What info is shared with others?",
143
+ body: "We only release contact runes after a booking is sealed.",
144
+ },
144
145
  ];
145
146
 
146
147
  // Shared row chrome: the icon chip, nowrap action column, and sidebar heading
147
148
  // offset duplicated across settings-dialog and settings-sidebar. Tokens only,
148
149
  // no layout opinions — templates keep their own padding/dividers.
149
150
  export const iconBox: CSSProperties = {
150
- borderRadius: 'var(--radius-container)',
151
- backgroundColor: 'var(--color-background-surface)',
152
- flexShrink: 0,
151
+ borderRadius: "var(--radius-container)",
152
+ backgroundColor: "var(--color-background-surface)",
153
+ flexShrink: 0,
153
154
  };
154
155
 
155
156
  // Keeps row actions ("Log out", "Deactivate") on one line: without this the
156
157
  // action column wraps mid-phrase at tablet widths while the info column still
157
158
  // has room to wrap instead.
158
159
  export const actionNoWrap: CSSProperties = {
159
- flexShrink: 0,
160
- whiteSpace: 'nowrap',
160
+ flexShrink: 0,
161
+ whiteSpace: "nowrap",
161
162
  };
162
163
 
163
164
  // Aligns the sidebar heading with list-item label text. No heading margin prop.
164
165
  export const sideNavHeading: CSSProperties = {
165
- marginInline: 'var(--spacing-4)',
166
+ marginInline: "var(--spacing-4)",
166
167
  };
167
168
 
169
+ // Locale pickers shared by the sidebar and dialog templates. The two copies
170
+ // were byte-identical walls; a single source keeps them in sync.
171
+ export const LANGUAGES: { label: string; value: string }[] = [
172
+ { label: "English (Canada)", value: "en-CA" },
173
+ { label: "English (US)", value: "en-US" },
174
+ { label: "French", value: "fr" },
175
+ { label: "Spanish", value: "es" },
176
+ { label: "German", value: "de" },
177
+ { label: "Japanese", value: "ja" },
178
+ ];
179
+
180
+ export const CURRENCIES: { label: string; value: string }[] = [
181
+ { label: "Canadian dollar (CAD)", value: "CAD" },
182
+ { label: "US dollar (USD)", value: "USD" },
183
+ { label: "Euro (EUR)", value: "EUR" },
184
+ { label: "British pound (GBP)", value: "GBP" },
185
+ { label: "Japanese yen (JPY)", value: "JPY" },
186
+ ];
187
+
188
+ export const TIMEZONES: { label: string; value: string }[] = [
189
+ { label: "(GMT-05:00) Eastern Time (US & Canada)", value: "ET" },
190
+ { label: "(GMT-06:00) Central Time (US & Canada)", value: "CT" },
191
+ { label: "(GMT-07:00) Mountain Time (US & Canada)", value: "MT" },
192
+ { label: "(GMT-08:00) Pacific Time (US & Canada)", value: "PT" },
193
+ { label: "(GMT+00:00) UTC", value: "UTC" },
194
+ { label: "(GMT+01:00) London", value: "GMT+1" },
195
+ ];