@keystone-sites/marketing-design-system 1.0.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 (130) hide show
  1. package/AGENTS.md +163 -0
  2. package/README.md +85 -0
  3. package/assets/media/brand/ks-lockup.svg +13 -0
  4. package/assets/media/brand/ks-logomark.svg +4 -0
  5. package/assets/media/brand/ks-wordmark-inline.svg +13 -0
  6. package/assets/media/brand/ks-wordmark.svg +11 -0
  7. package/assets/media/fonts/gt-standard-standard-vf.woff2 +0 -0
  8. package/assets/media/fonts/pp-kyoto-variable-upright-vf.woff2 +0 -0
  9. package/base.css +111 -0
  10. package/css-vars.d.ts +10 -0
  11. package/grid/engine.css +368 -0
  12. package/grid/field-hash.ts +31 -0
  13. package/grid/field.tsx +48 -0
  14. package/grid/gates.cjs +34 -0
  15. package/grid/region.tsx +97 -0
  16. package/icons.tsx +1224 -0
  17. package/index.css +77 -0
  18. package/lib/autoplay-gate.ts +88 -0
  19. package/lib/focus-trap.ts +42 -0
  20. package/lib/grader.ts +131 -0
  21. package/lib/legal-data.ts +1 -0
  22. package/lib/legal.ts +41 -0
  23. package/lib/noise.tsx +114 -0
  24. package/lib/render-boundary.tsx +27 -0
  25. package/lib/scroll-lock.ts +25 -0
  26. package/lib/swipe.ts +124 -0
  27. package/lib/use-active-section.ts +43 -0
  28. package/lib/use-count-up.ts +26 -0
  29. package/lib/use-grader-search.ts +118 -0
  30. package/lib/use-video-carousel.ts +271 -0
  31. package/media.ts +558 -0
  32. package/package.json +201 -0
  33. package/primitives/button-inline.css +52 -0
  34. package/primitives/button-inline.tsx +38 -0
  35. package/primitives/buttons.css +449 -0
  36. package/primitives/buttons.tsx +263 -0
  37. package/primitives/case-study-button.css +71 -0
  38. package/primitives/case-study-button.tsx +28 -0
  39. package/primitives/case-study-card.css +318 -0
  40. package/primitives/case-study-card.tsx +116 -0
  41. package/primitives/closer-row.css +14 -0
  42. package/primitives/closer-row.tsx +22 -0
  43. package/primitives/cta-row.css +41 -0
  44. package/primitives/cta-row.tsx +39 -0
  45. package/primitives/disclosure.css +210 -0
  46. package/primitives/disclosure.tsx +144 -0
  47. package/primitives/faq-question.css +220 -0
  48. package/primitives/faq-question.tsx +55 -0
  49. package/primitives/field.css +225 -0
  50. package/primitives/field.tsx +266 -0
  51. package/primitives/footer-item.css +72 -0
  52. package/primitives/footer-item.tsx +42 -0
  53. package/primitives/grader-menu.tsx +84 -0
  54. package/primitives/grader.css +302 -0
  55. package/primitives/grader.tsx +284 -0
  56. package/primitives/modal.css +151 -0
  57. package/primitives/modal.tsx +90 -0
  58. package/primitives/notice.css +39 -0
  59. package/primitives/notice.tsx +56 -0
  60. package/primitives/persona-card.css +374 -0
  61. package/primitives/persona-card.tsx +74 -0
  62. package/primitives/picture.css +11 -0
  63. package/primitives/picture.tsx +41 -0
  64. package/primitives/plan-card.css +378 -0
  65. package/primitives/plan-card.tsx +91 -0
  66. package/primitives/prose.css +118 -0
  67. package/primitives/prose.tsx +170 -0
  68. package/primitives/ramps.css +84 -0
  69. package/primitives/slider.css +179 -0
  70. package/primitives/slider.tsx +69 -0
  71. package/primitives/slug.css +87 -0
  72. package/primitives/slug.tsx +37 -0
  73. package/primitives/status.css +298 -0
  74. package/primitives/status.tsx +222 -0
  75. package/primitives/strip.css +40 -0
  76. package/primitives/surface.css +78 -0
  77. package/primitives/surface.tsx +95 -0
  78. package/primitives/table.css +226 -0
  79. package/primitives/table.tsx +122 -0
  80. package/primitives/tabs.css +85 -0
  81. package/primitives/tabs.tsx +122 -0
  82. package/primitives/text.css +110 -0
  83. package/primitives/toc.css +65 -0
  84. package/primitives/toc.tsx +42 -0
  85. package/rules/design-system.md +154 -0
  86. package/rules/grid-and-layout.md +166 -0
  87. package/scripts/generate-exports.mjs +61 -0
  88. package/scripts/generate-type-css.mjs +130 -0
  89. package/sections/faq-island.tsx +102 -0
  90. package/sections/faq.css +213 -0
  91. package/sections/faq.tsx +46 -0
  92. package/sections/footer-nav.tsx +95 -0
  93. package/sections/footer-signature.css +183 -0
  94. package/sections/footer-signature.tsx +114 -0
  95. package/sections/footer.css +735 -0
  96. package/sections/footer.tsx +283 -0
  97. package/sections/gallery-overlay.css +213 -0
  98. package/sections/gallery-overlay.tsx +267 -0
  99. package/sections/landing-benefits.css +59 -0
  100. package/sections/landing-benefits.tsx +81 -0
  101. package/sections/landing-closer.css +23 -0
  102. package/sections/landing-closer.tsx +26 -0
  103. package/sections/landing-hero.css +80 -0
  104. package/sections/landing-hero.tsx +69 -0
  105. package/sections/landing-quote.css +19 -0
  106. package/sections/landing-quote.tsx +30 -0
  107. package/sections/landing-sample.ts +66 -0
  108. package/sections/landing.css +45 -0
  109. package/sections/landing.tsx +69 -0
  110. package/sections/load-orchestrator.tsx +43 -0
  111. package/sections/load.css +138 -0
  112. package/sections/nav-desktop.css +530 -0
  113. package/sections/nav-desktop.tsx +155 -0
  114. package/sections/nav-mobile.css +571 -0
  115. package/sections/nav-mobile.tsx +222 -0
  116. package/sections/nav.css +126 -0
  117. package/sections/nav.tsx +394 -0
  118. package/sections/site-chat-data.ts +16 -0
  119. package/sections/site-chat-open.tsx +25 -0
  120. package/sections/site-chat.tsx +67 -0
  121. package/site-links.ts +36 -0
  122. package/site.ts +2 -0
  123. package/themes/inverted.css +139 -0
  124. package/tokens/fonts.css +38 -0
  125. package/tokens/motion.css +125 -0
  126. package/tokens/primitives.css +163 -0
  127. package/tokens/semantic.css +153 -0
  128. package/tokens/type-styles.json +145 -0
  129. package/tokens/type.css +1548 -0
  130. package/widgets.css +78 -0
@@ -0,0 +1,183 @@
1
+ /* The signature footer (sections/footer-signature.tsx): a two-cell
2
+ signature — tagline beside the lockup — over one legal line, framed by
3
+ the lattice. Stacked in rm/rs, side by side from rt. Type is fixed per
4
+ band (site chrome); a band that steps restates --font/--ls. */
5
+
6
+ /* Designed constants for this file. */
7
+ :root {
8
+ --fsig-dot: 6px;
9
+ --fsig-dot-rs: 8px;
10
+ --fsig-lockup-ratio: 380 / 61;
11
+ }
12
+
13
+ .fsig {
14
+ position: relative;
15
+ min-height: calc(var(--t) * 8);
16
+ }
17
+
18
+ .fsig-signature {
19
+ position: relative;
20
+ display: grid;
21
+ grid-template-rows: repeat(2, calc(var(--t) * 3));
22
+ width: calc(var(--t) * 10 + 1px);
23
+ min-height: calc(var(--t) * 6 + 1px);
24
+ margin-top: calc(var(--t));
25
+ margin-left: var(--t);
26
+ }
27
+
28
+ .fsig-statement,
29
+ .fsig-lockband {
30
+ box-sizing: border-box;
31
+ min-width: 0;
32
+ overflow: hidden;
33
+ border: 1px solid var(--line);
34
+ display: flex;
35
+ align-items: center;
36
+ }
37
+
38
+ .fsig-statement {
39
+ gap: var(--space-sm);
40
+ padding: var(--space-lg);
41
+ }
42
+
43
+ .fsig-tagline {
44
+ max-width: 100%;
45
+ margin: 0;
46
+ color: var(--color-text-200);
47
+ }
48
+
49
+ .fsig-dot {
50
+ flex: none;
51
+ width: var(--fsig-dot);
52
+ height: var(--fsig-dot);
53
+ border-radius: var(--radius-full);
54
+ background: var(--color-orange-400);
55
+ }
56
+
57
+ .fsig-lockband {
58
+ justify-content: center;
59
+ margin-top: -1px;
60
+ }
61
+
62
+ .fsig-lockup {
63
+ display: block;
64
+ width: min(calc(var(--t) * 5), 82%);
65
+ max-width: calc(100% - var(--space-2xl) - var(--space-2xl));
66
+ max-height: calc(100% - var(--space-xl) - var(--space-xl));
67
+ aspect-ratio: var(--fsig-lockup-ratio);
68
+ background-color: var(--color-text-200);
69
+ -webkit-mask-image: url("/media/brand/ks-lockup.svg");
70
+ mask-image: url("/media/brand/ks-lockup.svg");
71
+ -webkit-mask-size: contain;
72
+ mask-size: contain;
73
+ -webkit-mask-repeat: no-repeat;
74
+ mask-repeat: no-repeat;
75
+ -webkit-mask-position: center;
76
+ mask-position: center;
77
+ }
78
+
79
+ .fsig-copy {
80
+ box-sizing: border-box;
81
+ border: 1px solid var(--line);
82
+ width: calc(var(--t) * 10 + 1px);
83
+ margin-left: var(--t);
84
+ min-height: calc(var(--t) + 1px);
85
+ display: flex;
86
+ flex-wrap: wrap;
87
+ align-items: center;
88
+ justify-content: center;
89
+ gap: var(--space-xs) var(--space-lg);
90
+ padding: var(--space-md) calc(var(--t));
91
+ color: var(--color-text-500);
92
+ }
93
+
94
+ .fsig-legal-links {
95
+ display: flex;
96
+ flex-wrap: wrap;
97
+ justify-content: center;
98
+ gap: var(--space-xs) var(--space-lg);
99
+ }
100
+
101
+ .fsig-copy a,
102
+ .fsig-legal-preferences {
103
+ color: inherit;
104
+ text-decoration: none;
105
+ }
106
+
107
+ .fsig-legal-preferences {
108
+ appearance: none;
109
+ border: 0;
110
+ padding: 0;
111
+ background: transparent;
112
+ font: inherit;
113
+ cursor: pointer;
114
+ }
115
+
116
+ .fsig-copy a:focus-visible,
117
+ .fsig-legal-preferences:focus-visible {
118
+ outline: none;
119
+ box-shadow: 0 0 0 var(--ring-w) var(--color-bg-400);
120
+ }
121
+
122
+ @container (--rs) {
123
+ .fsig-statement {
124
+ gap: var(--space-md);
125
+ padding: var(--space-xl);
126
+ }
127
+ .fsig-tagline {
128
+ --font: var(--ts-display-serif-sm-light-font);
129
+ --ls: var(--ts-display-serif-sm-light-ls);
130
+ }
131
+ .fsig-dot {
132
+ width: var(--fsig-dot-rs);
133
+ height: var(--fsig-dot-rs);
134
+ }
135
+ }
136
+
137
+ @container (--rt) {
138
+ .fsig {
139
+ min-height: calc(var(--t) * 5);
140
+ }
141
+ .fsig-signature {
142
+ grid-template-columns: 1fr 1fr;
143
+ grid-template-rows: none;
144
+ min-height: calc(var(--t) * 3 + 1px);
145
+ }
146
+ .fsig-statement {
147
+ padding-inline: var(--space-3xl);
148
+ }
149
+ .fsig-lockup {
150
+ width: min(calc(var(--t) * 4.5), 70%);
151
+ }
152
+ .fsig-lockband {
153
+ margin-top: 0;
154
+ margin-left: -1px;
155
+ }
156
+ .fsig-copy {
157
+ flex-wrap: nowrap;
158
+ justify-content: space-between;
159
+ padding-inline: var(--t);
160
+ }
161
+ .fsig-legal-links {
162
+ flex-wrap: nowrap;
163
+ gap: var(--space-xl);
164
+ }
165
+ }
166
+
167
+ @container (--rd2) {
168
+ .fsig-statement {
169
+ padding-inline: var(--space-5xl);
170
+ }
171
+ .fsig-tagline {
172
+ --font: var(--ts-display-serif-md-light-font);
173
+ --ls: var(--ts-display-serif-md-light-ls);
174
+ }
175
+ .fsig-copy {
176
+ --font: var(--ts-text-sm-light-font);
177
+ --ls: var(--ts-text-sm-light-ls);
178
+ --opsz: var(--ts-text-sm-light-opsz);
179
+ }
180
+ .fsig-legal-links {
181
+ gap: var(--space-5xl);
182
+ }
183
+ }
@@ -0,0 +1,114 @@
1
+ import { CookiePreferencesLink } from "@keystone-sites/widgets/consent/CookiePreferencesLink";
2
+ import { GridRegion, GridDecor, type GridBand } from "../grid/region";
3
+
4
+ /** The compact footer for a product page: a tagline and the lockup side
5
+ * by side (stacked in the narrow bands) over one line of legal links.
6
+ * The full marketing footer is sections/footer.tsx. */
7
+
8
+ export interface FooterSignatureCopy {
9
+ tagline: string;
10
+ lockupAlt: string;
11
+ copyright: string;
12
+ legal: { terms: string; privacy: string; accessibility: string; cookies: string };
13
+ }
14
+
15
+ export interface FooterSignatureLinks {
16
+ terms: string;
17
+ privacy: string;
18
+ accessibility: string;
19
+ }
20
+
21
+ interface R {
22
+ gx: number;
23
+ gy: number;
24
+ gw?: number;
25
+ gh?: number;
26
+ }
27
+ interface Orn extends R {
28
+ shape: "square" | "circle" | "outline";
29
+ }
30
+ interface BandMap {
31
+ regions: R[];
32
+ ornaments: Orn[];
33
+ }
34
+
35
+ function footerMap(stacked: boolean): BandMap {
36
+ const sideCells = stacked ? 7 : 4;
37
+ const bottomRow = stacked ? 7 : 4;
38
+ return {
39
+ regions: [
40
+ { gx: 0, gy: 0, gw: 12, gh: 1 },
41
+ { gx: 0, gy: 1, gw: 1, gh: sideCells },
42
+ { gx: 11, gy: 1, gw: 1, gh: sideCells },
43
+ { gx: 0, gy: bottomRow, gw: 12, gh: 1 },
44
+ ],
45
+ ornaments: [
46
+ { gx: 8, gy: 0, shape: "square" },
47
+ { gx: 3, gy: bottomRow, shape: "circle" },
48
+ ],
49
+ };
50
+ }
51
+
52
+ const BANDS: GridBand[] = ["rm", "rs", "rt", "rd1", "rd2"];
53
+ const FOOTER_MAP: Record<GridBand, BandMap> = {
54
+ rm: footerMap(true),
55
+ rs: footerMap(true),
56
+ rt: footerMap(false),
57
+ rd1: footerMap(false),
58
+ rd2: footerMap(false),
59
+ };
60
+
61
+ const ORNAMENT_CLASS: Record<Orn["shape"], string> = {
62
+ square: "f-cell fill",
63
+ circle: "f-cell fill round",
64
+ outline: "f-cell round",
65
+ };
66
+
67
+ function Overlay({ maps }: { maps: Record<GridBand, BandMap> }) {
68
+ return (
69
+ <div className="gx" aria-hidden="true">
70
+ {BANDS.map((band) => [
71
+ ...maps[band].regions.map((r, i) => (
72
+ <GridRegion key={`${band}-r${i}`} band={band} {...r} />
73
+ )),
74
+ ...maps[band].ornaments.map((o, i) => (
75
+ <GridDecor key={`${band}-o${i}`} band={band} gx={o.gx} gy={o.gy}>
76
+ <span className={ORNAMENT_CLASS[o.shape]} />
77
+ </GridDecor>
78
+ )),
79
+ ])}
80
+ </div>
81
+ );
82
+ }
83
+
84
+ export function FooterSignature({
85
+ copy,
86
+ links,
87
+ }: {
88
+ copy: FooterSignatureCopy;
89
+ links: FooterSignatureLinks;
90
+ }) {
91
+ return (
92
+ <footer className="sec fsig">
93
+ <Overlay maps={FOOTER_MAP} />
94
+ <div className="fsig-signature" data-landmark="signature">
95
+ <div className="fsig-statement">
96
+ <span className="fsig-dot" aria-hidden="true" />
97
+ <p className="type type-fixed ts-display-serif-xs-light fsig-tagline">{copy.tagline}</p>
98
+ </div>
99
+ <div className="fsig-lockband">
100
+ <div className="fsig-lockup" role="img" aria-label={copy.lockupAlt} />
101
+ </div>
102
+ </div>
103
+ <div className="type type-fixed ts-text-xs-light fsig-copy">
104
+ <span>{copy.copyright}</span>
105
+ <div className="fsig-legal-links">
106
+ <a href={links.terms}>{copy.legal.terms}</a>
107
+ <a href={links.privacy}>{copy.legal.privacy}</a>
108
+ <a href={links.accessibility}>{copy.legal.accessibility}</a>
109
+ <CookiePreferencesLink label={copy.legal.cookies} className="fsig-legal-preferences" />
110
+ </div>
111
+ </div>
112
+ </footer>
113
+ );
114
+ }