@behavioral-agentic-design-system/core 0.6.0 → 0.7.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 (53) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +30 -5
  3. package/scripts/bads-sync.mjs +1 -1
  4. package/scripts/build-fonts.cjs +15 -8
  5. package/scripts/build-tokens.cjs +139 -23
  6. package/src/api/brand-fonts.ts +27 -6
  7. package/src/api/layers/file.ts +4 -3
  8. package/src/api/layers.ts +8 -7
  9. package/src/api/site-auth.ts +50 -0
  10. package/src/app/font-ready.tsx +1 -1
  11. package/src/app/layout.tsx +9 -3
  12. package/src/app/preview/components/page.tsx +78 -1
  13. package/src/app/preview/icons/page.tsx +5 -0
  14. package/src/app/shell.tsx +27 -22
  15. package/src/app/site-login/page.tsx +82 -0
  16. package/src/brand-fonts.css +5 -0
  17. package/src/components/Foundations/Motion.stories.tsx +66 -0
  18. package/src/components/customize/letter-spacing.tsx +3 -2
  19. package/src/components/customize/type-scale.tsx +3 -2
  20. package/src/components/customize-tab.tsx +8 -7
  21. package/src/components/home-tab.tsx +498 -235
  22. package/src/components/layers-tab.tsx +141 -3
  23. package/src/components/ui/alert.tsx +2 -2
  24. package/src/components/ui/bottom-sheet.tsx +124 -0
  25. package/src/components/ui/button.tsx +1 -1
  26. package/src/components/ui/chart.tsx +115 -14
  27. package/src/components/ui/checkbox.tsx +3 -2
  28. package/src/components/ui/dialog.tsx +3 -3
  29. package/src/components/ui/index.ts +1 -0
  30. package/src/components/ui/radio-group.tsx +4 -3
  31. package/src/components/ui/sheet.tsx +1 -1
  32. package/src/components/ui/switch.tsx +3 -3
  33. package/src/components/ui/tabs.tsx +6 -0
  34. package/src/fonts/HyperlegibleSans-Bold.woff2 +0 -0
  35. package/src/fonts/HyperlegibleSans-BoldItalic.woff2 +0 -0
  36. package/src/fonts/HyperlegibleSans-Italic.woff2 +0 -0
  37. package/src/fonts/HyperlegibleSans-Medium.woff2 +0 -0
  38. package/src/fonts/HyperlegibleSans-MediumItalic.woff2 +0 -0
  39. package/src/fonts/HyperlegibleSans-Regular.woff2 +0 -0
  40. package/src/fonts/InterVariable-Italic.woff2 +0 -0
  41. package/src/fonts/InterVariable.woff2 +0 -0
  42. package/src/fonts.css +99 -0
  43. package/src/hooks/use-global-primary-color.ts +114 -68
  44. package/src/hooks/use-global-serif-font.ts +1 -1
  45. package/src/lib/storage.ts +2 -2
  46. package/src/styles.css +151 -61
  47. package/src/tokens.default.json +4 -4
  48. package/src/tokens.json +159 -162
  49. package/src/app/preview/login/page.tsx +0 -5
  50. package/src/app/preview/mail/page.tsx +0 -4
  51. package/src/app/preview/pricing/page.tsx +0 -4
  52. package/src/components/admin-menu.stories.tsx +0 -68
  53. package/src/components/admin-menu.tsx +0 -59
@@ -158,14 +158,14 @@
158
158
  },
159
159
  "fontFamily": {
160
160
  "sans": {
161
- "$value": "'Season', 'Hyperlegible Sans', ui-sans-serif, sans-serif, system-ui",
161
+ "$value": "'Hyperlegible Sans', ui-sans-serif, sans-serif, system-ui",
162
162
  "$type": "fontFamily",
163
- "$description": "Primary sans (body, UI). Season is the Swimtopia default \u2014 brand-forward with Hyperlegible Sans as the safe fallback."
163
+ "$description": "Primary sans (body, UI). Hyperlegible Sans is the BADS default \u2014 production-safe and accessibility-friendly. Override per client."
164
164
  },
165
165
  "serif": {
166
- "$value": "'Season Serif', 'Season', ui-serif, Georgia, serif",
166
+ "$value": "ui-serif, Georgia, serif",
167
167
  "$type": "fontFamily",
168
- "$description": "Primary serif stack. Season Serif is the Swimtopia default display face."
168
+ "$description": "Display/serif fallback stack. No default brand serif \u2014 clients should override."
169
169
  },
170
170
  "mono": {
171
171
  "$value": "'JetBrains Mono', ui-monospace, monospace",
package/src/tokens.json CHANGED
@@ -68,17 +68,12 @@
68
68
  "300": {
69
69
  "$value": "#7292A1",
70
70
  "$type": "color",
71
- "$description": "Mid blue-gray — focus rings and other lifted UI on dark backgrounds"
72
- },
73
- "400": {
74
- "$value": "#527081",
75
- "$type": "color",
76
- "$description": "Slate-blue — default borders/dividers on dark backgrounds (oklch L 0.485). ~3.5:1 on card, ~3.7:1 on page bg. AAA non-text."
71
+ "$description": "Mid blue-gray — input borders on dark backgrounds"
77
72
  },
78
73
  "500": {
79
74
  "$value": "#324852",
80
75
  "$type": "color",
81
- "$description": "Deep blue-gray — reserved for darker UI accents, not the default border (that's slate.400)."
76
+ "$description": "Deep blue-gray — default borders/dividers on dark backgrounds"
82
77
  }
83
78
  },
84
79
  "cream": {
@@ -163,14 +158,14 @@
163
158
  },
164
159
  "fontFamily": {
165
160
  "sans": {
166
- "$value": "'Season', 'Hyperlegible Sans', ui-sans-serif, sans-serif, system-ui",
161
+ "$value": "'Inter', 'Hyperlegible Sans', ui-sans-serif, sans-serif, system-ui",
167
162
  "$type": "fontFamily",
168
- "$description": "Primary sans (body, UI). Season is the Swimtopia default — brand-forward with Hyperlegible Sans as the safe fallback."
163
+ "$description": "Primary sans (body, UI). Inter Variable is the BADS default — a single variable woff2 covers weights 100–900, enabling responsive type axes and per-fork weight tuning via --font-variation-settings. Hyperlegible Sans (the Braille Institute's low-vision face) stays second in the stack as the accessibility-preserving fallback and is still self-hosted. ACCESSIBILITY NOTE: forks with a low-vision-heavy audience should reorder to lead with 'Hyperlegible Sans'. Override per client."
169
164
  },
170
165
  "serif": {
171
- "$value": "'Season Serif', 'Season', ui-serif, Georgia, serif",
166
+ "$value": "ui-serif, Georgia, serif",
172
167
  "$type": "fontFamily",
173
- "$description": "Primary serif stack. Season Serif is the Swimtopia default display face."
168
+ "$description": "Display/serif fallback stack. No default brand serif — clients should override."
174
169
  },
175
170
  "mono": {
176
171
  "$value": "'JetBrains Mono', ui-monospace, monospace",
@@ -178,6 +173,11 @@
178
173
  "$description": "Monospace (code, captions). JetBrains Mono is the default fallback."
179
174
  }
180
175
  },
176
+ "fontVariationSettings": {
177
+ "$value": "normal",
178
+ "$type": "other",
179
+ "$description": "Variable-font axis settings applied to html (emitted as --font-variation-settings). Default 'normal' lets the weight/optical-size axes resolve from font-weight + opsz auto. Forks tune type here without touching component source — e.g. \"'opsz' 18\" to pin optical size, or \"'wght' 450\" for a custom default weight. Only takes effect when the active sans is a variable font (Inter Variable ships by default)."
180
+ },
181
181
  "fontSize": {
182
182
  "xs": {
183
183
  "$value": "14px",
@@ -447,7 +447,82 @@
447
447
  },
448
448
  "ease-spring": {
449
449
  "$value": "cubic-bezier(0.34, 1.56, 0.64, 1)",
450
- "$type": "cubic-bezier"
450
+ "$type": "cubic-bezier",
451
+ "$description": "Default spring overshoot. Alias of spring-bounce; kept for back-compat with existing component usage."
452
+ },
453
+ "spring-gentle": {
454
+ "$value": "cubic-bezier(0.4, 0, 0.2, 1)",
455
+ "$type": "cubic-bezier",
456
+ "$description": "No overshoot, soft settle. Use for large surfaces (sheets, dialogs, page transitions) where bounce would feel cheap."
457
+ },
458
+ "spring-snappy": {
459
+ "$value": "cubic-bezier(0.3, 0, 0, 1)",
460
+ "$type": "cubic-bezier",
461
+ "$description": "Fast attack, near-instant settle, no overshoot. Use for small, frequent UI (toggles, tabs, menu open) that should feel immediate."
462
+ },
463
+ "spring-bounce": {
464
+ "$value": "cubic-bezier(0.34, 1.56, 0.64, 1)",
465
+ "$type": "cubic-bezier",
466
+ "$description": "Playful overshoot. Use sparingly for delight moments (success ticks, badge pops). Auto-disabled under prefers-reduced-motion by the base layer."
467
+ }
468
+ },
469
+ "motion": {
470
+ "$description": "Semantic motion layer — intent-named pairings of a duration + easing primitive, so humans and AI pick motion by what it should DO, not by raw numbers. Five intent groups (fade/slide/scale/expand/spin) mirror the slide/fade/scale/rotate/content families. Each emits --motion-<intent>-duration and --motion-<intent>-ease. All motion is auto-killed under prefers-reduced-motion by the base layer. See layer-6-patterns-and-rules/motion.md for the decision tree.",
471
+ "fade": {
472
+ "duration": {
473
+ "$value": "{duration.base}",
474
+ "$type": "dimension",
475
+ "$description": "Opacity in/out — overlays, content swaps, things appearing/disappearing in place."
476
+ },
477
+ "easing": {
478
+ "$value": "{easing.ease-out}",
479
+ "$type": "cubic-bezier"
480
+ }
481
+ },
482
+ "slide": {
483
+ "duration": {
484
+ "$value": "{duration.base}",
485
+ "$type": "dimension",
486
+ "$description": "Positional translate — sheets, drawers, toasts entering from a screen edge."
487
+ },
488
+ "easing": {
489
+ "$value": "{easing.ease-out}",
490
+ "$type": "cubic-bezier"
491
+ }
492
+ },
493
+ "scale": {
494
+ "duration": {
495
+ "$value": "{duration.fast}",
496
+ "$type": "dimension",
497
+ "$description": "Size in/out from an origin — popovers, dropdown menus, tooltips. Snappy spring so it feels instant."
498
+ },
499
+ "easing": {
500
+ "$value": "{easing.spring-snappy}",
501
+ "$type": "cubic-bezier"
502
+ }
503
+ },
504
+ "expand": {
505
+ "duration": {
506
+ "$value": "{duration.slow}",
507
+ "$type": "dimension",
508
+ "$description": "Height / grid-rows reveal — accordions, collapsibles, disclosure (the 'content' family). Slower because the layout shifts around it."
509
+ },
510
+ "easing": {
511
+ "$value": "{easing.ease-in-out}",
512
+ "$type": "cubic-bezier"
513
+ }
514
+ },
515
+ "spin": {
516
+ "duration": {
517
+ "$value": "{duration.slow}",
518
+ "$type": "dimension",
519
+ "$description": "Continuous rotate — loaders, busy chevrons. Pair with infinite iteration; linear timing keeps angular velocity constant."
520
+ },
521
+ "easing": {
522
+ "$value": "cubic-bezier(0, 0, 1, 1)",
523
+ "$type": "cubic-bezier",
524
+ "$description": "Linear (no ease) — the cubic-bezier form of `linear` so $type stays consistent."
525
+ }
451
526
  }
452
527
  },
453
528
  "typography": {
@@ -759,7 +834,7 @@
759
834
  "$type": "color"
760
835
  },
761
836
  "primary": {
762
- "$value": "#025FFF",
837
+ "$value": "#1F1F1F",
763
838
  "$type": "color",
764
839
  "$description": "Primary brand. Override per client. Default = shadcn near-black."
765
840
  },
@@ -824,34 +899,33 @@
824
899
  "$description": "Focus ring base. AAA non-text + 2.4.13: ≥3:1 on every surface. Tracks --primary when brand color changes (luminance-clamped to keep 3:1)."
825
900
  },
826
901
  "chart-1": {
827
- "$value": "oklch(0.5836 0.2469 264.05)",
902
+ "$value": "oklch(0.6200 0.2000 220)",
828
903
  "$type": "color",
829
- "$description": "Static fallback for series 1 — Pool Blue. Runtime derives from --primary; this value is the literal pool blue and is what audit/legacy browsers see."
904
+ "$description": "Tuned for AAA 3:1 on white card. Electric cyan-blue."
830
905
  },
831
906
  "chart-2": {
832
- "$value": "oklch(0.5000 0.2345 264.05)",
907
+ "$value": "oklch(0.6200 0.2200 145)",
833
908
  "$type": "color",
834
- "$description": "Static fallback for series 2 — pool blue darkened (L 0.50, chroma * 0.95)."
909
+ "$description": "Tuned for AAA 3:1 on white card. Spring green."
835
910
  },
836
911
  "chart-3": {
837
- "$value": "oklch(0.4200 0.1975 264.05)",
912
+ "$value": "oklch(0.6700 0.2000 70)",
838
913
  "$type": "color",
839
- "$description": "Static fallback for series 3 — pool blue darkened (L 0.42, chroma * 0.80)."
914
+ "$description": "Tuned for AAA 3:1 on white card. Bright orange-yellow."
840
915
  },
841
916
  "chart-4": {
842
- "$value": "oklch(0.3400 0.1481 264.05)",
917
+ "$value": "oklch(0.6000 0.2600 340)",
843
918
  "$type": "color",
844
- "$description": "Static fallback for series 4 — pool blue darkened (L 0.34, chroma * 0.60)."
919
+ "$description": "Tuned for AAA 3:1 on white card. Hot fuchsia."
845
920
  },
846
921
  "chart-5": {
847
- "$value": "oklch(0.2700 0.0988 264.05)",
922
+ "$value": "oklch(0.6200 0.2200 25)",
848
923
  "$type": "color",
849
- "$description": "Static fallback for series 5 — lands near brand Navy (L 0.27, chroma * 0.40)."
924
+ "$description": "Tuned for AAA 3:1 on white card. Coral."
850
925
  },
851
926
  "sidebar": {
852
- "$value": "oklch(0.9700 0 0)",
853
- "$type": "color",
854
- "$description": "Light mode sidebar surface — slightly darker than page background (1.0) so the sidebar reads as a distinct panel, not blank space. Matches --muted for a calm off-white."
927
+ "$value": "oklch(0.9850 0 0)",
928
+ "$type": "color"
855
929
  },
856
930
  "sidebar-foreground": {
857
931
  "$value": "oklch(0.1450 0 0)",
@@ -934,31 +1008,27 @@
934
1008
  },
935
1009
  "dark": {
936
1010
  "background": {
937
- "$value": "#040D20",
938
- "$type": "color",
939
- "$description": "Page background — deepest brand blue (blue.950). Swimtopia brand surfaces are navy-tinted, not charcoal; black is reserved for text."
1011
+ "$value": "oklch(0.1450 0 0)",
1012
+ "$type": "color"
940
1013
  },
941
1014
  "foreground": {
942
- "$value": "#FAFCFC",
943
- "$type": "color",
944
- "$description": "Default text on dark navy surfaces (off-white, neutral.50)."
1015
+ "$value": "oklch(0.9850 0 0)",
1016
+ "$type": "color"
945
1017
  },
946
1018
  "card": {
947
- "$value": "#09142A",
948
- "$type": "color",
949
- "$description": "Card surface — deep navy (blue.850), one step lighter than page bg for elevation."
1019
+ "$value": "oklch(0.2050 0 0)",
1020
+ "$type": "color"
950
1021
  },
951
1022
  "card-foreground": {
952
- "$value": "#FAFCFC",
1023
+ "$value": "oklch(0.9850 0 0)",
953
1024
  "$type": "color"
954
1025
  },
955
1026
  "popover": {
956
- "$value": "#0E295E",
957
- "$type": "color",
958
- "$description": "Popover/overlay surface — navy (blue.700), lifted from card for layered overlays."
1027
+ "$value": "oklch(0.2690 0 0)",
1028
+ "$type": "color"
959
1029
  },
960
1030
  "popover-foreground": {
961
- "$value": "#FAFCFC",
1031
+ "$value": "oklch(0.9850 0 0)",
962
1032
  "$type": "color"
963
1033
  },
964
1034
  "primary": {
@@ -977,31 +1047,28 @@
977
1047
  "$description": "See light-mode --link. In dark mode --primary is near-white (#FAFAFA), so the default link reads at ~19:1 on the dark background. Forks with a dark-mode brand primary that fails contrast (e.g. mid-saturation blurple) should override --link to a lifted variant."
978
1048
  },
979
1049
  "secondary": {
980
- "$value": "#0A1D42",
981
- "$type": "color",
982
- "$description": "Secondary surface — mid-deep navy (blue.800)."
1050
+ "$value": "oklch(0.2690 0 0)",
1051
+ "$type": "color"
983
1052
  },
984
1053
  "secondary-foreground": {
985
- "$value": "#FAFCFC",
1054
+ "$value": "oklch(0.9850 0 0)",
986
1055
  "$type": "color"
987
1056
  },
988
1057
  "muted": {
989
- "$value": "#0A1D42",
990
- "$type": "color",
991
- "$description": "Muted surface — mid-deep navy (blue.800), same family as secondary."
1058
+ "$value": "oklch(0.2690 0 0)",
1059
+ "$type": "color"
992
1060
  },
993
1061
  "muted-foreground": {
994
- "$value": "#B8D6E5",
1062
+ "$value": "oklch(0.7800 0 0)",
995
1063
  "$type": "color",
996
- "$description": "Captions, labels, secondary text — slate.100. 12.5:1 on background (AAA)."
1064
+ "$description": "Captions, labels, secondary text. ~9:1 on dark bg (AAA)."
997
1065
  },
998
1066
  "accent": {
999
- "$value": "#0E295E",
1000
- "$type": "color",
1001
- "$description": "Accent surface — navy (blue.700)."
1067
+ "$value": "oklch(0.3710 0 0)",
1068
+ "$type": "color"
1002
1069
  },
1003
1070
  "accent-foreground": {
1004
- "$value": "#FAFCFC",
1071
+ "$value": "oklch(0.9850 0 0)",
1005
1072
  "$type": "color"
1006
1073
  },
1007
1074
  "destructive": {
@@ -1015,52 +1082,52 @@
1015
1082
  "$description": "Dark text on light-red destructive surface for AAA 7:1 in dark mode."
1016
1083
  },
1017
1084
  "border": {
1018
- "$value": "rgb(255 255 255 / 0.10)",
1085
+ "$value": "oklch(0.5500 0 0)",
1019
1086
  "$type": "color",
1020
- "$description": "Default borders/dividers on dark navy surfaces. Transparent white so it reads as a quiet inner edge on any dark surface — matches the swimtopia-prototypes `ring-white/10` chrome treatment. Composites to ~#222C3F over the dark card bg. (Below WCAG AAA 3:1 against the card; intentional — borders here are decorative chrome, not interactive affordances.)"
1087
+ "$description": "AAA non-text: ≥3:1 on dark background AND card."
1021
1088
  },
1022
1089
  "input": {
1023
- "$value": "rgb(255 255 255 / 0.10)",
1090
+ "$value": "oklch(0.5500 0 0)",
1024
1091
  "$type": "color",
1025
- "$description": "Input borders on dark navy — same transparent-white treatment as `border` so form fields read as quiet inner edges. Inputs that need stronger affordance use the focus ring (--ring) on interaction."
1092
+ "$description": "AAA non-text: ≥3:1 on dark card."
1026
1093
  },
1027
1094
  "ring": {
1028
- "$value": "#B8D6E5",
1095
+ "$value": "oklch(0.7000 0 0)",
1029
1096
  "$type": "color",
1030
- "$description": "Focus ring base, dark mode — slate.100. 12.5:1 on background (well above AAA non-text floor)."
1097
+ "$description": "Focus ring base, dark mode. AAA non-text 3:1 on dark."
1031
1098
  },
1032
1099
  "chart-1": {
1033
- "$value": "oklch(0.7800 0.1850 264.05)",
1100
+ "$value": "oklch(0.7800 0.1800 220)",
1034
1101
  "$type": "color",
1035
- "$description": "Static fallback for series 1 — light pool blue tint (dark mode anchor)."
1102
+ "$description": "Tuned for AAA 3:1 on dark card. Bright cyan-blue."
1036
1103
  },
1037
1104
  "chart-2": {
1038
- "$value": "oklch(0.7000 0.2100 264.05)",
1105
+ "$value": "oklch(0.8000 0.2000 145)",
1039
1106
  "$type": "color",
1040
- "$description": "Static fallback for series 2 — pool blue (L 0.70, chroma * 0.95)."
1107
+ "$description": "Tuned for AAA 3:1 on dark card. Bright spring green."
1041
1108
  },
1042
1109
  "chart-3": {
1043
- "$value": "oklch(0.6200 0.1975 264.05)",
1110
+ "$value": "oklch(0.8500 0.2000 75)",
1044
1111
  "$type": "color",
1045
- "$description": "Static fallback for series 3 — pool blue darkened (L 0.62, chroma * 0.80)."
1112
+ "$description": "Tuned for AAA 3:1 on dark card. Bright orange-yellow."
1046
1113
  },
1047
1114
  "chart-4": {
1048
- "$value": "oklch(0.5600 0.1481 264.05)",
1115
+ "$value": "oklch(0.7600 0.2200 340)",
1049
1116
  "$type": "color",
1050
- "$description": "Static fallback for series 4 — pool blue darkened (L 0.56, chroma * 0.60)."
1117
+ "$description": "Tuned for AAA 3:1 on dark card. Bright fuchsia."
1051
1118
  },
1052
1119
  "chart-5": {
1053
- "$value": "oklch(0.5200 0.0988 264.05)",
1120
+ "$value": "oklch(0.7800 0.1800 25)",
1054
1121
  "$type": "color",
1055
- "$description": "Static fallback for series 5 — darkest pool blue that still hits AAA 3:1 on dark card (L 0.52, chroma * 0.40)."
1122
+ "$description": "Tuned for AAA 3:1 on dark card. Bright coral."
1056
1123
  },
1057
1124
  "sidebar": {
1058
- "$value": "#09142A",
1125
+ "$value": "oklch(0.1450 0 0)",
1059
1126
  "$type": "color",
1060
- "$description": "Sidebar surface — deep navy (blue.850), matches card so the sidebar reads as a peer surface."
1127
+ "$description": "Recedes to the page background (matches --background) so chrome sits behind the floating content card (L0.205) instead of level with it. Linear/Vercel calmer-interface pattern. Was L0.205 (== card), which made the sidebar advance."
1061
1128
  },
1062
1129
  "sidebar-foreground": {
1063
- "$value": "#FAFCFC",
1130
+ "$value": "oklch(0.9850 0 0)",
1064
1131
  "$type": "color"
1065
1132
  },
1066
1133
  "sidebar-primary": {
@@ -1069,27 +1136,26 @@
1069
1136
  "$description": "Tuned for AAA 7:1 with white foreground."
1070
1137
  },
1071
1138
  "sidebar-primary-foreground": {
1072
- "$value": "#FAFCFC",
1139
+ "$value": "oklch(0.9850 0 0)",
1073
1140
  "$type": "color"
1074
1141
  },
1075
1142
  "sidebar-accent": {
1076
- "$value": "#0E295E",
1077
- "$type": "color",
1078
- "$description": "Sidebar accent surface — navy (blue.700)."
1143
+ "$value": "oklch(0.2690 0 0)",
1144
+ "$type": "color"
1079
1145
  },
1080
1146
  "sidebar-accent-foreground": {
1081
- "$value": "#FAFCFC",
1147
+ "$value": "oklch(0.9850 0 0)",
1082
1148
  "$type": "color"
1083
1149
  },
1084
1150
  "sidebar-border": {
1085
- "$value": "{color.primitive.slate.400}",
1151
+ "$value": "oklch(0.5500 0 0)",
1086
1152
  "$type": "color",
1087
- "$description": "AAA non-text ≥3:1 on dark sidebar — aliased to slate.400."
1153
+ "$description": "AAA non-text 3:1 on dark sidebar."
1088
1154
  },
1089
1155
  "sidebar-ring": {
1090
- "$value": "#B8D6E5",
1156
+ "$value": "oklch(0.7000 0 0)",
1091
1157
  "$type": "color",
1092
- "$description": "Focus ring on dark sidebar — slate.100, well above AAA non-text floor."
1158
+ "$description": "AAA non-text 3:1 on dark sidebar."
1093
1159
  }
1094
1160
  }
1095
1161
  },
@@ -1098,112 +1164,43 @@
1098
1164
  "light": {
1099
1165
  "$value": "0.58",
1100
1166
  "$type": "number",
1101
- "$description": "Fallback absolute L for chart series in light mode (oklch). Used only when lightnessSteps is not defined."
1167
+ "$description": "Absolute L for chart series in light mode (oklch). Tuned so all five series sit at readable contrast on white card surfaces."
1102
1168
  },
1103
1169
  "dark": {
1104
1170
  "$value": "0.78",
1105
1171
  "$type": "number",
1106
- "$description": "Fallback absolute L for chart series in dark mode. Used only when lightnessSteps is not defined."
1107
- }
1108
- },
1109
- "lightnessSteps": {
1110
- "$description": "Per-series absolute L in oklch. When defined, overrides chart.lightness for monochromatic ramp palettes. Light mode starts at brand L and gets darker; dark mode starts at the lightest readable tint and gets darker within the AAA-readable range.",
1111
- "light": {
1112
- "step1": {
1113
- "$value": "0.58",
1114
- "$type": "number"
1115
- },
1116
- "step2": {
1117
- "$value": "0.50",
1118
- "$type": "number"
1119
- },
1120
- "step3": {
1121
- "$value": "0.42",
1122
- "$type": "number"
1123
- },
1124
- "step4": {
1125
- "$value": "0.34",
1126
- "$type": "number"
1127
- },
1128
- "step5": {
1129
- "$value": "0.27",
1130
- "$type": "number"
1131
- }
1132
- },
1133
- "dark": {
1134
- "step1": {
1135
- "$value": "0.78",
1136
- "$type": "number"
1137
- },
1138
- "step2": {
1139
- "$value": "0.70",
1140
- "$type": "number"
1141
- },
1142
- "step3": {
1143
- "$value": "0.62",
1144
- "$type": "number"
1145
- },
1146
- "step4": {
1147
- "$value": "0.56",
1148
- "$type": "number"
1149
- },
1150
- "step5": {
1151
- "$value": "0.52",
1152
- "$type": "number",
1153
- "$description": "Floor — any lower fails AAA 3:1 on the dark card."
1154
- }
1172
+ "$description": "Absolute L for chart series in dark mode. Lifted from light so charts stay legible on near-black backgrounds."
1155
1173
  }
1156
1174
  },
1157
1175
  "hueRotation": {
1158
1176
  "step1": {
1159
1177
  "$value": "0",
1160
1178
  "$type": "number",
1161
- "$description": "Monochromatic ramp — all five series inherit --primary's hue."
1162
- },
1163
- "step2": {
1164
- "$value": "0",
1165
- "$type": "number"
1166
- },
1167
- "step3": {
1168
- "$value": "0",
1169
- "$type": "number"
1170
- },
1171
- "step4": {
1172
- "$value": "0",
1173
- "$type": "number"
1174
- },
1175
- "step5": {
1176
- "$value": "0",
1177
- "$type": "number"
1178
- }
1179
- },
1180
- "chromaSteps": {
1181
- "$description": "Per-series chroma multiplier on --primary's chroma. Tapers saturation as L drops so deep shades don't go neon and out-of-gamut.",
1182
- "step1": {
1183
- "$value": "1.00",
1184
- "$type": "number"
1179
+ "$description": "Series 1 — hue inherited from --primary as-is."
1185
1180
  },
1186
1181
  "step2": {
1187
- "$value": "0.95",
1188
- "$type": "number"
1182
+ "$value": "35",
1183
+ "$type": "number",
1184
+ "$description": "Series 2 — primary hue + 35deg, chroma damped to 0.65× for pairing."
1189
1185
  },
1190
1186
  "step3": {
1191
- "$value": "0.80",
1187
+ "$value": "70",
1192
1188
  "$type": "number"
1193
1189
  },
1194
1190
  "step4": {
1195
- "$value": "0.60",
1191
+ "$value": "105",
1196
1192
  "$type": "number"
1197
1193
  },
1198
1194
  "step5": {
1199
- "$value": "0.40",
1200
- "$type": "number"
1195
+ "$value": "140",
1196
+ "$type": "number",
1197
+ "$description": "Series 5 — final hue rotation, max separation from primary."
1201
1198
  }
1202
1199
  },
1203
1200
  "chroma2Damping": {
1204
1201
  "$value": "0.65",
1205
1202
  "$type": "number",
1206
- "$description": "Legacy chroma multiplier on series 2 only. Ignored when chromaSteps is defined."
1203
+ "$description": "Chroma multiplier on series 2 only (others inherit primary chroma)."
1207
1204
  }
1208
1205
  }
1209
1206
  }
@@ -1,5 +0,0 @@
1
- import Login from "@/components/examples/login/login";
2
-
3
- export default function LoginPreview() {
4
- return <Login />;
5
- }
@@ -1,4 +0,0 @@
1
- import Mail from "@/components/examples/mail";
2
- export default function MailPreview() {
3
- return <Mail />;
4
- }
@@ -1,4 +0,0 @@
1
- import Pricing from "@/components/examples/pricing/pricing";
2
- export default function PricingPreview() {
3
- return <Pricing />;
4
- }
@@ -1,68 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { AdminMenu } from "./admin-menu";
3
-
4
- const meta: Meta<typeof AdminMenu> = {
5
- title: "Components/AdminMenu",
6
- component: AdminMenu,
7
- tags: ["autodocs"],
8
- parameters: {
9
- layout: "padded",
10
- },
11
- };
12
-
13
- export default meta;
14
- type Story = StoryObj<typeof meta>;
15
-
16
- export const Default: Story = {};
17
-
18
- export const WithLabel: Story = {
19
- args: {
20
- label: "Admin",
21
- },
22
- };
23
-
24
- export const WithChildren: Story = {
25
- render: () => (
26
- <AdminMenu>
27
- <div className="space-y-2">
28
- <button className="w-full px-2 py-1.5 text-sm font-medium text-left rounded hover:bg-muted transition-colors">
29
- View 1: Calm
30
- </button>
31
- <button className="w-full px-2 py-1.5 text-sm font-medium text-left rounded hover:bg-muted transition-colors">
32
- View 2: Rich
33
- </button>
34
- <button className="w-full px-2 py-1.5 text-sm font-medium text-left rounded hover:bg-muted transition-colors">
35
- View 3: Editorial
36
- </button>
37
- </div>
38
- </AdminMenu>
39
- ),
40
- };
41
-
42
- export const RealisticUse: Story = {
43
- render: () => (
44
- <div className="relative w-full h-96 border border-dashed border-muted-foreground/30 rounded-lg flex items-center justify-center bg-muted/20">
45
- <div className="absolute bottom-4 right-4">
46
- <AdminMenu>
47
- <div className="space-y-2">
48
- <div className="text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-3 px-2">
49
- Navigation Views
50
- </div>
51
- <button className="w-full px-2 py-1.5 text-sm rounded hover:bg-muted transition-colors text-left">
52
- Calm View
53
- </button>
54
- <button className="w-full px-2 py-1.5 text-sm rounded hover:bg-muted transition-colors text-left">
55
- Rich View
56
- </button>
57
- <button className="w-full px-2 py-1.5 text-sm rounded hover:bg-muted transition-colors text-left">
58
- Editorial View
59
- </button>
60
- </div>
61
- </AdminMenu>
62
- </div>
63
- <span className="text-sm text-muted-foreground">
64
- AdminMenu positioned bottom-right with children
65
- </span>
66
- </div>
67
- ),
68
- };