@asteby/storefront-react 0.11.1 → 0.13.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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/checkout/fields.tsx"],"names":[],"mappings":";;;;AA6BA,IAAM,EAAA,GAAoB;AAAA,EACxB,YAAA,EAAc,sBAAA;AAAA,EACd,aAAA,EAAe,sBAAA;AAAA,EACf,KAAA,EAAO,6DAAA;AAAA,EACP,GAAA,EAAK,mCAAA;AAAA,EACL,OAAA,EAAS,oBAAA;AAAA,EACT,QAAA,EAAU,kCAAA;AAAA,EACV,MAAA,EAAQ,oBAAA;AAAA,EACR,UAAA,EAAY,+BAAA;AAAA,EACZ,WAAA,EAAa,kCAAA;AAAA,EACb,QAAA,EAAU;AACZ,CAAA;AAEA,IAAM,EAAA,GAAoB;AAAA,EACxB,YAAA,EAAc,qBAAA;AAAA,EACd,aAAA,EAAe,mBAAA;AAAA,EACf,KAAA,EAAO,6CAAA;AAAA,EACP,GAAA,EAAK,6BAAA;AAAA,EACL,OAAA,EAAS,mBAAA;AAAA,EACT,QAAA,EAAU,gCAAA;AAAA,EACV,MAAA,EAAQ,mBAAA;AAAA,EACR,UAAA,EAAY,2BAAA;AAAA,EACZ,WAAA,EAAa,8BAAA;AAAA,EACb,QAAA,EAAU;AACZ,CAAA;AAGO,SAAS,aAAA,CAAc,QAAwB,SAAA,EAA0D;AAC9G,EAAA,MAAM,IAAA,GAAA,CAAQ,UAAU,OAAA,EAAS,WAAA,GAAc,UAAA,CAAW,IAAI,IAAI,EAAA,GAAK,EAAA;AACvE,EAAA,OAAO,YAAY,EAAE,GAAG,IAAA,EAAM,GAAG,WAAU,GAAI,IAAA;AACjD;AASA,IAAM,SAAA,GAAY,CAAC,EAAA,KACjB,CAAC,CAAC,EAAA,IAAM,OAAQ,GAAe,OAAA,KAAY,QAAA,IAAY,CAAC,OAAA,EAAS,QAAA,EAAU,UAAU,CAAA,C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,MAAA,MAAM,EAAE,EAAA,EAAI,GAAA,EAAK,GAAG,OAAM,GAAI,IAAA;AAC9B,MAAA,uBAAO,GAAA,CAAC,OAAA,EAAA,EAAO,GAAG,KAAA,EAAQ,GAAG,MAAA,EAAQ,CAAA;AAAA,IACvC,CAAA,GAAG;AAAA,IAGJ,KAAA,mBACC,GAAA,CAAC,GAAA,EAAA,EAAE,EAAA,EAAI,OAAA,EAAS,SAAA,EAAW,EAAA,CAAG,KAAA,EAAO,qBAAA,EAAmB,IAAA,EACrD,QAAA,EAAA,KAAA,EACH,CAAA,GACE;AAAA,GAAA,EACN,CAAA;AAEJ","file":"chunk-DFGLCIEG.js","sourcesContent":["/**\n * Form fields of a checkout with inline validation: a labelled field that shows its own error under it, a focusable\n * error summary for the submit, and one hook that reads the browser's own constraint validation (`required`, `type`,\n * `pattern`, `minLength`...) so the rules stay in the HTML and the page keeps working without JavaScript (then the\n * browser explains the errors itself).\n *\n * WCAG 2.2: errors are identified in text next to the field (3.3.1), linked with `aria-describedby` and `aria-invalid`,\n * and the summary takes focus and links to every field (3.3.1 / 2.4.3). Validation runs when the buyer leaves a field\n * that has a value, and clears as soon as it is fixed: it never nags while typing.\n */\nimport { useEffect, useRef, useState, type InputHTMLAttributes, type ReactNode, type RefObject, type SelectHTMLAttributes } from 'react'\n\nexport type FieldMessages = {\n valueMissing: string\n /** Required radio group (delivery, payment). */\n choiceMissing: string\n email: string\n tel: string\n pattern: string\n /** `{n}` = minimum length. */\n tooShort: string\n /** A field the server rejected. */\n server: string\n /** Error summary title, `{n}` = number of fields. */\n summaryOne: string\n summaryMany: string\n optional: string\n}\n\nconst ES: FieldMessages = {\n valueMissing: 'Completa este campo.',\n choiceMissing: 'Elige una opción.',\n email: 'Escribe un correo válido, por ejemplo nombre@correo.com.',\n tel: 'Escribe un teléfono válido.',\n pattern: 'Revisa el formato.',\n tooShort: 'Escribe al menos {n} caracteres.',\n server: 'Revisa este campo.',\n summaryOne: 'Revisa 1 campo para continuar',\n summaryMany: 'Revisa {n} campos para continuar',\n optional: '(opcional)',\n}\n\nconst EN: FieldMessages = {\n valueMissing: 'Fill in this field.',\n choiceMissing: 'Choose an option.',\n email: 'Enter a valid email, like name@example.com.',\n tel: 'Enter a valid phone number.',\n pattern: 'Check the format.',\n tooShort: 'Enter at least {n} characters.',\n server: 'Check this field.',\n summaryOne: 'Check 1 field to continue',\n summaryMany: 'Check {n} fields to continue',\n optional: '(optional)',\n}\n\n/** Messages for a locale (`es*` default, `en*`), with optional overrides. */\nexport function fieldMessages(locale?: string | null, overrides?: Partial<FieldMessages> | null): FieldMessages {\n const base = (locale ?? 'es-MX').toLowerCase().startsWith('en') ? EN : ES\n return overrides ? { ...base, ...overrides } : base\n}\n\n/** Field name -> error text. */\nexport type FieldErrors = Record<string, string>\n\nexport type ErrorSummaryItem = { name: string; id: string; label: string; message: string }\n\ntype Control = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n\nconst isControl = (el: EventTarget | null): el is Control =>\n !!el && typeof (el as Element).tagName === 'string' && ['INPUT', 'SELECT', 'TEXTAREA'].includes((el as Element).tagName) && !!(el as Control).name\n\n/**\n * The error text for a control, from its validity. A control can bring its own text with `data-sf-error` (any\n * failure) or `title` (pattern mismatch, the HTML convention).\n */\nexport function validationMessage(el: Control, m: FieldMessages = ES): string | null {\n const v = el.validity\n if (!v || v.valid) return null\n const own = el.getAttribute('data-sf-error')\n if (own) return own\n if (v.valueMissing) return el instanceof HTMLInputElement && (el.type === 'radio' || el.type === 'checkbox') ? m.choiceMissing : m.valueMissing\n if (v.typeMismatch && el instanceof HTMLInputElement) return el.type === 'email' ? m.email : el.type === 'tel' ? m.tel : m.pattern\n if (v.patternMismatch) return el.getAttribute('title') || (el instanceof HTMLInputElement && el.type === 'tel' ? m.tel : m.pattern)\n if (v.tooShort && el instanceof HTMLInputElement) return m.tooShort.replace('{n}', String(el.minLength))\n return el.validationMessage || m.pattern\n}\n\n/** Visible name of a control: its `<label>`, `aria-label`, or the legend of its group (radios). */\nfunction labelOf(el: Control): string {\n if (el instanceof HTMLInputElement && el.type === 'radio') {\n const legend = el.closest('fieldset')?.querySelector('legend')\n if (legend?.textContent) return legend.textContent.trim()\n }\n const text = el.labels?.[0]?.getAttribute('data-sf-label') ?? el.labels?.[0]?.textContent ?? el.getAttribute('aria-label') ?? el.name\n return text.trim()\n}\n\nexport type UseFieldErrorsOptions = {\n locale?: string\n messages?: Partial<FieldMessages>\n /** Fields the server rejected (e.g. from the action), shown with `serverMessages[name]` or the generic text. */\n serverFields?: Iterable<string> | null\n serverMessages?: Record<string, string> | null\n}\n\nexport type FieldErrorsState = {\n errors: FieldErrors\n /** Non-null after a submit with problems (or with server errors): render it in `<ErrorSummary>`. */\n summary: ErrorSummaryItem[] | null\n /** Changes every time a new summary appears, so `<ErrorSummary>` focuses it again. */\n summaryKey: number\n clear: () => void\n}\n\n/**\n * Inline validation for the page `<form>`. Listens to the form (no wrapping component): leaving a field with a value\n * checks it; typing in a field with an error clears it when fixed; a submit or `reportValidity()` with problems\n * collects them (the browser's bubbles are replaced by the inline texts) for the summary.\n */\nexport function useFieldErrors(formRef: RefObject<HTMLFormElement | null>, options: UseFieldErrorsOptions = {}): FieldErrorsState {\n const m = fieldMessages(options.locale, options.messages)\n const live = useRef(m)\n live.current = m\n const server = [...(options.serverFields ?? [])]\n const serverKey = server.join('|')\n const [errors, setErrors] = useState<FieldErrors>(() => Object.fromEntries(server.map((n) => [n, options.serverMessages?.[n] ?? m.server])))\n const [summary, setSummary] = useState<ErrorSummaryItem[] | null>(null)\n const [summaryKey, setSummaryKey] = useState(0)\n\n // Server errors (a new action result): inline texts plus a summary.\n useEffect(() => {\n if (!server.length) return\n const form = formRef.current\n const items: ErrorSummaryItem[] = []\n const next: FieldErrors = {}\n for (const name of server) {\n const msg = options.serverMessages?.[name] ?? live.current.server\n next[name] = msg\n const el = form?.elements.namedItem(name)\n const ctl = el && 'length' in el && !(el instanceof HTMLSelectElement) ? ((el as RadioNodeList)[0] as Control | undefined) : (el as Control | null)\n if (ctl) items.push({ name, id: ctl.id || name, label: labelOf(ctl), message: msg })\n }\n setErrors((e) => ({ ...e, ...next }))\n if (items.length) {\n setSummary(items)\n setSummaryKey((k) => k + 1)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [serverKey])\n\n useEffect(() => {\n const form = formRef.current\n if (!form) return\n let batch: Control[] | null = null\n const set = (name: string, msg: string | null) =>\n setErrors((e) => {\n if (msg === null) {\n if (!(name in e)) return e\n const { [name]: _gone, ...rest } = e\n return rest\n }\n return e[name] === msg ? e : { ...e, [name]: msg }\n })\n const onBlur = (ev: FocusEvent) => {\n const el = ev.target\n if (!isControl(el) || (el instanceof HTMLInputElement && (el.type === 'radio' || el.type === 'checkbox' || el.type === 'hidden'))) return\n // Leaving an empty field you only tabbed through is not an error yet; it is at submit.\n if (!el.value) return\n set(el.name, validationMessage(el, live.current))\n }\n const onInput = (ev: Event) => {\n const el = ev.target\n if (!isControl(el)) return\n setErrors((e) => {\n if (!(el.name in e)) return e\n const msg = el.validity.valid ? null : validationMessage(el, live.current)\n if (msg !== null) return e // keep the text until the field is fixed (no flicker while typing)\n const { [el.name]: _gone, ...rest } = e\n return rest\n })\n }\n const onInvalid = (ev: Event) => {\n const el = ev.target\n if (!isControl(el)) return\n ev.preventDefault() // the inline text replaces the browser bubble\n if (!batch) {\n batch = []\n queueMicrotask(() => {\n const list = batch ?? []\n batch = null\n const seen = new Set<string>()\n const items: ErrorSummaryItem[] = []\n const next: FieldErrors = {}\n for (const c of list) {\n if (seen.has(c.name)) continue\n seen.add(c.name)\n const msg = validationMessage(c, live.current) ?? live.current.valueMissing\n next[c.name] = msg\n items.push({ name: c.name, id: c.id || c.name, label: labelOf(c), message: msg })\n }\n setErrors((e) => ({ ...e, ...next }))\n setSummary(items)\n setSummaryKey((k) => k + 1)\n })\n }\n batch.push(el)\n }\n form.addEventListener('focusout', onBlur)\n form.addEventListener('input', onInput)\n form.addEventListener('change', onInput)\n form.addEventListener('invalid', onInvalid, true)\n return () => {\n form.removeEventListener('focusout', onBlur)\n form.removeEventListener('input', onInput)\n form.removeEventListener('change', onInput)\n form.removeEventListener('invalid', onInvalid, true)\n }\n }, [formRef])\n\n // The summary follows the fixes: a field fixed after the submit leaves the list.\n const shown = summary ? summary.filter((s) => s.name in errors).map((s) => ({ ...s, message: errors[s.name]! })) : null\n return {\n errors,\n summary: shown && shown.length ? shown : null,\n summaryKey,\n clear: () => {\n setErrors({})\n setSummary(null)\n },\n }\n}\n\nexport type ErrorSummaryProps = {\n items: readonly ErrorSummaryItem[] | null\n /** Changes when a new summary must take focus (`useFieldErrors().summaryKey`). */\n focusKey?: number\n locale?: string\n messages?: Partial<FieldMessages>\n title?: ReactNode\n className?: string\n classNames?: Partial<Record<'title' | 'list' | 'link', string>>\n}\n\n/**\n * The list of problems after a submit, above the form: `role=\"alert\"`, takes focus, one link per field (moves the\n * focus to it). Renders nothing without items.\n */\nexport function ErrorSummary({ items, focusKey, locale, messages, title, className, classNames: cx = {} }: ErrorSummaryProps) {\n const ref = useRef<HTMLDivElement>(null)\n const m = fieldMessages(locale, messages)\n const has = !!items && items.length > 0\n useEffect(() => {\n if (has) ref.current?.focus()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [focusKey])\n if (!has) return null\n const n = items!.length\n return (\n <div ref={ref} role=\"alert\" tabIndex={-1} className={className} data-sf-error-summary aria-labelledby=\"sf-error-summary-title\">\n <p id=\"sf-error-summary-title\" className={cx.title} data-sf-error-summary-title>\n {title ?? (n === 1 ? m.summaryOne : m.summaryMany.replace('{n}', String(n)))}\n </p>\n <ul className={cx.list}>\n {items!.map((it) => (\n <li key={it.name}>\n <a\n href={`#${it.id}`}\n className={cx.link}\n onClick={(e) => {\n const el = document.getElementById(it.id)\n if (!el) return\n e.preventDefault()\n el.focus()\n el.scrollIntoView?.({ block: 'center' })\n }}\n >\n {it.label}: {it.message}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )\n}\n\nexport type CheckoutFieldClassNames = Partial<Record<'root' | 'label' | 'optional' | 'input' | 'hint' | 'error', string>>\n\ntype BaseFieldProps = {\n name: string\n label: string\n /** Field id. Default: the name. */\n id?: string\n /** Error text (from `useFieldErrors().errors[name]` or the server). */\n error?: string | null\n /** Help under the label (\"we only use it for the delivery\"). */\n hint?: ReactNode\n /** Marks the label \"(optional)\" and drops `required`. */\n optional?: boolean\n classNames?: CheckoutFieldClassNames\n locale?: string\n messages?: Partial<FieldMessages>\n}\n\nexport type CheckoutFieldProps = BaseFieldProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id'> & { as?: 'input' }\nexport type CheckoutSelectProps = BaseFieldProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'name' | 'id'> & { as: 'select'; children: ReactNode }\n\n/**\n * One labelled field: label (with \"(optional)\"), hint, the control and its error text, wired with `aria-describedby`\n * and `aria-invalid`. Required unless `optional`. `as=\"select\"` renders a `<select>` with the given options.\n */\nexport function CheckoutField(props: CheckoutFieldProps | CheckoutSelectProps) {\n const { name, label, id = name, error, hint, optional = false, classNames: cx = {}, locale, messages, ...rest } = props\n const m = fieldMessages(locale, messages)\n const hintId = hint ? `${id}-hint` : undefined\n const errorId = `${id}-error`\n const describedBy = [hintId, error ? errorId : undefined].filter(Boolean).join(' ') || undefined\n const common = {\n id,\n name,\n required: !optional,\n 'aria-invalid': error ? true : undefined,\n 'aria-describedby': describedBy,\n className: cx.input,\n 'data-sf-field-control': '',\n } as const\n return (\n <div className={cx.root} data-sf-field data-invalid={error ? '' : undefined}>\n <label htmlFor={id} className={cx.label} data-sf-label={label}>\n {label}\n {optional ? (\n <span className={cx.optional} data-sf-field-optional>\n {' '}\n {m.optional}\n </span>\n ) : null}\n </label>\n {hint ? (\n <p id={hintId} className={cx.hint} data-sf-field-hint>\n {hint}\n </p>\n ) : null}\n {rest.as === 'select' ? (\n (() => {\n const { as: _as, children, ...select } = rest\n return (\n <select {...select} {...common}>\n {children}\n </select>\n )\n })()\n ) : (\n (() => {\n const { as: _as, ...input } = rest as CheckoutFieldProps\n return <input {...input} {...common} />\n })()\n )}\n {/* Reserved only when there is an error: the text sits right under its field. */}\n {error ? (\n <p id={errorId} className={cx.error} data-sf-field-error>\n {error}\n </p>\n ) : null}\n </div>\n )\n}\n"]}
@@ -0,0 +1,101 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, InputHTMLAttributes, SelectHTMLAttributes, RefObject } from 'react';
3
+
4
+ type FieldMessages = {
5
+ valueMissing: string;
6
+ /** Required radio group (delivery, payment). */
7
+ choiceMissing: string;
8
+ email: string;
9
+ tel: string;
10
+ pattern: string;
11
+ /** `{n}` = minimum length. */
12
+ tooShort: string;
13
+ /** A field the server rejected. */
14
+ server: string;
15
+ /** Error summary title, `{n}` = number of fields. */
16
+ summaryOne: string;
17
+ summaryMany: string;
18
+ optional: string;
19
+ };
20
+ /** Messages for a locale (`es*` default, `en*`), with optional overrides. */
21
+ declare function fieldMessages(locale?: string | null, overrides?: Partial<FieldMessages> | null): FieldMessages;
22
+ /** Field name -> error text. */
23
+ type FieldErrors = Record<string, string>;
24
+ type ErrorSummaryItem = {
25
+ name: string;
26
+ id: string;
27
+ label: string;
28
+ message: string;
29
+ };
30
+ type Control = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
31
+ /**
32
+ * The error text for a control, from its validity. A control can bring its own text with `data-sf-error` (any
33
+ * failure) or `title` (pattern mismatch, the HTML convention).
34
+ */
35
+ declare function validationMessage(el: Control, m?: FieldMessages): string | null;
36
+ type UseFieldErrorsOptions = {
37
+ locale?: string;
38
+ messages?: Partial<FieldMessages>;
39
+ /** Fields the server rejected (e.g. from the action), shown with `serverMessages[name]` or the generic text. */
40
+ serverFields?: Iterable<string> | null;
41
+ serverMessages?: Record<string, string> | null;
42
+ };
43
+ type FieldErrorsState = {
44
+ errors: FieldErrors;
45
+ /** Non-null after a submit with problems (or with server errors): render it in `<ErrorSummary>`. */
46
+ summary: ErrorSummaryItem[] | null;
47
+ /** Changes every time a new summary appears, so `<ErrorSummary>` focuses it again. */
48
+ summaryKey: number;
49
+ clear: () => void;
50
+ };
51
+ /**
52
+ * Inline validation for the page `<form>`. Listens to the form (no wrapping component): leaving a field with a value
53
+ * checks it; typing in a field with an error clears it when fixed; a submit or `reportValidity()` with problems
54
+ * collects them (the browser's bubbles are replaced by the inline texts) for the summary.
55
+ */
56
+ declare function useFieldErrors(formRef: RefObject<HTMLFormElement | null>, options?: UseFieldErrorsOptions): FieldErrorsState;
57
+ type ErrorSummaryProps = {
58
+ items: readonly ErrorSummaryItem[] | null;
59
+ /** Changes when a new summary must take focus (`useFieldErrors().summaryKey`). */
60
+ focusKey?: number;
61
+ locale?: string;
62
+ messages?: Partial<FieldMessages>;
63
+ title?: ReactNode;
64
+ className?: string;
65
+ classNames?: Partial<Record<'title' | 'list' | 'link', string>>;
66
+ };
67
+ /**
68
+ * The list of problems after a submit, above the form: `role="alert"`, takes focus, one link per field (moves the
69
+ * focus to it). Renders nothing without items.
70
+ */
71
+ declare function ErrorSummary({ items, focusKey, locale, messages, title, className, classNames: cx }: ErrorSummaryProps): react.JSX.Element | null;
72
+ type CheckoutFieldClassNames = Partial<Record<'root' | 'label' | 'optional' | 'input' | 'hint' | 'error', string>>;
73
+ type BaseFieldProps = {
74
+ name: string;
75
+ label: string;
76
+ /** Field id. Default: the name. */
77
+ id?: string;
78
+ /** Error text (from `useFieldErrors().errors[name]` or the server). */
79
+ error?: string | null;
80
+ /** Help under the label ("we only use it for the delivery"). */
81
+ hint?: ReactNode;
82
+ /** Marks the label "(optional)" and drops `required`. */
83
+ optional?: boolean;
84
+ classNames?: CheckoutFieldClassNames;
85
+ locale?: string;
86
+ messages?: Partial<FieldMessages>;
87
+ };
88
+ type CheckoutFieldProps = BaseFieldProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id'> & {
89
+ as?: 'input';
90
+ };
91
+ type CheckoutSelectProps = BaseFieldProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'name' | 'id'> & {
92
+ as: 'select';
93
+ children: ReactNode;
94
+ };
95
+ /**
96
+ * One labelled field: label (with "(optional)"), hint, the control and its error text, wired with `aria-describedby`
97
+ * and `aria-invalid`. Required unless `optional`. `as="select"` renders a `<select>` with the given options.
98
+ */
99
+ declare function CheckoutField(props: CheckoutFieldProps | CheckoutSelectProps): react.JSX.Element;
100
+
101
+ export { CheckoutField as C, ErrorSummary as E, type FieldErrors as F, type UseFieldErrorsOptions as U, type CheckoutFieldClassNames as a, type CheckoutFieldProps as b, type CheckoutSelectProps as c, type ErrorSummaryItem as d, type ErrorSummaryProps as e, type FieldErrorsState as f, type FieldMessages as g, fieldMessages as h, useFieldErrors as u, validationMessage as v };
@@ -0,0 +1,101 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, InputHTMLAttributes, SelectHTMLAttributes, RefObject } from 'react';
3
+
4
+ type FieldMessages = {
5
+ valueMissing: string;
6
+ /** Required radio group (delivery, payment). */
7
+ choiceMissing: string;
8
+ email: string;
9
+ tel: string;
10
+ pattern: string;
11
+ /** `{n}` = minimum length. */
12
+ tooShort: string;
13
+ /** A field the server rejected. */
14
+ server: string;
15
+ /** Error summary title, `{n}` = number of fields. */
16
+ summaryOne: string;
17
+ summaryMany: string;
18
+ optional: string;
19
+ };
20
+ /** Messages for a locale (`es*` default, `en*`), with optional overrides. */
21
+ declare function fieldMessages(locale?: string | null, overrides?: Partial<FieldMessages> | null): FieldMessages;
22
+ /** Field name -> error text. */
23
+ type FieldErrors = Record<string, string>;
24
+ type ErrorSummaryItem = {
25
+ name: string;
26
+ id: string;
27
+ label: string;
28
+ message: string;
29
+ };
30
+ type Control = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
31
+ /**
32
+ * The error text for a control, from its validity. A control can bring its own text with `data-sf-error` (any
33
+ * failure) or `title` (pattern mismatch, the HTML convention).
34
+ */
35
+ declare function validationMessage(el: Control, m?: FieldMessages): string | null;
36
+ type UseFieldErrorsOptions = {
37
+ locale?: string;
38
+ messages?: Partial<FieldMessages>;
39
+ /** Fields the server rejected (e.g. from the action), shown with `serverMessages[name]` or the generic text. */
40
+ serverFields?: Iterable<string> | null;
41
+ serverMessages?: Record<string, string> | null;
42
+ };
43
+ type FieldErrorsState = {
44
+ errors: FieldErrors;
45
+ /** Non-null after a submit with problems (or with server errors): render it in `<ErrorSummary>`. */
46
+ summary: ErrorSummaryItem[] | null;
47
+ /** Changes every time a new summary appears, so `<ErrorSummary>` focuses it again. */
48
+ summaryKey: number;
49
+ clear: () => void;
50
+ };
51
+ /**
52
+ * Inline validation for the page `<form>`. Listens to the form (no wrapping component): leaving a field with a value
53
+ * checks it; typing in a field with an error clears it when fixed; a submit or `reportValidity()` with problems
54
+ * collects them (the browser's bubbles are replaced by the inline texts) for the summary.
55
+ */
56
+ declare function useFieldErrors(formRef: RefObject<HTMLFormElement | null>, options?: UseFieldErrorsOptions): FieldErrorsState;
57
+ type ErrorSummaryProps = {
58
+ items: readonly ErrorSummaryItem[] | null;
59
+ /** Changes when a new summary must take focus (`useFieldErrors().summaryKey`). */
60
+ focusKey?: number;
61
+ locale?: string;
62
+ messages?: Partial<FieldMessages>;
63
+ title?: ReactNode;
64
+ className?: string;
65
+ classNames?: Partial<Record<'title' | 'list' | 'link', string>>;
66
+ };
67
+ /**
68
+ * The list of problems after a submit, above the form: `role="alert"`, takes focus, one link per field (moves the
69
+ * focus to it). Renders nothing without items.
70
+ */
71
+ declare function ErrorSummary({ items, focusKey, locale, messages, title, className, classNames: cx }: ErrorSummaryProps): react.JSX.Element | null;
72
+ type CheckoutFieldClassNames = Partial<Record<'root' | 'label' | 'optional' | 'input' | 'hint' | 'error', string>>;
73
+ type BaseFieldProps = {
74
+ name: string;
75
+ label: string;
76
+ /** Field id. Default: the name. */
77
+ id?: string;
78
+ /** Error text (from `useFieldErrors().errors[name]` or the server). */
79
+ error?: string | null;
80
+ /** Help under the label ("we only use it for the delivery"). */
81
+ hint?: ReactNode;
82
+ /** Marks the label "(optional)" and drops `required`. */
83
+ optional?: boolean;
84
+ classNames?: CheckoutFieldClassNames;
85
+ locale?: string;
86
+ messages?: Partial<FieldMessages>;
87
+ };
88
+ type CheckoutFieldProps = BaseFieldProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id'> & {
89
+ as?: 'input';
90
+ };
91
+ type CheckoutSelectProps = BaseFieldProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'name' | 'id'> & {
92
+ as: 'select';
93
+ children: ReactNode;
94
+ };
95
+ /**
96
+ * One labelled field: label (with "(optional)"), hint, the control and its error text, wired with `aria-describedby`
97
+ * and `aria-invalid`. Required unless `optional`. `as="select"` renders a `<select>` with the given options.
98
+ */
99
+ declare function CheckoutField(props: CheckoutFieldProps | CheckoutSelectProps): react.JSX.Element;
100
+
101
+ export { CheckoutField as C, ErrorSummary as E, type FieldErrors as F, type UseFieldErrorsOptions as U, type CheckoutFieldClassNames as a, type CheckoutFieldProps as b, type CheckoutSelectProps as c, type ErrorSummaryItem as d, type ErrorSummaryProps as e, type FieldErrorsState as f, type FieldMessages as g, fieldMessages as h, useFieldErrors as u, validationMessage as v };