@lets-ship/site 1.0.1 → 3.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 (211) hide show
  1. package/dist/blog/article-view.d.ts.map +1 -1
  2. package/dist/blog/article-view.js +2 -1
  3. package/dist/blog/article-view.js.map +1 -1
  4. package/dist/blog/batches.d.ts +13 -0
  5. package/dist/blog/batches.d.ts.map +1 -0
  6. package/dist/blog/batches.js +17 -0
  7. package/dist/blog/batches.js.map +1 -0
  8. package/dist/blog/index-view.d.ts +5 -0
  9. package/dist/blog/index-view.d.ts.map +1 -1
  10. package/dist/blog/index-view.js +25 -8
  11. package/dist/blog/index-view.js.map +1 -1
  12. package/dist/blog/more-posts.d.ts +17 -0
  13. package/dist/blog/more-posts.d.ts.map +1 -0
  14. package/dist/blog/more-posts.js +65 -0
  15. package/dist/blog/more-posts.js.map +1 -0
  16. package/dist/config/site-config.d.ts +49 -2
  17. package/dist/config/site-config.d.ts.map +1 -1
  18. package/dist/config/site-config.js +46 -1
  19. package/dist/config/site-config.js.map +1 -1
  20. package/dist/i18n/tables/de.d.ts.map +1 -1
  21. package/dist/i18n/tables/de.js +17 -0
  22. package/dist/i18n/tables/de.js.map +1 -1
  23. package/dist/i18n/tables/en.d.ts.map +1 -1
  24. package/dist/i18n/tables/en.js +17 -0
  25. package/dist/i18n/tables/en.js.map +1 -1
  26. package/dist/i18n/tables/es.d.ts.map +1 -1
  27. package/dist/i18n/tables/es.js +17 -0
  28. package/dist/i18n/tables/es.js.map +1 -1
  29. package/dist/i18n/tables/fr.d.ts.map +1 -1
  30. package/dist/i18n/tables/fr.js +17 -0
  31. package/dist/i18n/tables/fr.js.map +1 -1
  32. package/dist/i18n/tables/nl.d.ts.map +1 -1
  33. package/dist/i18n/tables/nl.js +17 -0
  34. package/dist/i18n/tables/nl.js.map +1 -1
  35. package/dist/i18n/tables/pt.d.ts.map +1 -1
  36. package/dist/i18n/tables/pt.js +17 -0
  37. package/dist/i18n/tables/pt.js.map +1 -1
  38. package/dist/i18n/tables/tr.d.ts.map +1 -1
  39. package/dist/i18n/tables/tr.js +17 -0
  40. package/dist/i18n/tables/tr.js.map +1 -1
  41. package/dist/i18n/types.d.ts +27 -0
  42. package/dist/i18n/types.d.ts.map +1 -1
  43. package/dist/layout/footer.d.ts +9 -5
  44. package/dist/layout/footer.d.ts.map +1 -1
  45. package/dist/layout/footer.js +71 -8
  46. package/dist/layout/footer.js.map +1 -1
  47. package/dist/layout/frame.d.ts +14 -0
  48. package/dist/layout/frame.d.ts.map +1 -0
  49. package/dist/layout/frame.js +15 -0
  50. package/dist/layout/frame.js.map +1 -0
  51. package/dist/layout/header-menu.d.ts +27 -0
  52. package/dist/layout/header-menu.d.ts.map +1 -0
  53. package/dist/layout/header-menu.js +89 -0
  54. package/dist/layout/header-menu.js.map +1 -0
  55. package/dist/layout/header.d.ts +12 -0
  56. package/dist/layout/header.d.ts.map +1 -0
  57. package/dist/layout/header.js +101 -0
  58. package/dist/layout/header.js.map +1 -0
  59. package/dist/layout/nav-width.d.ts +29 -0
  60. package/dist/layout/nav-width.d.ts.map +1 -0
  61. package/dist/layout/nav-width.js +32 -0
  62. package/dist/layout/nav-width.js.map +1 -0
  63. package/dist/layout/nav.d.ts +13 -0
  64. package/dist/layout/nav.d.ts.map +1 -0
  65. package/dist/layout/nav.js +5 -0
  66. package/dist/layout/nav.js.map +1 -0
  67. package/dist/layout/root.d.ts.map +1 -1
  68. package/dist/layout/root.js +8 -1
  69. package/dist/layout/root.js.map +1 -1
  70. package/dist/mdx/allow-list.d.ts +10 -2
  71. package/dist/mdx/allow-list.d.ts.map +1 -1
  72. package/dist/mdx/allow-list.js +12 -2
  73. package/dist/mdx/allow-list.js.map +1 -1
  74. package/dist/mdx/components.d.ts +4 -1
  75. package/dist/mdx/components.d.ts.map +1 -1
  76. package/dist/mdx/components.js +18 -4
  77. package/dist/mdx/components.js.map +1 -1
  78. package/dist/mdx/tones.d.ts +11 -0
  79. package/dist/mdx/tones.d.ts.map +1 -0
  80. package/dist/mdx/tones.js +43 -0
  81. package/dist/mdx/tones.js.map +1 -0
  82. package/dist/node/build.js +1 -1
  83. package/dist/node/build.js.map +1 -1
  84. package/dist/node/content.d.ts +7 -2
  85. package/dist/node/content.d.ts.map +1 -1
  86. package/dist/node/content.js +17 -7
  87. package/dist/node/content.js.map +1 -1
  88. package/dist/node/errors.d.ts +1 -0
  89. package/dist/node/errors.d.ts.map +1 -1
  90. package/dist/node/errors.js +2 -1
  91. package/dist/node/errors.js.map +1 -1
  92. package/dist/site/app.d.ts.map +1 -1
  93. package/dist/site/app.js +3 -2
  94. package/dist/site/app.js.map +1 -1
  95. package/dist/site/site-page.d.ts.map +1 -1
  96. package/dist/site/site-page.js +4 -4
  97. package/dist/site/site-page.js.map +1 -1
  98. package/dist/website/blocks/announcement-dismiss.d.ts +13 -0
  99. package/dist/website/blocks/announcement-dismiss.d.ts.map +1 -0
  100. package/dist/website/blocks/announcement-dismiss.js +49 -0
  101. package/dist/website/blocks/announcement-dismiss.js.map +1 -0
  102. package/dist/website/blocks/announcement-views.d.ts +24 -0
  103. package/dist/website/blocks/announcement-views.d.ts.map +1 -0
  104. package/dist/website/blocks/announcement-views.js +31 -0
  105. package/dist/website/blocks/announcement-views.js.map +1 -0
  106. package/dist/website/blocks/button.d.ts +21 -0
  107. package/dist/website/blocks/button.d.ts.map +1 -0
  108. package/dist/website/blocks/button.js +32 -0
  109. package/dist/website/blocks/button.js.map +1 -0
  110. package/dist/website/blocks/call-to-action-views.d.ts +15 -0
  111. package/dist/website/blocks/call-to-action-views.d.ts.map +1 -0
  112. package/dist/website/blocks/call-to-action-views.js +36 -0
  113. package/dist/website/blocks/call-to-action-views.js.map +1 -0
  114. package/dist/website/blocks/card-grid-views.d.ts +41 -0
  115. package/dist/website/blocks/card-grid-views.d.ts.map +1 -0
  116. package/dist/website/blocks/card-grid-views.js +94 -0
  117. package/dist/website/blocks/card-grid-views.js.map +1 -0
  118. package/dist/website/blocks/carousel-controls.d.ts +13 -0
  119. package/dist/website/blocks/carousel-controls.d.ts.map +1 -0
  120. package/dist/website/blocks/carousel-controls.js +48 -0
  121. package/dist/website/blocks/carousel-controls.js.map +1 -0
  122. package/dist/website/blocks/carousel.d.ts +16 -0
  123. package/dist/website/blocks/carousel.d.ts.map +1 -0
  124. package/dist/website/blocks/carousel.js +12 -0
  125. package/dist/website/blocks/carousel.js.map +1 -0
  126. package/dist/website/blocks/catalog.d.ts +45 -0
  127. package/dist/website/blocks/catalog.d.ts.map +1 -0
  128. package/dist/website/blocks/catalog.js +35 -0
  129. package/dist/website/blocks/catalog.js.map +1 -0
  130. package/dist/website/blocks/commerce.d.ts +10 -16
  131. package/dist/website/blocks/commerce.d.ts.map +1 -1
  132. package/dist/website/blocks/commerce.js +12 -13
  133. package/dist/website/blocks/commerce.js.map +1 -1
  134. package/dist/website/blocks/contact-views.d.ts +28 -0
  135. package/dist/website/blocks/contact-views.d.ts.map +1 -0
  136. package/dist/website/blocks/contact-views.js +55 -0
  137. package/dist/website/blocks/contact-views.js.map +1 -0
  138. package/dist/website/blocks/content.d.ts +15 -20
  139. package/dist/website/blocks/content.d.ts.map +1 -1
  140. package/dist/website/blocks/content.js +20 -9
  141. package/dist/website/blocks/content.js.map +1 -1
  142. package/dist/website/blocks/empty-state-views.d.ts +32 -0
  143. package/dist/website/blocks/empty-state-views.d.ts.map +1 -0
  144. package/dist/website/blocks/empty-state-views.js +39 -0
  145. package/dist/website/blocks/empty-state-views.js.map +1 -0
  146. package/dist/website/blocks/faq-views.d.ts +20 -0
  147. package/dist/website/blocks/faq-views.d.ts.map +1 -0
  148. package/dist/website/blocks/faq-views.js +38 -0
  149. package/dist/website/blocks/faq-views.js.map +1 -0
  150. package/dist/website/blocks/feature-views.d.ts +17 -0
  151. package/dist/website/blocks/feature-views.d.ts.map +1 -0
  152. package/dist/website/blocks/feature-views.js +40 -0
  153. package/dist/website/blocks/feature-views.js.map +1 -0
  154. package/dist/website/blocks/hero-views.d.ts +18 -0
  155. package/dist/website/blocks/hero-views.d.ts.map +1 -0
  156. package/dist/website/blocks/hero-views.js +27 -0
  157. package/dist/website/blocks/hero-views.js.map +1 -0
  158. package/dist/website/blocks/icons.d.ts +63 -0
  159. package/dist/website/blocks/icons.d.ts.map +1 -0
  160. package/dist/website/blocks/icons.js +63 -0
  161. package/dist/website/blocks/icons.js.map +1 -0
  162. package/dist/website/blocks/list.d.ts +20 -0
  163. package/dist/website/blocks/list.d.ts.map +1 -0
  164. package/dist/website/blocks/list.js +29 -0
  165. package/dist/website/blocks/list.js.map +1 -0
  166. package/dist/website/blocks/local-views.d.ts +60 -0
  167. package/dist/website/blocks/local-views.d.ts.map +1 -0
  168. package/dist/website/blocks/local-views.js +38 -0
  169. package/dist/website/blocks/local-views.js.map +1 -0
  170. package/dist/website/blocks/local.d.ts +15 -0
  171. package/dist/website/blocks/local.d.ts.map +1 -0
  172. package/dist/website/blocks/local.js +15 -0
  173. package/dist/website/blocks/local.js.map +1 -0
  174. package/dist/website/blocks/logo-stats-views.d.ts +29 -0
  175. package/dist/website/blocks/logo-stats-views.d.ts.map +1 -0
  176. package/dist/website/blocks/logo-stats-views.js +51 -0
  177. package/dist/website/blocks/logo-stats-views.js.map +1 -0
  178. package/dist/website/blocks/marketing.d.ts +11 -22
  179. package/dist/website/blocks/marketing.d.ts.map +1 -1
  180. package/dist/website/blocks/marketing.js +12 -14
  181. package/dist/website/blocks/marketing.js.map +1 -1
  182. package/dist/website/blocks/media-views.d.ts +17 -0
  183. package/dist/website/blocks/media-views.d.ts.map +1 -0
  184. package/dist/website/blocks/media-views.js +24 -0
  185. package/dist/website/blocks/media-views.js.map +1 -0
  186. package/dist/website/blocks/newsletter-views.d.ts +26 -0
  187. package/dist/website/blocks/newsletter-views.d.ts.map +1 -0
  188. package/dist/website/blocks/newsletter-views.js +44 -0
  189. package/dist/website/blocks/newsletter-views.js.map +1 -0
  190. package/dist/website/blocks/parts.d.ts +45 -2
  191. package/dist/website/blocks/parts.d.ts.map +1 -1
  192. package/dist/website/blocks/parts.js +31 -4
  193. package/dist/website/blocks/parts.js.map +1 -1
  194. package/dist/website/blocks/sections.d.ts +27 -0
  195. package/dist/website/blocks/sections.d.ts.map +1 -0
  196. package/dist/website/blocks/sections.js +27 -0
  197. package/dist/website/blocks/sections.js.map +1 -0
  198. package/dist/website/blocks/team-views.d.ts +24 -0
  199. package/dist/website/blocks/team-views.d.ts.map +1 -0
  200. package/dist/website/blocks/team-views.js +45 -0
  201. package/dist/website/blocks/team-views.js.map +1 -0
  202. package/dist/website/blocks/testimonial-views.d.ts +24 -0
  203. package/dist/website/blocks/testimonial-views.d.ts.map +1 -0
  204. package/dist/website/blocks/testimonial-views.js +68 -0
  205. package/dist/website/blocks/testimonial-views.js.map +1 -0
  206. package/dist/website/blocks/variant.d.ts +35 -0
  207. package/dist/website/blocks/variant.d.ts.map +1 -0
  208. package/dist/website/blocks/variant.js +74 -0
  209. package/dist/website/blocks/variant.js.map +1 -0
  210. package/package.json +3 -2
  211. package/styles.css +1291 -42
@@ -0,0 +1,94 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ * Card layouts, adapted from HyperUI's cards and blog cards
4
+ * (https://github.com/markmead/hyperui, MIT, Copyright (c) Mark Mead): colours, type and radii
5
+ * come from the brand instead of fixed Tailwind colours.
6
+ */
7
+ import Link from "next/link";
8
+ import { BLOCK_VARIANTS } from "./catalog.js";
9
+ import { BlockIcon } from "./icons.js";
10
+ import { gridColumns, keyed } from "./list.js";
11
+ import { ActionLink, BlockImg, Section } from "./parts.js";
12
+ import { BlockPropError, filled, required } from "./variant.js";
13
+ export const CARD_GRID_VARIANTS = BLOCK_VARIANTS.CardGrid;
14
+ const imageOf = (item, variant) => required("CardGrid", variant, "image", item.image, `add an image to "${item.title}"`);
15
+ /** The title, as the card's link when it has one: the link covers the whole card. */
16
+ function Title({ item, className }) {
17
+ return (_jsx("h3", { className: className, children: item.href ? (_jsx(Link, { href: item.href, className: "site-card-link", children: item.title })) : (item.title) }));
18
+ }
19
+ /** The eyebrow and the date over a title, when the card has them. */
20
+ function Meta({ item }) {
21
+ if (!item.eyebrow && !item.date)
22
+ return null;
23
+ return (_jsxs("p", { className: "site-card-meta mb-1 flex flex-wrap gap-x-3", children: [item.eyebrow ? _jsx("span", { className: "site-card-eyebrow", children: item.eyebrow }) : null, item.date ? _jsx("span", { children: item.date }) : null] }));
24
+ }
25
+ /** "Read more" under a linked card. The title is the link's name, so readers skip these words. */
26
+ function More({ item, strings }) {
27
+ if (!item.href)
28
+ return null;
29
+ return (_jsxs("span", { className: "site-card-more mt-4 inline-flex items-center gap-1", "aria-hidden": "true", children: [strings.readMore, _jsx(BlockIcon, { name: "arrow-right", className: "size-4 rtl:rotate-180" })] }));
30
+ }
31
+ /** The block's own look, and the icon and tags layouts: a framed card with the words in it. */
32
+ function FramedCard({ item, variant, strings }) {
33
+ const image = variant === "image" ? imageOf(item, variant) : undefined;
34
+ const tags = variant === "tags" ? tagsOf(item) : [];
35
+ const icon = variant === "icon" ? required("CardGrid", variant, "icon", item.icon, `add an icon to "${item.title}"`) : undefined;
36
+ const linked = item.href ? " site-card-linked" : "";
37
+ return (_jsxs("article", { className: `site-card-frame relative flex flex-col overflow-hidden${linked}`, children: [image ? _jsx(BlockImg, { image: image, className: "h-56 w-full object-cover" }) : null, _jsxs("div", { className: "flex flex-1 flex-col p-4 sm:p-6", children: [icon ? (_jsx("span", { className: "site-icon-box mb-4 self-start", children: _jsx(BlockIcon, { name: icon, className: "size-6" }) })) : null, _jsx(Meta, { item: item }), _jsx(Title, { item: item, className: "site-card-title" }), item.text ? _jsx("p", { className: "site-card-text line-clamp-3", children: item.text }) : null, tags.length > 0 ? _jsx(Tags, { tags: tags }) : null, _jsx(More, { item: item, strings: strings })] })] }));
38
+ }
39
+ function tagsOf(item) {
40
+ if (!item.tags || item.tags.length === 0)
41
+ throw new BlockPropError("CardGrid", "tags", "tags", `add tags={["..."]} to "${item.title}"`);
42
+ return item.tags;
43
+ }
44
+ function Tags({ tags }) {
45
+ return (_jsx("ul", { className: "mt-4 flex flex-wrap gap-1", children: keyed(tags).map(({ key, item: tag }) => (_jsx("li", { className: "site-tag", children: tag }, key))) }));
46
+ }
47
+ /** A rounded picture and the words under it, with no frame. */
48
+ function PlainCard({ item, strings }) {
49
+ return (_jsxs("article", { className: "relative flex flex-col", children: [_jsx(BlockImg, { image: imageOf(item, "plain"), className: "site-media-image h-56 w-full object-cover" }), _jsxs("div", { className: "pt-4", children: [_jsx(Meta, { item: item }), _jsx(Title, { item: item, className: "site-card-title" }), item.text ? _jsx("p", { className: "site-card-text line-clamp-3", children: item.text }) : null, _jsx(More, { item: item, strings: strings })] })] }));
50
+ }
51
+ /** The picture fills the card, and the words sit on a band of the brand colour at its foot. */
52
+ function OverlayCard({ item }) {
53
+ return (_jsxs("article", { className: "site-card-overlay relative isolate flex min-h-80 flex-col justify-end overflow-hidden", children: [_jsx(BlockImg, { image: imageOf(item, "overlay"), className: "absolute inset-0 -z-10 h-full w-full object-cover" }), _jsx("span", { className: "site-card-overlay-fade block h-12", "aria-hidden": "true" }), _jsxs("div", { className: "site-card-overlay-words p-4 pt-0 sm:p-6 sm:pt-0", children: [_jsx(Meta, { item: item }), _jsx(Title, { item: item, className: "site-card-title" }), item.text ? _jsx("p", { className: "line-clamp-2", children: item.text }) : null] })] }));
54
+ }
55
+ /** One row: a small picture when the item has one, and the words beside it. */
56
+ function ListCard({ item, strings }) {
57
+ const linked = item.href ? " site-card-linked" : "";
58
+ return (_jsxs("article", { className: `site-card-frame relative flex items-start gap-4 p-4 sm:p-6${linked}`, children: [item.image ? _jsx(BlockImg, { image: item.image, className: "site-thumb size-16 flex-none object-cover" }) : null, _jsxs("div", { className: "min-w-0", children: [_jsx(Meta, { item: item }), _jsx(Title, { item: item, className: "site-card-title" }), item.text ? _jsx("p", { className: "site-card-text line-clamp-2", children: item.text }) : null, _jsx(More, { item: item, strings: strings })] })] }));
59
+ }
60
+ function Card(props) {
61
+ if (props.variant === "plain")
62
+ return _jsx(PlainCard, { ...props });
63
+ if (props.variant === "overlay")
64
+ return _jsx(OverlayCard, { ...props });
65
+ if (props.variant === "list")
66
+ return _jsx(ListCard, { ...props });
67
+ return _jsx(FramedCard, { ...props });
68
+ }
69
+ /**
70
+ * The cards the block shows: all of them, or the first `limit`. A static page holds every item it
71
+ * renders, so a long list is cut here and the rest live on the page `more` links to; a limit with
72
+ * no link would hide cards with no way to reach them.
73
+ */
74
+ function shown(variant, props) {
75
+ const items = filled("CardGrid", variant, "items", props.items);
76
+ if (props.limit === undefined)
77
+ return items;
78
+ if (!Number.isInteger(props.limit) || props.limit < 1)
79
+ throw new BlockPropError("CardGrid", variant, "limit", `give a whole number of cards, 1 or more, not ${props.limit}`);
80
+ if (props.more === undefined)
81
+ throw new BlockPropError("CardGrid", variant, "more", 'add a link to the page with every card, such as more={{ label: "See all posts", href: "/blog/" }}, because limit hides the rest');
82
+ return items.slice(0, props.limit);
83
+ }
84
+ /**
85
+ * A grid of cards that each lead somewhere: posts, guides, case studies, products of a service.
86
+ * The layouts differ in what a card shows first: a picture, an icon, its tags, or a row. With
87
+ * `more`, a link under the cards leads to the page with all of them.
88
+ */
89
+ export function cardGridView(variant, props) {
90
+ const items = shown(variant, props);
91
+ const list = variant === "list";
92
+ return (_jsxs(Section, { name: "CardGrid", id: props.id, tone: props.tone, title: props.title, intro: props.intro, children: [_jsx("div", { className: list ? "flex max-w-3xl flex-col gap-4" : "site-grid", "data-cols": list ? undefined : gridColumns(items.length, 3), "data-variant": variant === "image" ? undefined : variant, children: keyed(items).map(({ key, item }) => (_jsx(Card, { item: item, variant: variant, strings: props.strings }, key))) }), props.more ? (_jsx("div", { className: list ? "mt-8 flex" : "mt-10 flex justify-center", "data-more": "", children: _jsx(ActionLink, { action: props.more, secondary: true }) })) : null] }));
93
+ }
94
+ //# sourceMappingURL=card-grid-views.js.map
@@ -0,0 +1 @@
1
+ {"version":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,SAAS,CAAC,CAAC,CAAC,OAAO,YAEtD,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACpC,KAAC,IAAI,IAAW,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,IAAzD,GAAG,CAA0D,CACxE,CAAC,GACG,EACL,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CACb,cAAK,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,2BAA2B,eAAY,EAAE,YAC7E,KAAC,UAAU,IAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,SAAG,GACvC,CACN,CAAC,CAAC,CAAC,IAAI,IACC,CACV,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The one part of a carousel that runs in the browser: the buttons that move its row back and on
3
+ * by one view. The row itself is a list that scrolls with CSS scroll-snap, so it works by touch,
4
+ * trackpad and keyboard before this part loads. A button turns off at its end of the row, and the
5
+ * pair hides (keeping its space, so nothing moves) while the row fits with no scrolling.
6
+ */
7
+ import { type ReactElement } from "react";
8
+ /** The previous and next buttons of a carousel, with the site's words for their hidden labels. */
9
+ export declare function CarouselControls({ previous, next, }: {
10
+ readonly previous: string;
11
+ readonly next: string;
12
+ }): ReactElement;
13
+ //# sourceMappingURL=carousel-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel-controls.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/carousel-controls.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,YAAY,EAA+C,MAAM,OAAO,CAAC;AAyCvF,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,EAChC,QAAQ,EACR,IAAI,GACJ,EAAE;IACF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,GAAG,YAAY,CAyBf"}
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * The one part of a carousel that runs in the browser: the buttons that move its row back and on
5
+ * by one view. The row itself is a list that scrolls with CSS scroll-snap, so it works by touch,
6
+ * trackpad and keyboard before this part loads. A button turns off at its end of the row, and the
7
+ * pair hides (keeping its space, so nothing moves) while the row fits with no scrolling.
8
+ */
9
+ import { useEffect, useRef, useState } from "react";
10
+ import { BlockIcon } from "./icons.js";
11
+ // A row that scrolled to within a pixel of an end is at that end: scroll positions are fractional.
12
+ const SLACK = 1;
13
+ const trackOf = (controls) => controls?.closest("[data-carousel]")?.querySelector(".site-carousel-track") ?? null;
14
+ function edgesOf(track) {
15
+ const end = track.scrollWidth - track.clientWidth;
16
+ return { fits: end <= SLACK, atStart: track.scrollLeft <= SLACK, atEnd: track.scrollLeft >= end - SLACK };
17
+ }
18
+ /** Follows the row's scroll position and size, so the buttons know which ends they are at. */
19
+ function useEdges(ref) {
20
+ const [edges, setEdges] = useState({ fits: false, atStart: true, atEnd: false });
21
+ useEffect(() => {
22
+ const track = trackOf(ref.current);
23
+ if (!track)
24
+ return;
25
+ const update = () => setEdges(edgesOf(track));
26
+ update();
27
+ track.addEventListener("scroll", update, { passive: true });
28
+ const resize = new ResizeObserver(update);
29
+ resize.observe(track);
30
+ return () => {
31
+ track.removeEventListener("scroll", update);
32
+ resize.disconnect();
33
+ };
34
+ }, [ref]);
35
+ return edges;
36
+ }
37
+ /** Moves the row by the width it shows; the stylesheet's scroll-behavior decides whether it glides. */
38
+ function move(controls, direction) {
39
+ const track = trackOf(controls);
40
+ track?.scrollBy({ left: direction * track.clientWidth });
41
+ }
42
+ /** The previous and next buttons of a carousel, with the site's words for their hidden labels. */
43
+ export function CarouselControls({ previous, next, }) {
44
+ const ref = useRef(null);
45
+ const edges = useEdges(ref);
46
+ return (_jsxs("div", { ref: ref, className: "site-carousel-controls", "data-fits": edges.fits ? "" : undefined, children: [_jsxs("button", { type: "button", className: "site-carousel-button", disabled: edges.atStart, onClick: () => move(ref.current, -1), children: [_jsx("span", { className: "sr-only", children: previous }), _jsx(BlockIcon, { name: "arrow-left", className: "size-4" })] }), _jsxs("button", { type: "button", className: "site-carousel-button", disabled: edges.atEnd, onClick: () => move(ref.current, 1), children: [_jsx("span", { className: "sr-only", children: next }), _jsx(BlockIcon, { name: "arrow-right", className: "size-4" })] })] }));
47
+ }
48
+ //# sourceMappingURL=carousel-controls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel-controls.js","sourceRoot":"","sources":["../../../src/website/blocks/carousel-controls.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;GAKG;AACH,OAAO,EAAqC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,mGAAmG;AACnG,MAAM,KAAK,GAAG,CAAC,CAAC;AAEhB,MAAM,OAAO,GAAG,CAAC,QAA4B,EAAsB,EAAE,CACpE,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAc,sBAAsB,CAAC,IAAI,IAAI,CAAC;AAElG,SAAS,OAAO,CAAC,KAAkB;IAClC,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IAClD,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,IAAI,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,IAAI,GAAG,GAAG,KAAK,EAAE,CAAC;AAC3G,CAAC;AAED,8FAA8F;AAC9F,SAAS,QAAQ,CAAC,GAAqC;IACtD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAQ,EA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EAAC,wBAAwB,eAAY,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,aACvF,kBACC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,sBAAsB,EAChC,QAAQ,EAAE,KAAK,CAAC,OAAO,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,aAEpC,eAAM,SAAS,EAAC,SAAS,YAAE,QAAQ,GAAQ,EAC3C,KAAC,SAAS,IAAC,IAAI,EAAC,YAAY,EAAC,SAAS,EAAC,QAAQ,GAAG,IAC1C,EACT,kBACC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,sBAAsB,EAChC,QAAQ,EAAE,KAAK,CAAC,KAAK,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,aAEnC,eAAM,SAAS,EAAC,SAAS,YAAE,IAAI,GAAQ,EACvC,KAAC,SAAS,IAAC,IAAI,EAAC,aAAa,EAAC,SAAS,EAAC,QAAQ,GAAG,IAC3C,IACJ,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { ReactElement, ReactNode } from "react";
2
+ import type { SiteStrings } from "../../i18n/strings.js";
3
+ /**
4
+ * A row of items that scrolls sideways, one snap point per item, with the buttons that move it by
5
+ * one view. `kind` sets the width of an item: a card shows about three at a time on a wide
6
+ * screen and one with the next peeking on a phone; a logo keeps its own width.
7
+ */
8
+ export declare function CarouselRow<T>({ kind, label, items, strings, render, }: {
9
+ readonly kind: "cards" | "logos";
10
+ /** The name of the row for assistive technology, the block's title when it has one. */
11
+ readonly label?: string;
12
+ readonly items: readonly T[];
13
+ readonly strings: SiteStrings;
14
+ readonly render: (item: T) => ReactNode;
15
+ }): ReactElement;
16
+ //# sourceMappingURL=carousel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/carousel.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAC9B,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAM,GACN,EAAE;IACF,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACjC,uFAAuF;IACvF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;CACxC,GAAG,YAAY,CAcf"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CarouselControls } from "./carousel-controls.js";
3
+ import { keyed } from "./list.js";
4
+ /**
5
+ * A row of items that scrolls sideways, one snap point per item, with the buttons that move it by
6
+ * one view. `kind` sets the width of an item: a card shows about three at a time on a wide
7
+ * screen and one with the next peeking on a phone; a logo keeps its own width.
8
+ */
9
+ export function CarouselRow({ kind, label, items, strings, render, }) {
10
+ return (_jsxs("div", { className: "site-carousel", "data-carousel": "", "data-variant": "carousel", children: [_jsx("ul", { className: "site-carousel-track", "data-kind": kind, tabIndex: 0, "aria-label": label, children: keyed(items).map(({ key, item }) => (_jsx("li", { className: "site-carousel-item", children: render(item) }, key))) }), _jsx(CarouselControls, { previous: strings.previous, next: strings.next })] }));
11
+ }
12
+ //# sourceMappingURL=carousel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../../src/website/blocks/carousel.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAI,EAC9B,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAM,GAQN;IACA,OAAO,CACN,eAAK,SAAS,EAAC,eAAe,mBAAe,EAAE,kBAAc,UAAU,aAEtE,aAAI,SAAS,EAAC,qBAAqB,eAAY,IAAI,EAAE,QAAQ,EAAE,CAAC,gBAAc,KAAK,YACjF,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACpC,aAAc,SAAS,EAAC,oBAAoB,YAC1C,MAAM,CAAC,IAAI,CAAC,IADL,GAAG,CAEP,CACL,CAAC,GACE,EACL,KAAC,gBAAgB,IAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,GAAI,IAC/D,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Every website block with its variants, the first being the block's own look. A block with no
3
+ * `variant` prop has an empty list. The views take their lists from here, and tools that show the
4
+ * blocks (a gallery, docs, the visual tests) read it too, so a new variant has one place to go.
5
+ * Pure data: it imports no view, so plain Node can read it.
6
+ */
7
+ import type { WEBSITE_BLOCKS } from "../../mdx/allow-list.js";
8
+ export type WebsiteBlockName = (typeof WEBSITE_BLOCKS)[number];
9
+ /**
10
+ * The background of a block, from the brand's section roles: the page itself, a quiet wash of the
11
+ * brand, a dark band or a band in the brand colour. A page alternates them to mark where one idea
12
+ * ends; the brand DNA's `composition.tones` says which ones a page of the brand uses.
13
+ */
14
+ export declare const SECTION_TONES: readonly ["base", "tint", "inverse", "brand"];
15
+ export type SectionTone = (typeof SECTION_TONES)[number];
16
+ export declare const BLOCK_VARIANTS: {
17
+ readonly Hero: readonly ["split", "centered", "left"];
18
+ readonly FeatureGrid: readonly ["cards", "split", "centered", "inline"];
19
+ readonly Steps: readonly [];
20
+ readonly Pricing: readonly [];
21
+ readonly Testimonials: readonly ["cards", "quote", "grid", "reviews", "carousel"];
22
+ readonly LogoCloud: readonly ["row", "grid", "tiles", "carousel"];
23
+ readonly Stats: readonly ["cards", "outlined", "divided", "tinted"];
24
+ readonly Faq: readonly ["cards", "boxed", "divided", "bar"];
25
+ readonly CallToAction: readonly ["card", "split", "inset", "gallery"];
26
+ readonly Team: readonly ["cards", "photos", "avatars"];
27
+ readonly Contact: readonly ["links", "form", "split"];
28
+ readonly Announcement: readonly ["bar", "floating"];
29
+ readonly Newsletter: readonly ["start", "centered", "panel"];
30
+ readonly MediaSection: readonly ["split", "wide", "wide-reversed", "stacked"];
31
+ readonly CardGrid: readonly ["image", "plain", "overlay", "icon", "tags", "list"];
32
+ readonly EmptyState: readonly ["actions", "links", "signup"];
33
+ readonly PriceList: readonly ["rows", "columns"];
34
+ readonly Hours: readonly ["table", "split"];
35
+ readonly Location: readonly ["split", "stacked"];
36
+ };
37
+ /**
38
+ * The common components that sit inside text rather than in a band of their own, with their
39
+ * variants. The first is the component's own look, as with a block.
40
+ */
41
+ export declare const INLINE_VARIANTS: {
42
+ readonly Button: readonly ["primary", "secondary", "ghost", "icon"];
43
+ };
44
+ export type InlineComponentName = keyof typeof INLINE_VARIANTS;
45
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/catalog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,aAAa,+CAAgD,CAAC;AAC3E,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;CAoB+C,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,eAAe;;CAElB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,eAAe,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The background of a block, from the brand's section roles: the page itself, a quiet wash of the
3
+ * brand, a dark band or a band in the brand colour. A page alternates them to mark where one idea
4
+ * ends; the brand DNA's `composition.tones` says which ones a page of the brand uses.
5
+ */
6
+ export const SECTION_TONES = ["base", "tint", "inverse", "brand"];
7
+ export const BLOCK_VARIANTS = {
8
+ Hero: ["split", "centered", "left"],
9
+ FeatureGrid: ["cards", "split", "centered", "inline"],
10
+ Steps: [],
11
+ Pricing: [],
12
+ Testimonials: ["cards", "quote", "grid", "reviews", "carousel"],
13
+ LogoCloud: ["row", "grid", "tiles", "carousel"],
14
+ Stats: ["cards", "outlined", "divided", "tinted"],
15
+ Faq: ["cards", "boxed", "divided", "bar"],
16
+ CallToAction: ["card", "split", "inset", "gallery"],
17
+ Team: ["cards", "photos", "avatars"],
18
+ Contact: ["links", "form", "split"],
19
+ Announcement: ["bar", "floating"],
20
+ Newsletter: ["start", "centered", "panel"],
21
+ MediaSection: ["split", "wide", "wide-reversed", "stacked"],
22
+ CardGrid: ["image", "plain", "overlay", "icon", "tags", "list"],
23
+ EmptyState: ["actions", "links", "signup"],
24
+ PriceList: ["rows", "columns"],
25
+ Hours: ["table", "split"],
26
+ Location: ["split", "stacked"],
27
+ };
28
+ /**
29
+ * The common components that sit inside text rather than in a band of their own, with their
30
+ * variants. The first is the component's own look, as with a block.
31
+ */
32
+ export const INLINE_VARIANTS = {
33
+ Button: ["primary", "secondary", "ghost", "icon"],
34
+ };
35
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+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,CAAC;IAC1C,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAC9B,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;CAC2C,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC;CACxC,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import type { ReactElement } from "react";
2
+ import { type ContactProps, type ContactVariant } from "./contact-views.js";
3
+ import { type FaqProps, type FaqVariant } from "./faq-views.js";
2
4
  import { type Action } from "./parts.js";
3
5
  type Plan = {
4
6
  readonly name: string;
@@ -11,7 +13,9 @@ type Plan = {
11
13
  readonly highlight?: boolean;
12
14
  };
13
15
  /** Plans side by side. Prices are text, so the content says the currency and the terms. */
14
- export declare function Pricing({ title, intro, plans, }: {
16
+ export declare function Pricing({ id, tone, title, intro, plans, }: {
17
+ readonly id?: string;
18
+ readonly tone?: string;
15
19
  readonly title?: string;
16
20
  readonly intro?: string;
17
21
  readonly plans: readonly Plan[];
@@ -20,22 +24,12 @@ export declare function Pricing({ title, intro, plans, }: {
20
24
  * Questions and answers, each open on click, with the same list as FAQPage structured data, so
21
25
  * the markup never says what the page does not.
22
26
  */
23
- export declare function Faq({ title, items, }: {
24
- readonly title?: string;
25
- readonly items: ReadonlyArray<{
26
- readonly q: string;
27
- readonly a: string;
28
- }>;
27
+ export declare function Faq({ variant, ...props }: FaqProps & {
28
+ readonly variant?: FaqVariant;
29
29
  }): ReactElement;
30
- /**
31
- * How to reach the people behind the site. A static site has no server for a form, so it is a
32
- * set of links the visitor's own mail and phone apps open.
33
- */
34
- export declare function Contact({ title, email, phone, address, }: {
35
- readonly title?: string;
36
- readonly email?: string;
37
- readonly phone?: string;
38
- readonly address?: string;
30
+ /** How to reach the people behind the site: links, a form, or both. */
31
+ export declare function Contact({ variant, ...props }: ContactProps & {
32
+ readonly variant?: ContactVariant;
39
33
  }): ReactElement;
40
34
  export {};
41
35
  //# sourceMappingURL=commerce.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commerce.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/commerce.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,KAAK,MAAM,EAAuB,MAAM,YAAY,CAAC;AAE9D,KAAK,IAAI,GAAG;IACX,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAqBF,2FAA2F;AAC3F,wBAAgB,OAAO,CAAC,EACvB,KAAK,EACL,KAAK,EACL,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CAChC,GAAG,YAAY,CAUf;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,EACnB,KAAK,EACL,KAAK,GACL,EAAE;IACF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CA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M,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CAChC,GAAG,YAAY,CAUf;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,CAAA;CAAE,GAAG,YAAY,CAErG;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,GAAG,YAAY,CAEjH"}
@@ -1,26 +1,25 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { faqNode } from "../../seo/article.js";
3
- import { JsonLd } from "../../seo/json-ld.js";
2
+ import { CONTACT_VARIANTS, contactView } from "./contact-views.js";
3
+ import { FAQ_VARIANTS, faqView } from "./faq-views.js";
4
+ import { gridColumns, keyed } from "./list.js";
4
5
  import { ActionLink, Section } from "./parts.js";
6
+ import { filled, variantOf } from "./variant.js";
5
7
  function PlanCard({ plan }) {
6
- return (_jsxs("li", { className: plan.highlight ? "site-card site-card-highlight" : "site-card", children: [_jsx("h3", { className: "site-card-title", children: plan.name }), _jsxs("p", { className: "site-price", children: [plan.price, plan.period ? _jsxs("span", { className: "site-card-text", children: [" ", plan.period] }) : null] }), plan.description ? _jsx("p", { className: "site-card-text", children: plan.description }) : null, _jsx("ul", { className: "site-card-text my-4 flex flex-col gap-1", children: plan.features.map((feature) => (_jsx("li", { children: feature }, feature))) }), _jsx(ActionLink, { action: plan.action, secondary: !plan.highlight })] }));
8
+ return (_jsxs("li", { className: plan.highlight ? "site-card site-card-highlight" : "site-card", children: [_jsx("h3", { className: "site-card-title", children: plan.name }), _jsxs("p", { className: "site-price", children: [plan.price, plan.period ? _jsxs("span", { className: "site-card-text", children: [" ", plan.period] }) : null] }), plan.description ? _jsx("p", { className: "site-card-text", children: plan.description }) : null, _jsx("ul", { className: "site-card-text my-4 flex flex-col gap-1", children: keyed(plan.features).map(({ key, item: feature }) => (_jsx("li", { children: feature }, key))) }), _jsx(ActionLink, { action: plan.action, secondary: !plan.highlight })] }));
7
9
  }
8
10
  /** Plans side by side. Prices are text, so the content says the currency and the terms. */
9
- export function Pricing({ title, intro, plans, }) {
10
- return (_jsx(Section, { name: "Pricing", title: title, intro: intro, children: _jsx("ul", { className: "grid gap-6 md:grid-cols-3", children: plans.map((plan) => (_jsx(PlanCard, { plan: plan }, plan.name))) }) }));
11
+ export function Pricing({ id, tone, title, intro, plans, }) {
12
+ return (_jsx(Section, { name: "Pricing", id: id, tone: tone, title: title, intro: intro, children: _jsx("ul", { className: "site-grid", "data-cols": gridColumns(plans.length, 3), children: keyed(filled("Pricing", undefined, "plans", plans)).map(({ key, item: plan }) => (_jsx(PlanCard, { plan: plan }, key))) }) }));
11
13
  }
12
14
  /**
13
15
  * Questions and answers, each open on click, with the same list as FAQPage structured data, so
14
16
  * the markup never says what the page does not.
15
17
  */
16
- export function Faq({ title, items, }) {
17
- return (_jsxs(Section, { name: "Faq", title: title, children: [_jsx(JsonLd, { json: JSON.stringify(faqNode(items)) }), _jsx("div", { className: "flex flex-col gap-3", children: items.map((item) => (_jsxs("details", { className: "site-card", children: [_jsx("summary", { className: "site-card-title cursor-pointer", children: item.q }), _jsx("p", { className: "site-card-text mt-2", children: item.a })] }, item.q))) })] }));
18
+ export function Faq({ variant, ...props }) {
19
+ return faqView(variantOf("Faq", variant, FAQ_VARIANTS), props);
18
20
  }
19
- /**
20
- * How to reach the people behind the site. A static site has no server for a form, so it is a
21
- * set of links the visitor's own mail and phone apps open.
22
- */
23
- export function Contact({ title, email, phone, address, }) {
24
- return (_jsx(Section, { name: "Contact", title: title, children: _jsxs("ul", { className: "site-card flex flex-col gap-2", children: [email ? (_jsx("li", { children: _jsx("a", { href: `mailto:${email}`, className: "site-text-link", children: email }) })) : null, phone ? (_jsx("li", { children: _jsx("a", { href: `tel:${phone.replace(/\s+/g, "")}`, className: "site-text-link", children: phone }) })) : null, address ? _jsx("li", { className: "site-card-text", children: address }) : null] }) }));
21
+ /** How to reach the people behind the site: links, a form, or both. */
22
+ export function Contact({ variant, ...props }) {
23
+ return contactView(variantOf("Contact", variant, CONTACT_VARIANTS), props);
25
24
  }
26
25
  //# sourceMappingURL=commerce.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commerce.js","sourceRoot":"","sources":["../../../src/website/blocks/commerce.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAe,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAa9D,SAAS,QAAQ,CAAC,EAAE,IAAI,EAA2B;IAClD,OAAO,CACN,cAAI,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,WAAW,aAC5E,aAAI,SAAS,EAAC,iBAAiB,YAAE,IAAI,CAAC,IAAI,GAAM,EAChD,aAAG,SAAS,EAAC,YAAY,aACvB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAM,SAAS,EAAC,gBAAgB,kBAAG,IAAI,CAAC,MAAM,IAAQ,CAAC,CAAC,CAAC,IAAI,IACzE,EACH,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,gBAAgB,YAAE,IAAI,CAAC,WAAW,GAAK,CAAC,CAAC,CAAC,IAAI,EAC/E,aAAI,SAAS,EAAC,yCAAyC,YACrD,IA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AAI,EAAE,IAAI,IAAf,GAAG,CAAgB,CAClC,CAAC,GACE,GACI,CACV,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAgD;IACtF,OAAO,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAwD;IAClG,OAAO,WAAW,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type ReactElement } from "react";
2
+ import type { SiteStrings } from "../../i18n/strings.js";
3
+ import { type Anchor } from "./parts.js";
4
+ export declare const CONTACT_VARIANTS: readonly ["links", "form", "split"];
5
+ export type ContactVariant = (typeof CONTACT_VARIANTS)[number];
6
+ export type ContactProps = Anchor & {
7
+ readonly title?: string;
8
+ readonly intro?: string;
9
+ readonly email?: string;
10
+ readonly phone?: string;
11
+ readonly address?: string;
12
+ /**
13
+ * Where the form posts, for the form and split layouts. A static site has no server of its
14
+ * own, so this is the site's form service or its own Worker route.
15
+ */
16
+ readonly action?: string;
17
+ /** Adds a phone field to the form. */
18
+ readonly phoneField?: boolean;
19
+ /** The topics a visitor picks from; a subject field appears when there are any. */
20
+ readonly subjects?: readonly string[];
21
+ readonly strings: SiteStrings;
22
+ };
23
+ /**
24
+ * How to reach the people behind the site: links the visitor's own apps open, a form that posts
25
+ * to the site's form service, or both side by side.
26
+ */
27
+ export declare function contactView(variant: ContactVariant, props: ContactProps): ReactElement;
28
+ //# sourceMappingURL=contact-views.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/contact-views.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,EAAE,KAAK,MAAM,EAAsB,MAAM,YAAY,CAAC;AAG7D,eAAO,MAAM,gBAAgB,qCAAyB,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,sCAAsC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC9B,CAAC;AAqIF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,CAatF"}
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ * Contact layouts. The form and split layouts are adapted from HyperUI's contact forms
4
+ * (https://github.com/markmead/hyperui, MIT, Copyright (c) Mark Mead): colours, type and radii
5
+ * come from the brand instead of fixed Tailwind colours.
6
+ */
7
+ import { useId } from "react";
8
+ import { BLOCK_VARIANTS } from "./catalog.js";
9
+ import { BlockIcon } from "./icons.js";
10
+ import { keyed } from "./list.js";
11
+ import { bandAttrs, Section } from "./parts.js";
12
+ import { required } from "./variant.js";
13
+ export const CONTACT_VARIANTS = BLOCK_VARIANTS.Contact;
14
+ const telHref = (phone) => `tel:${phone.replace(/\s+/g, "")}`;
15
+ /** The block's own look: links the visitor's mail and phone apps open, and the address. */
16
+ function LinkList(props) {
17
+ return (_jsxs("ul", { className: "site-card flex flex-col gap-2", children: [props.email ? (_jsx("li", { children: _jsx("a", { href: `mailto:${props.email}`, className: "site-text-link", children: props.email }) })) : null, props.phone ? (_jsx("li", { children: _jsx("a", { href: telHref(props.phone), className: "site-text-link", children: props.phone }) })) : null, props.address ? _jsx("li", { className: "site-card-text", children: props.address }) : null] }));
18
+ }
19
+ function Field({ id, label, children, }) {
20
+ return (_jsxs("div", { children: [_jsx("label", { htmlFor: id, className: "site-label", children: label }), children] }));
21
+ }
22
+ /** The form: name, email, the optional phone and subject, and the message. */
23
+ function ContactForm({ props, variant }) {
24
+ const action = required("Contact", variant, "action", props.action, 'add action="<the URL the form posts to>"');
25
+ const s = props.strings;
26
+ // Two forms on one page (a form and a split block) must not share field ids, or a label
27
+ // names the other form's field.
28
+ const base = useId();
29
+ const id = (field) => `${base}-${field}`;
30
+ return (_jsxs("form", { method: "post", action: action, className: "site-form flex flex-col gap-4", children: [_jsx(Field, { id: id("name"), label: s.formName, children: _jsx("input", { id: id("name"), name: "name", type: "text", autoComplete: "name", required: true, className: "site-input" }) }), _jsx(Field, { id: id("email"), label: s.formEmail, children: _jsx("input", { id: id("email"), name: "email", type: "email", autoComplete: "email", required: true, className: "site-input" }) }), props.phoneField ? (_jsx(Field, { id: id("phone"), label: s.formPhone, children: _jsx("input", { id: id("phone"), name: "phone", type: "tel", autoComplete: "tel", className: "site-input" }) })) : null, props.subjects && props.subjects.length > 0 ? (_jsx(Field, { id: id("subject"), label: s.formSubject, children: _jsx("select", { id: id("subject"), name: "subject", className: "site-input", children: keyed(props.subjects).map(({ key, item: subject }) => (_jsx("option", { children: subject }, key))) }) })) : null, _jsx(Field, { id: id("message"), label: s.formMessage, children: _jsx("textarea", { id: id("message"), name: "message", rows: 5, required: true, className: "site-input resize-y" }) }), _jsx("button", { type: "submit", className: "site-button justify-center", children: s.formSend })] }));
31
+ }
32
+ /** The ways to reach the site's people, each after its icon. */
33
+ function Details(props) {
34
+ const s = props.strings;
35
+ const rows = [
36
+ props.phone ? { label: s.formPhone, icon: "phone", value: props.phone, href: telHref(props.phone) } : null,
37
+ props.email ? { label: s.formEmail, icon: "envelope", value: props.email, href: `mailto:${props.email}` } : null,
38
+ props.address ? { label: s.contactAddress, icon: "map-pin", value: props.address, href: undefined } : null,
39
+ ].filter((row) => row !== null);
40
+ return (_jsx("dl", { className: "mt-6 flex flex-col gap-3", children: keyed(rows).map(({ key, item: row }) => (_jsxs("div", { children: [_jsx("dt", { className: "sr-only", children: row.label }), _jsxs("dd", { className: "site-contact-detail grid grid-cols-[24px_1fr] items-center gap-2", children: [_jsx(BlockIcon, { name: row.icon, className: "size-5" }), row.href ? (_jsx("a", { href: row.href, className: "site-text-link", children: row.value })) : (_jsx("span", { children: row.value }))] })] }, key))) }));
41
+ }
42
+ /** The heading, intro and details on one side, the form on the other. */
43
+ function SplitContact(props) {
44
+ return (_jsx("section", { ...bandAttrs("Contact", props, "site-block"), "data-variant": "split", children: _jsxs("div", { className: "site-container site-split-end", children: [_jsxs("div", { children: [props.title ? _jsx("h2", { className: "site-block-title", children: props.title }) : null, props.intro ? _jsx("p", { className: "site-block-intro", children: props.intro }) : null, _jsx(Details, { ...props })] }), _jsx("div", { className: "site-card", children: _jsx(ContactForm, { props: props, variant: "split" }) })] }) }));
45
+ }
46
+ /**
47
+ * How to reach the people behind the site: links the visitor's own apps open, a form that posts
48
+ * to the site's form service, or both side by side.
49
+ */
50
+ export function contactView(variant, props) {
51
+ if (variant === "split")
52
+ return _jsx(SplitContact, { ...props });
53
+ return (_jsx(Section, { name: "Contact", id: props.id, tone: props.tone, title: props.title, intro: props.intro, children: variant === "links" ? (_jsx(LinkList, { ...props })) : (_jsx("div", { className: "site-card max-w-xl", "data-variant": "form", children: _jsx(ContactForm, { props: props, variant: "form" }) })) }));
54
+ }
55
+ //# sourceMappingURL=contact-views.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-views.js","sourceRoot":"","sources":["../../../src/website/blocks/contact-views.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,OAAO,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAe,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC;AAqBvD,MAAM,OAAO,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;AAE9E,2FAA2F;AAC3F,SAAS,QAAQ,CAAC,KAAmB;IACpC,OAAO,CACN,cAAI,SAAS,EAAC,+BAA+B,aAC3C,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,uBACC,YAAG,IAAI,EAAE,UAAU,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAC,gBAAgB,YAC1D,KAAK,CAAC,KAAK,GACT,GACA,CACL,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,uBACC,YAAG,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAC,gBAAgB,YACvD,KAAK,CAAC,KAAK,GACT,GACA,CACL,CAAC,CAAC,CAAC,IAAI,E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K,CAAC,KAAK,YAC5F,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CACtB,KAAC,QAAQ,OAAK,KAAK,GAAI,CACvB,CAAC,CAAC,CAAC,CACH,cAAK,SAAS,EAAC,oBAAoB,kBAAc,MAAM,YACtD,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAC,MAAM,GAAG,GACvC,CACN,GACQ,CACV,CAAC;AACH,CAAC"}
@@ -1,41 +1,36 @@
1
1
  import type { ReactElement, ReactNode } from "react";
2
- import { type BlockImage } from "./parts.js";
2
+ import { type FeatureGridProps, type FeatureGridVariant } from "./feature-views.js";
3
+ import { type TeamProps, type TeamVariant } from "./team-views.js";
4
+ import { type TestimonialsProps, type TestimonialsVariant } from "./testimonial-views.js";
3
5
  type Item = {
4
6
  readonly title: string;
5
7
  readonly text: string;
6
8
  };
7
9
  /** What the product or service offers, as a grid of short cards. */
8
- export declare function FeatureGrid({ title, intro, items, }: {
9
- readonly title?: string;
10
- readonly intro?: string;
11
- readonly items: readonly Item[];
10
+ export declare function FeatureGrid({ variant, ...props }: FeatureGridProps & {
11
+ readonly variant?: FeatureGridVariant;
12
12
  }): ReactElement;
13
13
  /**
14
14
  * Numbered steps. With `items` it is a website block: a band of numbered cards. With children it
15
15
  * is the docs form, fumadocs' Steps, so one name serves both kinds of page.
16
16
  */
17
- export declare function Steps({ title, items, children, }: {
17
+ export declare function Steps({ id, tone, title, intro, items, children, }: {
18
+ /** The website block's anchor; the docs form has its headings for that. */
19
+ readonly id?: string;
20
+ /** The website block's section tone (SECTION_TONES). */
21
+ readonly tone?: string;
18
22
  readonly title?: string;
23
+ readonly intro?: string;
19
24
  readonly items?: readonly Item[];
20
25
  readonly children?: ReactNode;
21
26
  }): ReactElement;
22
27
  /** What customers say, each quote with the person who said it. */
23
- export declare function Testimonials({ title, items, }: {
24
- readonly title?: string;
25
- readonly items: ReadonlyArray<{
26
- readonly quote: string;
27
- readonly name: string;
28
- readonly role?: string;
29
- }>;
28
+ export declare function Testimonials({ variant, ...props }: TestimonialsProps & {
29
+ readonly variant?: TestimonialsVariant;
30
30
  }): ReactElement;
31
31
  /** The people behind the site, each with a role and an optional photo. */
32
- export declare function Team({ title, members, }: {
33
- readonly title?: string;
34
- readonly members: ReadonlyArray<{
35
- readonly name: string;
36
- readonly role: string;
37
- readonly image?: BlockImage;
38
- }>;
32
+ export declare function Team({ variant, ...props }: TeamProps & {
33
+ readonly variant?: TeamVariant;
39
34
  }): ReactElement;
40
35
  export {};
41
36
  //# sourceMappingURL=content.d.ts.map