@lets-ship/site 3.3.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/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/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/package.json +1 -1
- package/styles.css +133 -0
|
@@ -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,MAA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{ 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(BlockTitle, { block: "Newsletter", title: props.title, highlight: props.highlight, className: `site-block-title ${head}` }), 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(BlockTitle, { block: "Newsletter", title: props.title, highlight: props.highlight }), 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"}
|
|
@@ -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,yCAA4B,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC/B,oGAAoG;IACpG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,8FAA8F;IAC9F,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,wCAAwC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,iGAAiG;IACjG,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAqCnE;AAED,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAO5E;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IACzC,oFAAoF;IACpF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;CACzB,CAAC;AAqDF,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,kBAAkB,GAAG,YAAY,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,EAAe,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEhE,yEAAyE;AACzE,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,UAAU,CAAC;AAmBxD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB;IACpD,MAAM,SAAS,GAAG,GAAG,KAAK,CAAC,EAAE,UAAU,CAAC;IACxC,OAAO,CACN,eAAK,SAAS,EAAC,oBAAoB,aAClC,gBAAO,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAC,SAAS,YAC3C,K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C,kBAAe,OAAO,YAC5E,cAAK,SAAS,EAAC,gBAAgB,YAC9B,eAAK,SAAS,EAAC,kCAAkC,aAEhD,0BACC,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,EAChF,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,iBAAiB,YAAE,KAAK,CAAC,IAAI,GAAK,CAAC,CAAC,CAAC,IAAI,IAC/D,EACN,0BACE,KAAK,CAAC,IAAI,EACX,KAAC,IAAI,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAI,IACpC,IACD,GACD,GACG,CACV,CAAC;AACH,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,UAAU,CAAC,MAAoB,EAAE,KAAyB;IACzE,IAAI,MAAM,KAAK,OAAO;QAAE,OAAO,KAAC,WAAW,OAAK,KAAK,GAAI,CAAC;IAC1D,OAAO,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,UAAU,GAAI,CAAC;AACpE,CAAC"}
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -1160,6 +1160,139 @@ details[open] > .site-faq-summary .site-faq-caret {
|
|
|
1160
1160
|
outline-offset: 1px;
|
|
1161
1161
|
}
|
|
1162
1162
|
|
|
1163
|
+
/* A sign-up is one control: the field and its button share one edge, and the button sits inside
|
|
1164
|
+
it. The control takes the brand's button radius, grown by its own inset, so the two curves stay
|
|
1165
|
+
parallel. On a narrow screen the button moves under the field. */
|
|
1166
|
+
.site-signup-fields {
|
|
1167
|
+
width: 100%;
|
|
1168
|
+
max-width: 34rem;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.site-signup-center .site-signup-fields {
|
|
1172
|
+
margin-inline: auto;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
.site-signup {
|
|
1176
|
+
--site-signup-inset: 4px;
|
|
1177
|
+
display: flex;
|
|
1178
|
+
align-items: center;
|
|
1179
|
+
gap: var(--site-signup-inset);
|
|
1180
|
+
padding: var(--site-signup-inset);
|
|
1181
|
+
border: var(--dna-border-width-thin) solid var(--site-border);
|
|
1182
|
+
border-radius: calc(var(--dna-component-button-primary-radius) + var(--site-signup-inset));
|
|
1183
|
+
background: var(--color-fd-background);
|
|
1184
|
+
transition: border-color var(--dna-motion-fast) var(--dna-motion-ease);
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.site-signup:hover {
|
|
1188
|
+
border-color: color-mix(in oklab, var(--site-border), var(--site-fg) 30%);
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
/* The ring goes around the whole control, so the field never shows a second edge inside it. */
|
|
1192
|
+
.site-signup:has(.site-signup-input:focus-visible) {
|
|
1193
|
+
outline: var(--dna-focus-width) solid var(--dna-focus-color);
|
|
1194
|
+
outline-offset: var(--dna-focus-offset);
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
.site-signup[data-invalid] {
|
|
1198
|
+
border-color: var(--site-fg);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.site-signup-input {
|
|
1202
|
+
flex: 1;
|
|
1203
|
+
min-width: 0;
|
|
1204
|
+
min-height: var(--dna-control-height-md);
|
|
1205
|
+
padding: 0 12px;
|
|
1206
|
+
border: 0;
|
|
1207
|
+
background: transparent;
|
|
1208
|
+
color: var(--color-fd-foreground);
|
|
1209
|
+
font: inherit;
|
|
1210
|
+
outline: none;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
.site-signup-input::placeholder {
|
|
1214
|
+
color: var(--color-fd-muted-foreground);
|
|
1215
|
+
opacity: 1;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
.site-signup-button {
|
|
1219
|
+
flex: none;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
.site-signup-button:disabled {
|
|
1223
|
+
cursor: default;
|
|
1224
|
+
opacity: 0.6;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.site-signup-message,
|
|
1228
|
+
.site-signup-note {
|
|
1229
|
+
margin-top: 10px;
|
|
1230
|
+
font-size: var(--dna-type-body-sm-size);
|
|
1231
|
+
line-height: var(--dna-type-body-sm-line-height);
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.site-signup-message {
|
|
1235
|
+
font-weight: 600;
|
|
1236
|
+
color: var(--site-fg);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
.site-signup-note {
|
|
1240
|
+
color: var(--site-fg-muted);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
/* A check that the visitor is a person takes room only when it shows something. */
|
|
1244
|
+
.site-signup-check:not(:empty) {
|
|
1245
|
+
margin-top: 10px;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/* After a sign-up the control's own box stays, so the page does not move. */
|
|
1249
|
+
.site-signup-done {
|
|
1250
|
+
display: flex;
|
|
1251
|
+
align-items: center;
|
|
1252
|
+
gap: 10px;
|
|
1253
|
+
min-height: calc(var(--dna-control-height-md) + 2 * 4px + 2 * var(--dna-border-width-thin));
|
|
1254
|
+
padding: 8px 16px;
|
|
1255
|
+
border: var(--dna-border-width-thin) solid var(--site-border);
|
|
1256
|
+
border-radius: calc(var(--dna-component-button-primary-radius) + 4px);
|
|
1257
|
+
background: var(--color-fd-background);
|
|
1258
|
+
color: var(--color-fd-foreground);
|
|
1259
|
+
font-weight: 500;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
.site-signup-done-icon {
|
|
1263
|
+
flex: none;
|
|
1264
|
+
width: 20px;
|
|
1265
|
+
height: 20px;
|
|
1266
|
+
color: var(--color-fd-primary);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
/* The words on one side and the form on the other, in a rounded panel. */
|
|
1270
|
+
.site-signup-panel {
|
|
1271
|
+
display: grid;
|
|
1272
|
+
align-items: center;
|
|
1273
|
+
gap: 24px;
|
|
1274
|
+
padding: 32px;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
@media (min-width: 768px) {
|
|
1278
|
+
.site-signup-panel {
|
|
1279
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
1280
|
+
gap: 48px;
|
|
1281
|
+
padding: 48px;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
@media (max-width: 479px) {
|
|
1286
|
+
.site-signup {
|
|
1287
|
+
flex-direction: column;
|
|
1288
|
+
align-items: stretch;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
.site-signup-input {
|
|
1292
|
+
padding: 0 10px;
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1163
1296
|
.site-contact-detail {
|
|
1164
1297
|
color: var(--site-fg);
|
|
1165
1298
|
font-weight: 500;
|