@lets-ship/site 3.2.0 → 3.4.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.
- package/dist/website/blocks/call-to-action-views.d.ts.map +1 -1
- package/dist/website/blocks/call-to-action-views.js +3 -3
- package/dist/website/blocks/call-to-action-views.js.map +1 -1
- package/dist/website/blocks/card-grid-views.d.ts.map +1 -1
- package/dist/website/blocks/card-grid-views.js +1 -1
- package/dist/website/blocks/card-grid-views.js.map +1 -1
- package/dist/website/blocks/catalog.d.ts +1 -1
- package/dist/website/blocks/catalog.js +1 -1
- package/dist/website/blocks/catalog.js.map +1 -1
- package/dist/website/blocks/commerce.d.ts +3 -1
- package/dist/website/blocks/commerce.d.ts.map +1 -1
- package/dist/website/blocks/commerce.js +2 -2
- package/dist/website/blocks/commerce.js.map +1 -1
- package/dist/website/blocks/contact-views.d.ts.map +1 -1
- package/dist/website/blocks/contact-views.js +3 -3
- package/dist/website/blocks/contact-views.js.map +1 -1
- package/dist/website/blocks/content.d.ts +5 -2
- package/dist/website/blocks/content.d.ts.map +1 -1
- package/dist/website/blocks/content.js +4 -3
- package/dist/website/blocks/content.js.map +1 -1
- package/dist/website/blocks/empty-state-views.d.ts.map +1 -1
- package/dist/website/blocks/empty-state-views.js +2 -2
- package/dist/website/blocks/empty-state-views.js.map +1 -1
- package/dist/website/blocks/faq-views.d.ts.map +1 -1
- package/dist/website/blocks/faq-views.js +1 -1
- package/dist/website/blocks/faq-views.js.map +1 -1
- package/dist/website/blocks/feature-views.d.ts.map +1 -1
- package/dist/website/blocks/feature-views.js +5 -5
- package/dist/website/blocks/feature-views.js.map +1 -1
- package/dist/website/blocks/hero-views.d.ts +5 -0
- package/dist/website/blocks/hero-views.d.ts.map +1 -1
- package/dist/website/blocks/hero-views.js +13 -11
- package/dist/website/blocks/hero-views.js.map +1 -1
- package/dist/website/blocks/local-views.d.ts.map +1 -1
- package/dist/website/blocks/local-views.js +6 -6
- package/dist/website/blocks/local-views.js.map +1 -1
- package/dist/website/blocks/logo-stats-views.d.ts.map +1 -1
- package/dist/website/blocks/logo-stats-views.js +5 -5
- package/dist/website/blocks/logo-stats-views.js.map +1 -1
- package/dist/website/blocks/media-views.d.ts.map +1 -1
- package/dist/website/blocks/media-views.js +2 -2
- package/dist/website/blocks/media-views.js.map +1 -1
- package/dist/website/blocks/newsletter-views.d.ts +3 -2
- package/dist/website/blocks/newsletter-views.d.ts.map +1 -1
- package/dist/website/blocks/newsletter-views.js +15 -27
- package/dist/website/blocks/newsletter-views.js.map +1 -1
- package/dist/website/blocks/parts.d.ts +27 -3
- package/dist/website/blocks/parts.d.ts.map +1 -1
- package/dist/website/blocks/parts.js +23 -4
- package/dist/website/blocks/parts.js.map +1 -1
- package/dist/website/blocks/signup.d.ts +42 -0
- package/dist/website/blocks/signup.d.ts.map +1 -0
- package/dist/website/blocks/signup.js +39 -0
- package/dist/website/blocks/signup.js.map +1 -0
- package/dist/website/blocks/team-views.d.ts.map +1 -1
- package/dist/website/blocks/team-views.js +3 -3
- package/dist/website/blocks/team-views.js.map +1 -1
- package/dist/website/blocks/testimonial-views.d.ts +6 -1
- package/dist/website/blocks/testimonial-views.d.ts.map +1 -1
- package/dist/website/blocks/testimonial-views.js +22 -7
- package/dist/website/blocks/testimonial-views.js.map +1 -1
- package/package.json +2 -2
- package/styles.css +322 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/local-views.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,KAAK,MAAM,EAAW,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"local-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/local-views.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA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EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAC;IACnC,yDAAyD;IACzD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,GAAG,YAAY,CAuChF;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,yFAAyF;IACzF,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjF,oCAAoC;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAWF,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,GAAG,YAAY,CAmCzF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { BLOCK_VARIANTS } from "./catalog.js";
|
|
3
3
|
import { keyed } from "./list.js";
|
|
4
|
-
import { Actions, bandAttrs, Media, Section } from "./parts.js";
|
|
4
|
+
import { Actions, BlockTitle, bandAttrs, Media, Section } from "./parts.js";
|
|
5
5
|
import { filled } from "./variant.js";
|
|
6
6
|
export const PRICE_LIST_VARIANTS = BLOCK_VARIANTS.PriceList;
|
|
7
7
|
export const HOURS_VARIANTS = BLOCK_VARIANTS.Hours;
|
|
@@ -13,16 +13,16 @@ function PriceRows({ items }) {
|
|
|
13
13
|
export function priceListView(variant, props) {
|
|
14
14
|
const items = filled("PriceList", variant, "items", props.items);
|
|
15
15
|
if (variant === "columns")
|
|
16
|
-
return (_jsx(Section, { name: "PriceList", id: props.id, tone: props.tone, title: props.title, intro: props.intro, children: _jsx("div", { className: "site-price-columns", "data-variant": "columns", children: _jsx(PriceRows, { items: items }) }) }));
|
|
17
|
-
return (_jsx("section", { ...bandAttrs("PriceList", props, "site-block"), children: _jsxs("div", { className: "site-container site-split-end", children: [_jsxs("div", { children: [props.title ? _jsx(
|
|
16
|
+
return (_jsx(Section, { name: "PriceList", id: props.id, tone: props.tone, title: props.title, highlight: props.highlight, intro: props.intro, children: _jsx("div", { className: "site-price-columns", "data-variant": "columns", children: _jsx(PriceRows, { items: items }) }) }));
|
|
17
|
+
return (_jsx("section", { ...bandAttrs("PriceList", props, "site-block"), children: _jsxs("div", { className: "site-container site-split-end", children: [_jsxs("div", { children: [props.title ? _jsx(BlockTitle, { block: "PriceList", title: props.title, highlight: props.highlight }) : null, props.intro ? _jsx("p", { className: "site-block-intro", children: props.intro }) : null] }), _jsx(PriceRows, { items: items })] }) }));
|
|
18
18
|
}
|
|
19
19
|
/** The hours as a table under the heading (table), or the heading beside them (split). */
|
|
20
20
|
export function hoursView(variant, props) {
|
|
21
21
|
const rows = filled("Hours", variant, "rows", props.rows);
|
|
22
22
|
const table = (_jsxs("div", { children: [_jsx("dl", { className: "site-hours", children: keyed(rows).map(({ key, item }) => (_jsxs("div", { className: "site-hours-row", children: [_jsx("dt", { children: item.days }), _jsx("dd", { children: item.hours })] }, key))) }), props.note ? _jsx("p", { className: "site-card-text mt-4", children: props.note }) : null] }));
|
|
23
23
|
if (variant === "split")
|
|
24
|
-
return (_jsx("section", { ...bandAttrs("Hours", props, "site-block"), "data-variant": "split", children: _jsxs("div", { className: "site-container site-split-end", children: [_jsxs("div", { children: [props.title ? _jsx(
|
|
25
|
-
return (_jsx(Section, { name: "Hours", id: props.id, tone: props.tone, title: props.title, intro: props.intro, children: _jsx("div", { className: "site-hours-table", children: table }) }));
|
|
24
|
+
return (_jsx("section", { ...bandAttrs("Hours", props, "site-block"), "data-variant": "split", children: _jsxs("div", { className: "site-container site-split-end", children: [_jsxs("div", { children: [props.title ? _jsx(BlockTitle, { block: "Hours", title: props.title, highlight: props.highlight }) : null, props.intro ? _jsx("p", { className: "site-block-intro", children: props.intro }) : null] }), table] }) }));
|
|
25
|
+
return (_jsx(Section, { name: "Hours", id: props.id, tone: props.tone, title: props.title, highlight: props.highlight, intro: props.intro, children: _jsx("div", { className: "site-hours-table", children: table }) }));
|
|
26
26
|
}
|
|
27
27
|
/** A drawn plan of streets and a pin, for a location with no picture. It names nothing. */
|
|
28
28
|
function Plan() {
|
|
@@ -32,7 +32,7 @@ function Plan() {
|
|
|
32
32
|
export function locationView(variant, props) {
|
|
33
33
|
const address = filled("Location", variant, "address", props.address);
|
|
34
34
|
const picture = props.image ? _jsx(Media, { image: props.image, className: "site-location-media" }) : _jsx(Plan, {});
|
|
35
|
-
const words = (_jsxs("div", { className: "site-location-words", children: [props.title ? _jsx(
|
|
35
|
+
const words = (_jsxs("div", { className: "site-location-words", children: [props.title ? _jsx(BlockTitle, { block: "Hours", title: props.title, highlight: props.highlight }) : null, props.intro ? _jsx("p", { className: "site-block-intro", children: props.intro }) : null, _jsx("address", { className: "site-location-address", children: keyed(address).map(({ key, item }) => (_jsx("span", { className: "block", children: item }, key))) }), props.details ? (_jsx("dl", { className: "site-hours mt-6", children: keyed(props.details).map(({ key, item }) => (_jsxs("div", { className: "site-hours-row", children: [_jsx("dt", { children: item.label }), _jsx("dd", { children: item.value })] }, key))) })) : null, _jsx(Actions, { primary: props.primary, secondary: props.secondary })] }));
|
|
36
36
|
return (_jsx("section", { ...bandAttrs("Location", props, "site-block"), "data-variant": variant === "split" ? undefined : variant, children: _jsxs("div", { className: variant === "split" ? "site-container site-split items-center" : "site-container grid gap-10", children: [variant === "split" ? picture : words, variant === "split" ? words : picture] }) }));
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=local-views.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-views.js","sourceRoot":"","sources":["../../../src/website/blocks/local-views.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAe,OAAO,EAAe,SAAS,EAAE,KAAK,EAAmB,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"local-views.js","sourceRoot":"","sources":["../../../src/website/blocks/local-views.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAe,OAAO,EAAe,UAAU,EAAE,SAAS,EAAE,KAAK,EAAmB,OAAO,EAAE,MAAM,YAAY,CAAC;AACvH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAAC,SAAS,CAAC;AAE5D,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC;AAEnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC,QAAQ,CAAC;AAiBzD,SAAS,SAAS,CAAC,EAAE,KAAK,EAA4C;IACrE,OAAO,CACN,aAAI,SAAS,EAAC,iBAAiB,YAC7B,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACpC,cAAc,SAAS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+1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-stats-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/logo-stats-views.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAqB,MAAM,YAAY,CAAC;AAG7E,eAAO,MAAM,mBAAmB,+CAA2B,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC9B,CAAC;
|
|
1
|
+
{"version":3,"file":"logo-stats-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/logo-stats-views.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAqB,MAAM,YAAY,CAAC;AAG7E,eAAO,MAAM,mBAAmB,+CAA2B,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,MAAM,IAAI,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC9B,CAAC;AAsFF,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,GAAG,YAAY,CAK5F;AAED,eAAO,MAAM,cAAc,qDAAuB,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,KAAK,IAAI,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAA;CAAE,CAAC;AA6DxH,wBAAgB,SAAS,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,GAAG,YAAY,CAGhF"}
|
|
@@ -11,16 +11,16 @@ function LogoImage({ logo, className }) {
|
|
|
11
11
|
}
|
|
12
12
|
/** The block's own look: one centred row of logos. */
|
|
13
13
|
function RowLogos(props) {
|
|
14
|
-
return (_jsx(Section, { name: "LogoCloud", id: props.id, tone: props.tone, title: props.title, intro: props.intro, children: _jsx("ul", { className: "flex flex-wrap items-center justify-center gap-10", children: keyed(props.logos).map(({ key, item: logo }) => (_jsx("li", { children: _jsx(LogoImage, { logo: logo, className: "site-logo" }) }, key))) }) }));
|
|
14
|
+
return (_jsx(Section, { name: "LogoCloud", id: props.id, tone: props.tone, title: props.title, highlight: props.highlight, intro: props.intro, children: _jsx("ul", { className: "flex flex-wrap items-center justify-center gap-10", children: keyed(props.logos).map(({ key, item: logo }) => (_jsx("li", { children: _jsx(LogoImage, { logo: logo, className: "site-logo" }) }, key))) }) }));
|
|
15
15
|
}
|
|
16
16
|
/** Logos in a grid of equal cells, in grey until a pointer rests on one (grid), or on tiles (tiles). */
|
|
17
17
|
function GridLogos({ props, variant }) {
|
|
18
18
|
const tiles = variant === "tiles";
|
|
19
|
-
return (_jsx(Section, { name: "LogoCloud", id: props.id, tone: props.tone, title: props.title, intro: props.intro, align: tiles ? undefined : "center", children: _jsx("ul", { className: tiles ? "site-logo-tiles site-grid site-grid-hairline overflow-hidden" : "site-grid site-grid-flush", "data-cols": gridColumns(props.logos.length, 4), "data-phone": "2", "data-variant": variant, children: keyed(props.logos).map(({ key, item: logo }) => (_jsx("li", { className: tiles ? "site-logo-tile grid aspect-video place-content-center p-4" : "grid place-content-center p-4", children: _jsx(LogoImage, { logo: logo, className: "site-logo site-logo-muted" }) }, key))) }) }));
|
|
19
|
+
return (_jsx(Section, { name: "LogoCloud", id: props.id, tone: props.tone, title: props.title, highlight: props.highlight, intro: props.intro, align: tiles ? undefined : "center", children: _jsx("ul", { className: tiles ? "site-logo-tiles site-grid site-grid-hairline overflow-hidden" : "site-grid site-grid-flush", "data-cols": gridColumns(props.logos.length, 4), "data-phone": "2", "data-variant": variant, children: keyed(props.logos).map(({ key, item: logo }) => (_jsx("li", { className: tiles ? "site-logo-tile grid aspect-video place-content-center p-4" : "grid place-content-center p-4", children: _jsx(LogoImage, { logo: logo, className: "site-logo site-logo-muted" }) }, key))) }) }));
|
|
20
20
|
}
|
|
21
21
|
/** The logos in one row the reader scrolls, for more logos than one row holds. */
|
|
22
22
|
function CarouselLogos(props) {
|
|
23
|
-
return (_jsx(Section, { name: "LogoCloud", id: props.id, tone: props.tone, title: props.title, intro: props.intro, align: "center", children: _jsx(CarouselRow, { kind: "logos", label: props.title, items: props.logos, strings: props.strings, render: (logo) => _jsx(LogoImage, { logo: logo, className: "site-logo" }) }) }));
|
|
23
|
+
return (_jsx(Section, { name: "LogoCloud", id: props.id, tone: props.tone, title: props.title, highlight: props.highlight, intro: props.intro, align: "center", children: _jsx(CarouselRow, { kind: "logos", label: props.title, items: props.logos, strings: props.strings, render: (logo) => _jsx(LogoImage, { logo: logo, className: "site-logo" }) }) }));
|
|
24
24
|
}
|
|
25
25
|
export function logoCloudView(variant, props) {
|
|
26
26
|
const full = { ...props, logos: filled("LogoCloud", variant, "logos", props.logos) };
|
|
@@ -33,7 +33,7 @@ export function logoCloudView(variant, props) {
|
|
|
33
33
|
export const STATS_VARIANTS = BLOCK_VARIANTS.Stats;
|
|
34
34
|
/** The block's own look: a card for each figure, its label above it. */
|
|
35
35
|
function CardStats(props) {
|
|
36
|
-
return (_jsx(Section, { name: "Stats", id: props.id, tone: props.tone, title: props.title, intro: props.intro, children: _jsx("dl", { className: "site-grid", "data-cols": gridColumns(props.items.length, 4), "data-phone": "2", children: keyed(props.items).map(({ key, item }) => (_jsxs("div", { className: "site-card", children: [_jsx("dt", { className: "site-stat-label", children: item.label }), _jsx("dd", { className: "site-stat-value", children: item.value })] }, key))) }) }));
|
|
36
|
+
return (_jsx(Section, { name: "Stats", id: props.id, tone: props.tone, title: props.title, highlight: props.highlight, intro: props.intro, children: _jsx("dl", { className: "site-grid", "data-cols": gridColumns(props.items.length, 4), "data-phone": "2", children: keyed(props.items).map(({ key, item }) => (_jsxs("div", { className: "site-card", children: [_jsx("dt", { className: "site-stat-label", children: item.label }), _jsx("dd", { className: "site-stat-value", children: item.value })] }, key))) }) }));
|
|
37
37
|
}
|
|
38
38
|
const STAT_CELL = {
|
|
39
39
|
outlined: "site-stat-outlined",
|
|
@@ -42,7 +42,7 @@ const STAT_CELL = {
|
|
|
42
42
|
};
|
|
43
43
|
/** Large figures in the brand colour, centred, each over its label. */
|
|
44
44
|
function FeatureStats({ props, variant, }) {
|
|
45
|
-
return (_jsx(Section, { name: "Stats", id: props.id, tone: props.tone, title: props.title, intro: props.intro, align: "center", children: _jsx("dl", { className: "site-grid site-grid-tight", "data-cols": gridColumns(props.items.length, 4), "data-variant": variant, children: keyed(props.items).map(({ key, item }) => (_jsxs("div", { className: `${STAT_CELL[variant]} flex flex-col px-4 py-8 text-center`, children: [_jsx("dt", { className: "site-stat-caption order-last", children: item.label }), _jsx("dd", { className: "site-stat-figure", children: item.value })] }, key))) }) }));
|
|
45
|
+
return (_jsx(Section, { name: "Stats", id: props.id, tone: props.tone, title: props.title, highlight: props.highlight, intro: props.intro, align: "center", children: _jsx("dl", { className: "site-grid site-grid-tight", "data-cols": gridColumns(props.items.length, 4), "data-variant": variant, children: keyed(props.items).map(({ key, item }) => (_jsxs("div", { className: `${STAT_CELL[variant]} flex flex-col px-4 py-8 text-center`, children: [_jsx("dt", { className: "site-stat-caption order-last", children: item.label }), _jsx("dd", { className: "site-stat-figure", children: item.value })] }, key))) }) }));
|
|
46
46
|
}
|
|
47
47
|
export function statsView(variant, props) {
|
|
48
48
|
const full = { ...props, items: filled("Stats", variant, "items", props.items) };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-stats-views.js","sourceRoot":"","sources":["../../../src/website/blocks/logo-stats-views.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAgC,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAAC,SAAS,CAAC;AAW5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BAA2B,eAAY,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,kBAAgB,OAAO,YAC5G,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC1C,eAAe,SAAS,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,sCAAsC,aACpF,aAAI,SAAS,EAAC,8BAA8B,YAAE,IAAI,CAAC,KAAK,GAAM,EAC9D,aAAI,SAAS,EAAC,kBAAkB,YAAE,IAAI,CAAC,KAAK,GAAM,KAFzC,GAAG,CAGP,CACN,CAAC,GACE,GACI,CACV,CAAC;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAqB,EAAE,KAAiB;IACjE,MAAM,IAAI,GAAG,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;IACjF,OAAO,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,KAAC,SAAS,OAAK,IAAI,GAAI,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AACxG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/media-views.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,KAAK,MAAM,EAAW,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"media-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/media-views.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,KAAK,MAAM,EAAW,KAAK,MAAM,EAAgC,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9G,eAAO,MAAM,sBAAsB,wDAA8B,CAAC;AAClE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAcF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAiBrG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { BLOCK_VARIANTS } from "./catalog.js";
|
|
3
|
-
import { Actions, bandAttrs, Media } from "./parts.js";
|
|
3
|
+
import { Actions, BlockTitle, bandAttrs, Media } from "./parts.js";
|
|
4
4
|
export const MEDIA_SECTION_VARIANTS = BLOCK_VARIANTS.MediaSection;
|
|
5
5
|
/** The grid of each layout, and the share of it the words take. */
|
|
6
6
|
const LAYOUT = {
|
|
@@ -19,6 +19,6 @@ const LAYOUT = {
|
|
|
19
19
|
*/
|
|
20
20
|
export function mediaSectionView(variant, props) {
|
|
21
21
|
const layout = LAYOUT[variant];
|
|
22
|
-
return (_jsx("section", { ...bandAttrs("MediaSection", props, "site-block"), "data-variant": variant === "split" ? undefined : variant, children: _jsxs("div", { className: `site-container grid grid-cols-1 items-center gap-6 ${layout.grid}`, children: [_jsxs("div", { className: layout.words, children: [_jsx(
|
|
22
|
+
return (_jsx("section", { ...bandAttrs("MediaSection", props, "site-block"), "data-variant": variant === "split" ? undefined : variant, children: _jsxs("div", { className: `site-container grid grid-cols-1 items-center gap-6 ${layout.grid}`, children: [_jsxs("div", { className: layout.words, children: [_jsx(BlockTitle, { block: "MediaSection", title: props.title, highlight: props.highlight }), _jsx("p", { className: "site-media-text", children: props.text }), _jsx(Actions, { primary: props.primary, secondary: props.secondary })] }), _jsx(Media, { image: props.image, bleed: variant === "split", className: `site-media-image ${layout.image}` })] }) }));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=media-views.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-views.js","sourceRoot":"","sources":["../../../src/website/blocks/media-views.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAe,OAAO,EAAe,SAAS,EAAE,KAAK,EAAmB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"media-views.js","sourceRoot":"","sources":["../../../src/website/blocks/media-views.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAe,OAAO,EAAe,UAAU,EAAE,SAAS,EAAE,KAAK,EAAmB,MAAM,YAAY,CAAC;AAE9G,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAC,YAAY,CAAC;AAWlE,mEAAmE;AACnE,MAAM,MAAM,GAAgF;IAC3F,8EAA8E;IAC9E,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IACvD,2FAA2F;IAC3F,gCAAgC;IAChC,IAAI,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE;IAC7E,eAAe,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IACrG,wFAAwF;IACxF,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE;CACjE,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAA4B,EAAE,KAAwB;IACtF,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,CACN,qBACK,SAAS,CAAC,cAAc,EAAE,KAAK,EAAE,YAAY,CAAC,kBACpC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,YAEvD,eAAK,SAAS,EAAE,sDAAsD,MAAM,CAAC,IAAI,EAAE,aAClF,eAAK,SAAS,EAAE,MAAM,CAAC,KAAK,aAC3B,KAAC,UAAU,IAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,EACnF,YAAG,SAAS,EAAC,iBAAiB,YAAE,KAAK,CAAC,IAAI,GAAK,EAC/C,KAAC,OAAO,IAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,IAC1D,EACN,KAAC,KAAK,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,EAAE,SAAS,EAAE,oBAAoB,MAAM,CAAC,KAAK,EAAE,GAAI,IACnG,GACG,CACV,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
2
|
import type { SiteStrings } from "../../i18n/strings.js";
|
|
3
|
-
import {
|
|
3
|
+
import type { Anchor } from "./parts.js";
|
|
4
4
|
export declare const NEWSLETTER_VARIANTS: readonly ["start", "centered", "panel"];
|
|
5
5
|
export type NewsletterVariant = (typeof NEWSLETTER_VARIANTS)[number];
|
|
6
6
|
export type NewsletterProps = Anchor & {
|
|
@@ -15,10 +15,11 @@ export type NewsletterProps = Anchor & {
|
|
|
15
15
|
readonly note?: string;
|
|
16
16
|
readonly strings: SiteStrings;
|
|
17
17
|
};
|
|
18
|
-
/** One email field and its button,
|
|
18
|
+
/** One email field and its button, in a form that posts to `action`. */
|
|
19
19
|
export declare function EmailSignup({ action, strings, center, }: {
|
|
20
20
|
readonly action: string;
|
|
21
21
|
readonly strings: SiteStrings;
|
|
22
|
+
/** Centres the control in its column, for a layout whose words are centred. */
|
|
22
23
|
readonly center?: boolean;
|
|
23
24
|
}): ReactElement;
|
|
24
25
|
/** A signup for the site's mailing list: one email field and a button. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"newsletter-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/newsletter-views.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"newsletter-views.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/newsletter-views.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIzC,eAAO,MAAM,mBAAmB,yCAA4B,CAAC;AAC7D,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC9B,CAAC;AAEF,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,MAAc,GACd,EAAE;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,YAAY,CAQf;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,GAAG,YAAY,CAY/F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/*
|
|
3
3
|
* Newsletter layouts, adapted from HyperUI's newsletter signups and CTAs
|
|
4
4
|
* (https://github.com/markmead/hyperui, MIT, Copyright (c) Mark Mead): colours, type and radii
|
|
@@ -6,39 +6,27 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
6
6
|
*/
|
|
7
7
|
import { useId } from "react";
|
|
8
8
|
import { BLOCK_VARIANTS } from "./catalog.js";
|
|
9
|
-
import {
|
|
9
|
+
import { SignupFields, signupView } from "./signup.js";
|
|
10
10
|
import { required } from "./variant.js";
|
|
11
11
|
export const NEWSLETTER_VARIANTS = BLOCK_VARIANTS.Newsletter;
|
|
12
|
-
/** One email field and its button,
|
|
12
|
+
/** One email field and its button, in a form that posts to `action`. */
|
|
13
13
|
export function EmailSignup({ action, strings, center = false, }) {
|
|
14
14
|
// Two signups on one page must not share an id, or a label names the other form's field.
|
|
15
15
|
const id = `${useId()}-email`;
|
|
16
|
-
return (
|
|
17
|
-
}
|
|
18
|
-
function Words({ props, center }) {
|
|
19
|
-
const head = center ? "site-block-head-center" : "";
|
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsx("h2", { className: `site-block-title ${head}`, children: props.title }), props.text ? _jsx("p", { className: `site-block-intro ${head}`, children: props.text }) : null] }));
|
|
21
|
-
}
|
|
22
|
-
function Note({ note, center }) {
|
|
23
|
-
if (!note)
|
|
24
|
-
return null;
|
|
25
|
-
return _jsx("p", { className: `site-card-text mt-3 ${center ? "text-center" : ""}`, children: note });
|
|
26
|
-
}
|
|
27
|
-
/** The words over the form on a quiet band, aligned to the start (start) or centred (centered). */
|
|
28
|
-
function BandNewsletter({ props, variant, }) {
|
|
29
|
-
const action = required("Newsletter", variant, "action", props.action, 'add action="<the URL the form posts to>"');
|
|
30
|
-
const center = variant === "centered";
|
|
31
|
-
return (_jsx("section", { ...bandAttrs("Newsletter", props, "site-block site-band-muted"), "data-variant": center ? variant : undefined, children: _jsxs("div", { className: "site-container", children: [_jsx(Words, { props: props, center: center }), _jsx(EmailSignup, { action: action, strings: props.strings, center: center }), _jsx(Note, { note: props.note, center: center })] }) }));
|
|
32
|
-
}
|
|
33
|
-
/** A rounded panel with the words on one side and the form on the other. */
|
|
34
|
-
function PanelNewsletter(props) {
|
|
35
|
-
const action = required("Newsletter", "panel", "action", props.action, 'add action="<the URL the form posts to>"');
|
|
36
|
-
return (_jsx("section", { ...bandAttrs("Newsletter", props, "site-block"), "data-variant": "panel", children: _jsx("div", { className: "site-container", children: _jsxs("div", { className: "site-cta-panel grid items-center gap-6 p-8 md:grid-cols-2 md:p-12", children: [_jsxs("div", { children: [_jsx("h2", { className: "site-block-title", children: props.title }), props.text ? _jsx("p", { className: "site-media-text", children: props.text }) : null] }), _jsxs("div", { children: [_jsx(EmailSignup, { action: action, strings: props.strings }), _jsx(Note, { note: props.note, center: false })] })] }) }) }));
|
|
16
|
+
return (_jsx("form", { method: "post", action: action, className: center ? "site-form site-signup-center" : "site-form", children: _jsx(SignupFields, { id: id, label: strings.emailAddress, button: strings.subscribe }) }));
|
|
37
17
|
}
|
|
38
18
|
/** A signup for the site's mailing list: one email field and a button. */
|
|
39
19
|
export function newsletterView(variant, props) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
20
|
+
const action = required("Newsletter", variant, "action", props.action, 'add action="<the URL the form posts to>"');
|
|
21
|
+
return signupView(variant, {
|
|
22
|
+
name: "Newsletter",
|
|
23
|
+
id: props.id,
|
|
24
|
+
tone: props.tone,
|
|
25
|
+
highlight: props.highlight,
|
|
26
|
+
title: props.title,
|
|
27
|
+
text: props.text,
|
|
28
|
+
note: props.note,
|
|
29
|
+
form: _jsx(EmailSignup, { action: action, strings: props.strings }),
|
|
30
|
+
});
|
|
43
31
|
}
|
|
44
32
|
//# sourceMappingURL=newsletter-views.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"newsletter-views.js","sourceRoot":"","sources":["../../../src/website/blocks/newsletter-views.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,OAAO,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"newsletter-views.js","sourceRoot":"","sources":["../../../src/website/blocks/newsletter-views.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,OAAO,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAAC,UAAU,CAAC;AAgB7D,wEAAwE;AACxE,MAAM,UAAU,WAAW,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,MAAM,GAAG,KAAK,GAMd;IACA,yFAAyF;IACzF,MAAM,EAAE,GAAG,GAAG,KAAK,EAAE,QAAQ,CAAC;IAC9B,OAAO,CACN,eAAM,MAAM,EAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,WAAW,YACnG,KAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,SAAS,GAAI,GAC1E,CACP,CAAC;AACH,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,cAAc,CAAC,OAA0B,EAAE,KAAsB;IAChF,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,0CAA0C,CAAC,CAAC;IACnH,OAAO,UAAU,CAAC,OAAO,EAAE;QAC1B,IAAI,EAAE,YAAY;QAClB,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,IAAI,EAAE,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,GAAI;KAC7D,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from "react";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* A link a block shows as a button. `look: "link"` shows it as underlined text instead, for a
|
|
4
|
+
* second action that should not compete with the first.
|
|
5
|
+
*/
|
|
3
6
|
export type Action = {
|
|
4
7
|
readonly label: string;
|
|
5
8
|
readonly href: string;
|
|
9
|
+
readonly look?: "link";
|
|
6
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* A heading's text with its key words in the brand's emphasis (a colour, a marker, an underline or
|
|
13
|
+
* none). The words must appear in the heading as written: a highlight that is not there is a
|
|
14
|
+
* `BlockPropError`, never a heading shown without it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function highlighted(at: {
|
|
17
|
+
readonly block: string;
|
|
18
|
+
readonly variant: string | undefined;
|
|
19
|
+
}, text: string, highlight: string | undefined): ReactNode;
|
|
7
20
|
/** An image a block shows: a path in the site's `public/` folder or an absolute URL. */
|
|
8
21
|
export type BlockImage = {
|
|
9
22
|
readonly src: string;
|
|
@@ -18,12 +31,21 @@ export type MediaImage = BlockImage & {
|
|
|
18
31
|
};
|
|
19
32
|
/**
|
|
20
33
|
* What every block takes besides its content: an optional anchor, so a link to "#pricing" scrolls
|
|
21
|
-
* to `id="pricing"`,
|
|
34
|
+
* to `id="pricing"`, an optional section tone (SECTION_TONES), the band's background, and the
|
|
35
|
+
* optional key words of its title, which the title shows in the brand's emphasis.
|
|
22
36
|
*/
|
|
23
37
|
export type Anchor = {
|
|
24
38
|
readonly id?: string;
|
|
25
39
|
readonly tone?: string;
|
|
40
|
+
readonly highlight?: string;
|
|
26
41
|
};
|
|
42
|
+
/** A block's own heading, for a layout that places it outside `Section`: the title with its highlight. */
|
|
43
|
+
export declare function BlockTitle({ block, title, highlight, className, }: {
|
|
44
|
+
readonly block: string;
|
|
45
|
+
readonly title: string;
|
|
46
|
+
readonly highlight?: string;
|
|
47
|
+
readonly className?: string;
|
|
48
|
+
}): ReactElement;
|
|
27
49
|
/** The attributes of a block's own `<section>`, in the order of every band: anchor, class, name, tone. */
|
|
28
50
|
export declare function bandAttrs(name: string, anchor: Anchor, className?: string): {
|
|
29
51
|
readonly id: string | undefined;
|
|
@@ -35,11 +57,13 @@ export declare function bandAttrs(name: string, anchor: Anchor, className?: stri
|
|
|
35
57
|
* The frame of every block: a full-width band with the content in the site container, a heading
|
|
36
58
|
* when the block has a title, and a `data-block` name that tests and the site's own CSS can find.
|
|
37
59
|
*/
|
|
38
|
-
export declare function Section({ name, id, tone, title, intro, align, children, }: {
|
|
60
|
+
export declare function Section({ name, id, tone, title, highlight, intro, align, children, }: {
|
|
39
61
|
readonly name: string;
|
|
40
62
|
readonly id?: string;
|
|
41
63
|
readonly tone?: string;
|
|
42
64
|
readonly title?: string;
|
|
65
|
+
/** The key words of the title, in the brand's emphasis; they must appear in the title. */
|
|
66
|
+
readonly highlight?: string;
|
|
43
67
|
readonly intro?: string;
|
|
44
68
|
/** "center" centres the heading and the intro over the content. */
|
|
45
69
|
readonly align?: "center";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/parts.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD
|
|
1
|
+
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/parts.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/F;;;;GAIG;AACH,wBAAgB,WAAW,CAC1B,EAAE,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EACpE,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,SAAS,GAC3B,SAAS,CAYX;AAED,wFAAwF;AACxF,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG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E,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAC5B,GAAG,YAAY,CAaf"}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Link from "next/link";
|
|
3
|
-
import { anchorOf, toneOf } from "./variant.js";
|
|
3
|
+
import { anchorOf, BlockPropError, toneOf } from "./variant.js";
|
|
4
|
+
/**
|
|
5
|
+
* A heading's text with its key words in the brand's emphasis (a colour, a marker, an underline or
|
|
6
|
+
* none). The words must appear in the heading as written: a highlight that is not there is a
|
|
7
|
+
* `BlockPropError`, never a heading shown without it.
|
|
8
|
+
*/
|
|
9
|
+
export function highlighted(at, text, highlight) {
|
|
10
|
+
if (highlight === undefined)
|
|
11
|
+
return text;
|
|
12
|
+
const start = text.indexOf(highlight);
|
|
13
|
+
if (start < 0 || highlight === "")
|
|
14
|
+
throw new BlockPropError(at.block, at.variant, "highlight", `"${highlight}" is not in the title "${text}"`);
|
|
15
|
+
return (_jsxs(_Fragment, { children: [text.slice(0, start), _jsx("strong", { className: "site-highlight", children: highlight }), text.slice(start + highlight.length)] }));
|
|
16
|
+
}
|
|
17
|
+
/** A block's own heading, for a layout that places it outside `Section`: the title with its highlight. */
|
|
18
|
+
export function BlockTitle({ block, title, highlight, className = "site-block-title", }) {
|
|
19
|
+
return _jsx("h2", { className: className, children: highlighted({ block, variant: undefined }, title, highlight) });
|
|
20
|
+
}
|
|
4
21
|
/** The attributes of a block's own `<section>`, in the order of every band: anchor, class, name, tone. */
|
|
5
22
|
export function bandAttrs(name, anchor, className = "site-block") {
|
|
6
23
|
return { id: anchorOf(name, anchor.id), className, "data-block": name, "data-tone": toneOf(name, anchor.tone) };
|
|
@@ -9,9 +26,9 @@ export function bandAttrs(name, anchor, className = "site-block") {
|
|
|
9
26
|
* The frame of every block: a full-width band with the content in the site container, a heading
|
|
10
27
|
* when the block has a title, and a `data-block` name that tests and the site's own CSS can find.
|
|
11
28
|
*/
|
|
12
|
-
export function Section({ name, id, tone, title, intro, align, children, }) {
|
|
29
|
+
export function Section({ name, id, tone, title, highlight, intro, align, children, }) {
|
|
13
30
|
const head = align === "center" ? "site-block-head-center" : undefined;
|
|
14
|
-
return (_jsx("section", { ...bandAttrs(name, { id, tone }), children: _jsxs("div", { className: "site-container", children: [title ? _jsx("h2", { className: head ? `site-block-title ${head}` : "site-block-title", children: title }) : null, intro ? _jsx("p", { className: head ? `site-block-intro ${head}` : "site-block-intro", children: intro }) : null, children] }) }));
|
|
31
|
+
return (_jsx("section", { ...bandAttrs(name, { id, tone }), children: _jsxs("div", { className: "site-container", children: [title ? (_jsx("h2", { className: head ? `site-block-title ${head}` : "site-block-title", children: highlighted({ block: name, variant: undefined }, title, highlight) })) : null, intro ? _jsx("p", { className: head ? `site-block-intro ${head}` : "site-block-intro", children: intro }) : null, children] }) }));
|
|
15
32
|
}
|
|
16
33
|
/** The buttons of a block, primary first; nothing when it has none. */
|
|
17
34
|
export function Actions({ primary, secondary, center = false, size = "md", }) {
|
|
@@ -34,6 +51,8 @@ export function Media({ image, bleed = false, className, }) {
|
|
|
34
51
|
return (_jsx("figure", { className: classes, children: _jsxs("div", { className: "site-media-picture", children: [_jsx(BlockImg, { image: image, className: "site-media-img" }), image.note ? _jsx("figcaption", { className: "site-media-note", children: image.note }) : null] }) }));
|
|
35
52
|
}
|
|
36
53
|
export function ActionLink({ action, secondary = false, size = "md", }) {
|
|
54
|
+
if (action.look === "link")
|
|
55
|
+
return (_jsx(Link, { href: action.href, className: "site-text-action", children: action.label }));
|
|
37
56
|
const classes = ["site-button", secondary ? "site-button-secondary" : "", size === "lg" ? "site-button-lg" : ""];
|
|
38
57
|
return (_jsx(Link, { href: action.href, className: classes.filter(Boolean).join(" "), children: action.label }));
|
|
39
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../src/website/blocks/parts.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../src/website/blocks/parts.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAQhE;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAC1B,EAAoE,EACpE,IAAY,EACZ,SAA6B;IAE7B,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACtC,IAAI,KAAK,GAAG,CAAC,IAAI,SAAS,KAAK,EAAE;QAChC,MAAM,IAAI,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,SAAS,0BAA0B,IAAI,GAAG,CAAC,CAAC;IAC7G,OAAO,CACN,8BACE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EACrB,iBAAQ,SAAS,EAAC,gBAAgB,YAAE,SAAS,GAAU,EACtD,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,IACnC,CACH,CAAC;AACH,CAAC;AAkBD,0GAA0G;AAC1G,MAAM,UAAU,UAAU,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,SAAS,EACT,SAAS,GAAG,kBAAkB,GAM9B;IACA,OAAO,aAAI,SAAS,EAAE,SAAS,YAAG,WAAW,CAAC,EAAE,KAAK,EAAE,O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AAS,EAAC,iBAAiB,YAAE,KAAK,CAAC,IAAI,GAAc,CAAC,CAAC,CAAC,IAAI,IACjF,GACE,CACT,CAAC;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,EAC1B,MAAM,EACN,SAAS,GAAG,KAAK,EACjB,IAAI,GAAG,IAAI,GAKX;IACA,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM;QACzB,OAAO,CACN,KAAC,IAAI,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,EAAC,kBAAkB,YACnD,MAAM,CAAC,KAAK,GACP,CACP,CAAC;IACH,MAAM,OAAO,GAAG,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACjH,OAAO,CACN,KAAC,IAAI,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YACnE,MAAM,CAAC,KAAK,GACP,CACP,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import { type Anchor } from "./parts.js";
|
|
3
|
+
/** The layouts of a sign-up section: the Newsletter block's variants. */
|
|
4
|
+
export declare const SIGNUP_LAYOUTS: readonly ["start", "centered", "panel"];
|
|
5
|
+
export type SignupLayout = (typeof SIGNUP_LAYOUTS)[number];
|
|
6
|
+
export type SignupFieldsProps = {
|
|
7
|
+
/** The id of the field. Two sign-ups on one page need two ids, or a label names the other field. */
|
|
8
|
+
readonly id: string;
|
|
9
|
+
/** The name of the field, for a screen reader and as the placeholder. */
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly button: string;
|
|
12
|
+
readonly maxLength?: number;
|
|
13
|
+
/** The form waits for an answer: the button says so to a screen reader and takes no press. */
|
|
14
|
+
readonly busy?: boolean;
|
|
15
|
+
readonly disabled?: boolean;
|
|
16
|
+
/** What went wrong, under the field. */
|
|
17
|
+
readonly message?: string;
|
|
18
|
+
/** Something between the field and the message, such as a check that the visitor is a person. */
|
|
19
|
+
readonly children?: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* One email field and its button as one control: they share an edge, and the button sits inside
|
|
23
|
+
* it. On a narrow screen the button moves under the field. The caller owns the `<form>`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function SignupFields(props: SignupFieldsProps): ReactElement;
|
|
26
|
+
/** What takes the control's place after a sign-up: the same box, with a tick and one line. */
|
|
27
|
+
export declare function SignupDone({ text }: {
|
|
28
|
+
readonly text: string;
|
|
29
|
+
}): ReactElement;
|
|
30
|
+
export type SignupSectionProps = Anchor & {
|
|
31
|
+
/** The block's name: its `data-block`, and the name in an error about its props. */
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly title: string;
|
|
34
|
+
readonly text?: string;
|
|
35
|
+
/** A line under the form, such as how often mail comes or how to leave the list. */
|
|
36
|
+
readonly note?: string;
|
|
37
|
+
/** The form: the sign-up control inside the caller's own `<form>`, or what replaces it. */
|
|
38
|
+
readonly form: ReactNode;
|
|
39
|
+
};
|
|
40
|
+
/** A sign-up section in one of its layouts, around the caller's form. */
|
|
41
|
+
export declare function signupView(layout: SignupLayout, props: SignupSectionProps): ReactElement;
|
|
42
|
+
//# sourceMappingURL=signup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup.d.ts","sourceRoot":"","sources":["../../../src/website/blocks/signup.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,KAAK,MAAM,EAAyB,MAAM,YAAY,CAAC;AAEhE,yEAAyE;AACzE,eAAO,MAAM,cAAc,yCAA4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CAGxF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { BLOCK_VARIANTS } from "./catalog.js";
|
|
3
|
+
import { BlockIcon } from "./icons.js";
|
|
4
|
+
import { BlockTitle, bandAttrs } from "./parts.js";
|
|
5
|
+
/** The layouts of a sign-up section: the Newsletter block's variants. */
|
|
6
|
+
export const SIGNUP_LAYOUTS = BLOCK_VARIANTS.Newsletter;
|
|
7
|
+
/**
|
|
8
|
+
* One email field and its button as one control: they share an edge, and the button sits inside
|
|
9
|
+
* it. On a narrow screen the button moves under the field. The caller owns the `<form>`.
|
|
10
|
+
*/
|
|
11
|
+
export function SignupFields(props) {
|
|
12
|
+
const messageId = `${props.id}-message`;
|
|
13
|
+
return (_jsxs("div", { className: "site-signup-fields", children: [_jsx("label", { htmlFor: props.id, className: "sr-only", children: props.label }), _jsxs("div", { className: "site-signup", "data-invalid": props.message ? "" : undefined, children: [_jsx("input", { id: props.id, name: "email", type: "email", autoComplete: "email", required: true, maxLength: props.maxLength, placeholder: props.label, "aria-invalid": props.message ? true : undefined, "aria-describedby": props.message ? messageId : undefined, className: "site-signup-input" }), _jsx("button", { type: "submit", className: "site-button site-signup-button", disabled: props.disabled || props.busy, "aria-busy": props.busy ? true : undefined, children: props.button })] }), props.children, props.message ? (_jsx("p", { id: messageId, role: "alert", className: "site-signup-message", children: props.message })) : null] }));
|
|
14
|
+
}
|
|
15
|
+
/** What takes the control's place after a sign-up: the same box, with a tick and one line. */
|
|
16
|
+
export function SignupDone({ text }) {
|
|
17
|
+
return (_jsxs("p", { role: "status", className: "site-signup-fields site-signup-done", children: [_jsx(BlockIcon, { name: "check-circle", className: "site-signup-done-icon" }), _jsx("span", { children: text })] }));
|
|
18
|
+
}
|
|
19
|
+
function Note({ note, center }) {
|
|
20
|
+
if (!note)
|
|
21
|
+
return null;
|
|
22
|
+
return _jsx("p", { className: `site-signup-note ${center ? "text-center" : ""}`, children: note });
|
|
23
|
+
}
|
|
24
|
+
/** The words over the form on a quiet band, aligned to the start (start) or centred (centered). */
|
|
25
|
+
function BandSignup({ props, center }) {
|
|
26
|
+
const head = center ? "site-block-head-center" : "";
|
|
27
|
+
return (_jsx("section", { ...bandAttrs(props.name, props, "site-block site-band-muted"), "data-variant": center ? "centered" : undefined, children: _jsxs("div", { className: "site-container", children: [_jsx(BlockTitle, { block: props.name, title: props.title, highlight: props.highlight, className: `site-block-title ${head}` }), props.text ? _jsx("p", { className: `site-block-intro ${head}`, children: props.text }) : null, _jsxs("div", { className: center ? "site-signup-center" : undefined, children: [props.form, _jsx(Note, { note: props.note, center: center })] })] }) }));
|
|
28
|
+
}
|
|
29
|
+
/** A rounded panel with the words on one side and the form on the other. */
|
|
30
|
+
function PanelSignup(props) {
|
|
31
|
+
return (_jsx("section", { ...bandAttrs(props.name, props, "site-block"), "data-variant": "panel", children: _jsx("div", { className: "site-container", children: _jsxs("div", { className: "site-cta-panel site-signup-panel", children: [_jsxs("div", { children: [_jsx(BlockTitle, { block: props.name, title: props.title, highlight: props.highlight }), props.text ? _jsx("p", { className: "site-media-text", children: props.text }) : null] }), _jsxs("div", { children: [props.form, _jsx(Note, { note: props.note, center: false })] })] }) }) }));
|
|
32
|
+
}
|
|
33
|
+
/** A sign-up section in one of its layouts, around the caller's form. */
|
|
34
|
+
export function signupView(layout, props) {
|
|
35
|
+
if (layout === "panel")
|
|
36
|
+
return _jsx(PanelSignup, { ...props });
|
|
37
|
+
return _jsx(BandSignup, { props: props, center: layout === "centered" });
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=signup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup.js","sourceRoot":"","sources":["../../../src/website/blocks/signup.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,E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