@keystone-sites/marketing-design-system 1.0.26 → 2.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 (204) hide show
  1. package/README.md +47 -67
  2. package/fonts/gt-america-300-italic.woff2 +0 -0
  3. package/fonts/gt-america-300.woff2 +0 -0
  4. package/fonts/gt-america-400-italic.woff2 +0 -0
  5. package/fonts/gt-america-400.woff2 +0 -0
  6. package/fonts/gt-america-500.woff2 +0 -0
  7. package/fonts/gt-america-extended-300.woff2 +0 -0
  8. package/fonts/gt-america-extended-400.woff2 +0 -0
  9. package/fonts/gt-america-extended-500.woff2 +0 -0
  10. package/fonts/gt-america-extended-700.woff2 +0 -0
  11. package/fonts/gt-america-mono-300.woff2 +0 -0
  12. package/fonts/gt-america-mono-500.woff2 +0 -0
  13. package/fonts/pp-kyoto-vf.woff2 +0 -0
  14. package/package.json +46 -203
  15. package/src/base.css +300 -0
  16. package/src/fonts.css +131 -0
  17. package/src/hue.ts +17 -0
  18. package/src/icon.tsx +56 -0
  19. package/src/mark.tsx +14 -0
  20. package/src/motion.ts +123 -0
  21. package/src/parts/chip.css +84 -0
  22. package/src/parts/chip.tsx +40 -0
  23. package/src/parts/composer.css +195 -0
  24. package/src/parts/composer.tsx +220 -0
  25. package/src/parts/cx.ts +2 -0
  26. package/src/parts/faq.css +77 -0
  27. package/src/parts/faq.tsx +25 -0
  28. package/src/parts/footer.css +51 -0
  29. package/src/parts/footer.tsx +27 -0
  30. package/src/parts/nav.css +180 -0
  31. package/src/parts/nav.tsx +101 -0
  32. package/src/parts/photo.css +15 -0
  33. package/src/parts/photo.tsx +24 -0
  34. package/src/parts/plans.css +89 -0
  35. package/src/parts/plans.tsx +56 -0
  36. package/src/parts/prose.css +86 -0
  37. package/src/parts/prose.tsx +49 -0
  38. package/src/parts/shape.css +47 -0
  39. package/src/parts/shape.tsx +68 -0
  40. package/src/parts/split.tsx +49 -0
  41. package/src/parts/stamp.css +85 -0
  42. package/src/parts/stamp.tsx +36 -0
  43. package/src/parts/work-card.css +51 -0
  44. package/src/parts/work-card.tsx +40 -0
  45. package/src/set.css +439 -0
  46. package/src/styles.css +20 -0
  47. package/src/tokens/color.css +471 -0
  48. package/src/tokens/roles.css +12 -0
  49. package/src/tokens/type.css +11 -0
  50. package/src/wordmark.tsx +34 -0
  51. package/AGENTS.md +0 -192
  52. package/assets/media/brand/ks-lockup.svg +0 -13
  53. package/assets/media/brand/ks-logomark.svg +0 -4
  54. package/assets/media/brand/ks-wordmark-inline.svg +0 -13
  55. package/assets/media/brand/ks-wordmark.svg +0 -11
  56. package/assets/media/fonts/gt-standard-standard-vf.woff2 +0 -0
  57. package/assets/media/fonts/pp-kyoto-variable-upright-vf.woff2 +0 -0
  58. package/base.css +0 -113
  59. package/css-vars.d.ts +0 -10
  60. package/grid/engine.css +0 -367
  61. package/grid/field-hash.ts +0 -31
  62. package/grid/field.tsx +0 -48
  63. package/grid/gates.cjs +0 -35
  64. package/grid/region.tsx +0 -97
  65. package/icons.tsx +0 -1282
  66. package/index.css +0 -89
  67. package/lib/autoplay-gate.ts +0 -88
  68. package/lib/focus-trap.ts +0 -42
  69. package/lib/grader.ts +0 -123
  70. package/lib/legal-data.ts +0 -1
  71. package/lib/legal.ts +0 -41
  72. package/lib/noise.tsx +0 -114
  73. package/lib/phone.ts +0 -294
  74. package/lib/render-boundary.tsx +0 -27
  75. package/lib/scroll-lock.ts +0 -25
  76. package/lib/swipe.ts +0 -124
  77. package/lib/use-active-section.ts +0 -43
  78. package/lib/use-count-up.ts +0 -26
  79. package/lib/use-grader-search.ts +0 -143
  80. package/lib/use-popover.ts +0 -30
  81. package/lib/use-video-carousel.ts +0 -271
  82. package/media.ts +0 -558
  83. package/primitives/breadcrumb.css +0 -51
  84. package/primitives/breadcrumb.tsx +0 -46
  85. package/primitives/business-picker.css +0 -135
  86. package/primitives/business-picker.tsx +0 -298
  87. package/primitives/button-inline.css +0 -52
  88. package/primitives/button-inline.tsx +0 -38
  89. package/primitives/buttons.css +0 -551
  90. package/primitives/buttons.tsx +0 -330
  91. package/primitives/case-study-button.css +0 -71
  92. package/primitives/case-study-button.tsx +0 -28
  93. package/primitives/case-study-card.css +0 -318
  94. package/primitives/case-study-card.tsx +0 -116
  95. package/primitives/chip.css +0 -127
  96. package/primitives/chip.tsx +0 -53
  97. package/primitives/closer-row.css +0 -14
  98. package/primitives/closer-row.tsx +0 -22
  99. package/primitives/cta-row.css +0 -41
  100. package/primitives/cta-row.tsx +0 -39
  101. package/primitives/disclosure.css +0 -302
  102. package/primitives/disclosure.tsx +0 -277
  103. package/primitives/faq-question.css +0 -220
  104. package/primitives/faq-question.tsx +0 -55
  105. package/primitives/field.css +0 -279
  106. package/primitives/field.tsx +0 -376
  107. package/primitives/footer-item.css +0 -72
  108. package/primitives/footer-item.tsx +0 -42
  109. package/primitives/glyph-toggle.css +0 -62
  110. package/primitives/glyph-toggle.tsx +0 -42
  111. package/primitives/grader-menu.tsx +0 -84
  112. package/primitives/grader.css +0 -369
  113. package/primitives/grader.tsx +0 -285
  114. package/primitives/keystone-score.css +0 -156
  115. package/primitives/keystone-score.tsx +0 -204
  116. package/primitives/modal.css +0 -194
  117. package/primitives/modal.tsx +0 -204
  118. package/primitives/month-range.css +0 -80
  119. package/primitives/month-range.tsx +0 -183
  120. package/primitives/notice.css +0 -39
  121. package/primitives/notice.tsx +0 -56
  122. package/primitives/persona-card.css +0 -374
  123. package/primitives/persona-card.tsx +0 -74
  124. package/primitives/picture.css +0 -11
  125. package/primitives/picture.tsx +0 -41
  126. package/primitives/plan-card.css +0 -398
  127. package/primitives/plan-card.tsx +0 -153
  128. package/primitives/prose.css +0 -164
  129. package/primitives/prose.tsx +0 -194
  130. package/primitives/ramps.css +0 -77
  131. package/primitives/report-nav.css +0 -382
  132. package/primitives/report-nav.tsx +0 -353
  133. package/primitives/report.css +0 -601
  134. package/primitives/report.tsx +0 -357
  135. package/primitives/skeleton.css +0 -82
  136. package/primitives/skeleton.tsx +0 -56
  137. package/primitives/slider.css +0 -179
  138. package/primitives/slider.tsx +0 -69
  139. package/primitives/slug.css +0 -87
  140. package/primitives/slug.tsx +0 -37
  141. package/primitives/status.css +0 -427
  142. package/primitives/status.tsx +0 -323
  143. package/primitives/strip.css +0 -40
  144. package/primitives/surface.css +0 -88
  145. package/primitives/surface.tsx +0 -100
  146. package/primitives/table.css +0 -227
  147. package/primitives/table.tsx +0 -122
  148. package/primitives/tabs.css +0 -85
  149. package/primitives/tabs.tsx +0 -122
  150. package/primitives/tag.css +0 -46
  151. package/primitives/tag.tsx +0 -33
  152. package/primitives/text.css +0 -127
  153. package/primitives/toc.css +0 -65
  154. package/primitives/toc.tsx +0 -42
  155. package/primitives/tooltip.css +0 -56
  156. package/primitives/tooltip.tsx +0 -103
  157. package/rules/design-system.md +0 -154
  158. package/rules/grid-and-layout.md +0 -166
  159. package/scripts/generate-exports.mjs +0 -61
  160. package/scripts/generate-type-css.mjs +0 -130
  161. package/sections/faq-island.tsx +0 -102
  162. package/sections/faq.css +0 -213
  163. package/sections/faq.tsx +0 -46
  164. package/sections/footer-nav.tsx +0 -95
  165. package/sections/footer-signature.css +0 -223
  166. package/sections/footer-signature.tsx +0 -127
  167. package/sections/footer.css +0 -735
  168. package/sections/footer.tsx +0 -286
  169. package/sections/gallery-overlay.css +0 -213
  170. package/sections/gallery-overlay.tsx +0 -267
  171. package/sections/landing-benefits.css +0 -59
  172. package/sections/landing-benefits.tsx +0 -81
  173. package/sections/landing-closer.css +0 -23
  174. package/sections/landing-closer.tsx +0 -26
  175. package/sections/landing-hero.css +0 -80
  176. package/sections/landing-hero.tsx +0 -69
  177. package/sections/landing-quote.css +0 -19
  178. package/sections/landing-quote.tsx +0 -30
  179. package/sections/landing-sample.ts +0 -66
  180. package/sections/landing.css +0 -45
  181. package/sections/landing.tsx +0 -69
  182. package/sections/load-orchestrator.tsx +0 -43
  183. package/sections/load.css +0 -138
  184. package/sections/nav-desktop.css +0 -530
  185. package/sections/nav-desktop.tsx +0 -155
  186. package/sections/nav-menu.css +0 -57
  187. package/sections/nav-menu.tsx +0 -112
  188. package/sections/nav-mobile.css +0 -571
  189. package/sections/nav-mobile.tsx +0 -222
  190. package/sections/nav.css +0 -127
  191. package/sections/nav.tsx +0 -394
  192. package/sections/site-chat-data.ts +0 -16
  193. package/sections/site-chat-open.tsx +0 -25
  194. package/sections/site-chat.tsx +0 -67
  195. package/site-links.ts +0 -41
  196. package/site.ts +0 -2
  197. package/themes/inverted.css +0 -139
  198. package/tokens/fonts.css +0 -38
  199. package/tokens/motion.css +0 -150
  200. package/tokens/primitives.css +0 -163
  201. package/tokens/semantic.css +0 -159
  202. package/tokens/type-styles.json +0 -145
  203. package/tokens/type.css +0 -1548
  204. package/widgets.css +0 -78
@@ -0,0 +1,68 @@
1
+ import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
2
+ import type { Hue } from "../hue";
3
+ import { Icon, type IconName } from "../icon";
4
+ import { cx } from "./cx";
5
+
6
+ // Seven shapes in one frame, sized by eye to cover the same ground (Figma › Seven shapes).
7
+ const SHAPES = {
8
+ square: <rect x="10" y="10" width="80" height="80" />,
9
+ circle: <circle cx="50" cy="50" r="45" />,
10
+ diamond: <path d="M50 3 97 50 50 97 3 50Z" />,
11
+ hexagon: <path d="M27 9h46l24 41-24 41H27L3 50Z" />,
12
+ wedge: <path d="M26 12h72L74 88H2Z" />,
13
+ quarter: <path d="M9 9h82a82 82 0 0 1-82 82Z" />,
14
+ triangle: <path d="M50 9 97 90H3Z" />,
15
+ } as const;
16
+
17
+ export type ShapeName = keyof typeof SHAPES;
18
+
19
+ export const SHAPE_NAMES = Object.keys(SHAPES) as ShapeName[];
20
+
21
+ /** One of the seven shapes, in currentColor, 1em square unless sized by class or style. */
22
+ export function Shape({
23
+ name,
24
+ className,
25
+ style,
26
+ }: {
27
+ name: ShapeName;
28
+ className?: string;
29
+ style?: CSSProperties;
30
+ }) {
31
+ return (
32
+ <svg
33
+ className={cx("ks-shape", className)}
34
+ style={style}
35
+ viewBox="0 0 100 100"
36
+ data-shape={name}
37
+ aria-hidden
38
+ >
39
+ {SHAPES[name]}
40
+ </svg>
41
+ );
42
+ }
43
+
44
+ type TileProps = HTMLAttributes<HTMLSpanElement> & {
45
+ shape: ShapeName;
46
+ hue?: Hue;
47
+ strength?: "light" | "full" | "deep";
48
+ icon?: IconName;
49
+ children?: ReactNode;
50
+ };
51
+
52
+ /** A shape holding a glyph: an icon, initials or a count. The hue's full behind its ink. */
53
+ export function Tile({
54
+ shape,
55
+ hue,
56
+ strength = "full",
57
+ icon,
58
+ children,
59
+ className,
60
+ ...rest
61
+ }: TileProps) {
62
+ return (
63
+ <span className={cx("ks-tile", className)} data-hue={hue} data-strength={strength} {...rest}>
64
+ <Shape name={shape} />
65
+ <span className="ks-tile__glyph">{icon ? <Icon name={icon} /> : children}</span>
66
+ </span>
67
+ );
68
+ }
@@ -0,0 +1,49 @@
1
+ import type { CSSProperties } from "react";
2
+ import { cx } from "./cx";
3
+
4
+ type Props = {
5
+ text: string;
6
+ by?: "word" | "char";
7
+ /** The first unit's place in the order, to carry a stagger on from an earlier line. */
8
+ from?: number;
9
+ className?: string;
10
+ style?: CSSProperties;
11
+ };
12
+
13
+ /**
14
+ * Text split into words (or letters) for an entrance: each unit is a `.ks-split__unit` carrying
15
+ * its order as `--i`, inside a `.ks-split__mask` that clips it, so a unit can rise out of its own
16
+ * line. The Set gives them no motion; a page's CSS animates `.ks-split__unit`. Read aloud as the
17
+ * plain text.
18
+ */
19
+ export function Split({ text, by = "word", from = 0, className, style }: Props) {
20
+ const words = text.split(" ");
21
+ let order = from;
22
+ return (
23
+ <span className={cx("ks-split", className)} style={style}>
24
+ <span className="ks-sr">{text}</span>
25
+ {words.map((word, at) => (
26
+ <span key={at} aria-hidden>
27
+ <span className="ks-split__mask">
28
+ {by === "word" ? (
29
+ <span className="ks-split__unit" style={{ "--i": order++ } as CSSProperties}>
30
+ {word}
31
+ </span>
32
+ ) : (
33
+ word.split("").map((char, index) => (
34
+ <span
35
+ key={index}
36
+ className="ks-split__unit"
37
+ style={{ "--i": order++ } as CSSProperties}
38
+ >
39
+ {char}
40
+ </span>
41
+ ))
42
+ )}
43
+ </span>
44
+ {at < words.length - 1 ? " " : null}
45
+ </span>
46
+ ))}
47
+ </span>
48
+ );
49
+ }
@@ -0,0 +1,85 @@
1
+ /* The owner's stamp: the minute, and what their hands were doing. */
2
+ .ks-stamp {
3
+ display: inline-flex;
4
+ align-items: stretch;
5
+ gap: calc(var(--u) * 0.3);
6
+ height: var(--u);
7
+ max-width: 100%;
8
+ }
9
+ .ks-stamp__time {
10
+ display: flex;
11
+ align-items: center;
12
+ padding-inline: calc(var(--u) * 0.3);
13
+ background: var(--ink);
14
+ color: var(--canvas);
15
+ font-family: var(--mono);
16
+ font-weight: var(--mono-weight);
17
+ font-size: var(--fs-stamp);
18
+ font-variant-numeric: tabular-nums;
19
+ white-space: nowrap;
20
+ }
21
+ .ks-stamp__caption {
22
+ display: flex;
23
+ align-items: center;
24
+ min-width: 0;
25
+ padding-inline: calc(var(--u) * 0.35);
26
+ background: var(--white);
27
+ color: var(--ink);
28
+ font-weight: 400;
29
+ font-size: calc(var(--u) * 0.45);
30
+ white-space: nowrap;
31
+ overflow: hidden;
32
+ text-overflow: ellipsis;
33
+ }
34
+ .ks-stamp[data-tone="ink"] .ks-stamp__time {
35
+ background: var(--white);
36
+ color: var(--ink);
37
+ }
38
+ .ks-stamp[data-tone="ink"] .ks-stamp__caption {
39
+ background: var(--char);
40
+ color: var(--text-paper);
41
+ }
42
+
43
+ /* The page's stamp: a key in the hue's deep, and the name of what it marks. */
44
+ .ks-key {
45
+ display: inline-flex;
46
+ align-items: stretch;
47
+ height: var(--u);
48
+ max-width: 100%;
49
+ }
50
+ .ks-key__k {
51
+ display: grid;
52
+ place-items: center;
53
+ width: var(--u);
54
+ flex: none;
55
+ background: var(--h-deep);
56
+ color: var(--h-full);
57
+ font-family: var(--mono);
58
+ font-weight: var(--mono-weight);
59
+ font-size: var(--fs-stamp);
60
+ font-variant-numeric: tabular-nums;
61
+ }
62
+ .ks-key__label {
63
+ display: flex;
64
+ align-items: center;
65
+ padding-inline: calc(var(--u) * 0.3) calc(var(--u) * 0.4);
66
+ background: var(--white);
67
+ color: var(--ink);
68
+ font-weight: 400;
69
+ font-size: calc(var(--u) * 0.4);
70
+ white-space: nowrap;
71
+ }
72
+ .ks-key[data-tone="ink"] .ks-key__label {
73
+ background: var(--char);
74
+ color: var(--text-paper);
75
+ }
76
+ .ks-key[data-tone="plain"] .ks-key__k {
77
+ background: var(--ink);
78
+ color: var(--canvas);
79
+ }
80
+
81
+ @media (max-width: 720px) {
82
+ .ks-stamp__caption {
83
+ font-size: calc(var(--u) * 0.4);
84
+ }
85
+ }
@@ -0,0 +1,36 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { Hue } from "../hue";
3
+ import { cx } from "./cx";
4
+
5
+ type StampProps = HTMLAttributes<HTMLSpanElement> & {
6
+ time: string;
7
+ children: ReactNode;
8
+ tone?: "ink";
9
+ };
10
+
11
+ /** The owner's stamp: the minute, and what their hands were doing. */
12
+ export function Stamp({ time, children, tone, className, ...rest }: StampProps) {
13
+ return (
14
+ <span className={cx("ks-stamp", className)} data-tone={tone} {...rest}>
15
+ <span className="ks-stamp__time">{time}</span>
16
+ <span className="ks-stamp__caption">{children}</span>
17
+ </span>
18
+ );
19
+ }
20
+
21
+ type KeyProps = HTMLAttributes<HTMLSpanElement> & {
22
+ n: string;
23
+ children?: ReactNode;
24
+ hue?: Hue;
25
+ tone?: "ink" | "plain";
26
+ };
27
+
28
+ /** The page's stamp: a numbered key in the hue's deep, and the name of what it marks. */
29
+ export function Key({ n, children, hue, tone, className, ...rest }: KeyProps) {
30
+ return (
31
+ <span className={cx("ks-key", className)} data-hue={hue} data-tone={tone} {...rest}>
32
+ <span className="ks-key__k">{n}</span>
33
+ {children ? <span className="ks-key__label">{children}</span> : null}
34
+ </span>
35
+ );
36
+ }
@@ -0,0 +1,51 @@
1
+ /* The work card: one thing Keystone did, and when. */
2
+
3
+ .ks-work {
4
+ display: flex;
5
+ align-items: center;
6
+ gap: calc(var(--u) * 0.3);
7
+ width: calc(var(--u) * 11);
8
+ max-width: 100%;
9
+ padding: calc(var(--u) * 0.3) calc(var(--u) * 0.5) calc(var(--u) * 0.3) calc(var(--u) * 0.3);
10
+ background: var(--white);
11
+ color: var(--ink);
12
+ border-radius: 12px;
13
+ box-shadow: var(--lift);
14
+ text-align: left;
15
+ }
16
+ .ks-work__body {
17
+ display: grid;
18
+ min-width: 0;
19
+ flex: 1;
20
+ }
21
+ .ks-work__head {
22
+ display: flex;
23
+ align-items: baseline;
24
+ justify-content: space-between;
25
+ gap: 12px;
26
+ }
27
+ .ks-work__title {
28
+ font-weight: 500;
29
+ font-size: var(--fs-body);
30
+ line-height: 1.5;
31
+ white-space: nowrap;
32
+ }
33
+ .ks-work__time {
34
+ font-family: var(--mono);
35
+ font-weight: var(--mono-weight);
36
+ font-size: var(--fs-meta);
37
+ color: var(--soft);
38
+ white-space: nowrap;
39
+ font-variant-numeric: tabular-nums;
40
+ }
41
+ .ks-work__detail {
42
+ font-size: var(--fs-body);
43
+ line-height: 1.5;
44
+ color: var(--soft);
45
+ white-space: nowrap;
46
+ overflow: hidden;
47
+ text-overflow: ellipsis;
48
+ }
49
+ .ks-work[data-wrap] .ks-work__detail {
50
+ white-space: normal;
51
+ }
@@ -0,0 +1,40 @@
1
+ import type { HTMLAttributes } from "react";
2
+ import type { Hue } from "../hue";
3
+ import type { IconName } from "../icon";
4
+ import { cx } from "./cx";
5
+ import { type ShapeName, Tile } from "./shape";
6
+
7
+ export type Work = { title: string; time: string; detail: string };
8
+
9
+ type Props = HTMLAttributes<HTMLDivElement> & {
10
+ work: Work;
11
+ shape?: ShapeName;
12
+ hue?: Hue;
13
+ icon?: IconName;
14
+ /** Lets the detail run onto more lines rather than end in an ellipsis. */
15
+ wrap?: boolean;
16
+ };
17
+
18
+ /** One thing Keystone did, and when: a shape tile, a title, the minute and a line of detail. */
19
+ export function WorkCard({
20
+ work,
21
+ shape = "square",
22
+ hue,
23
+ icon = "check",
24
+ wrap,
25
+ className,
26
+ ...rest
27
+ }: Props) {
28
+ return (
29
+ <div className={cx("ks-work", className)} data-wrap={wrap ? "" : undefined} {...rest}>
30
+ <Tile shape={shape} hue={hue} icon={icon} />
31
+ <div className="ks-work__body">
32
+ <div className="ks-work__head">
33
+ <span className="ks-work__title">{work.title}</span>
34
+ <span className="ks-work__time">{work.time}</span>
35
+ </div>
36
+ <span className="ks-work__detail">{work.detail}</span>
37
+ </div>
38
+ </div>
39
+ );
40
+ }