@tonycodes-ui/mortar 0.23.0 → 0.24.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/auth.d.ts CHANGED
@@ -26,6 +26,7 @@ export declare function ProviderButtons({ providers, layout, label, className, }
26
26
  export declare function AuthHeader({ logo, title, description, headingLevel, headingId, className, titleClassName, }: {
27
27
  logo?: ReactNode;
28
28
  title: string;
29
+ /** Phrasing content only; rendered inside a `<p>`. */
29
30
  description?: ReactNode;
30
31
  headingLevel: HeadingLevel;
31
32
  headingId: string;
@@ -35,6 +36,7 @@ export declare function AuthHeader({ logo, title, description, headingLevel, hea
35
36
  export interface AuthLayoutProps {
36
37
  /** The screen's heading, e.g. "Sign in to your account". */
37
38
  title: string;
39
+ /** Phrasing content only (text, links, emphasis). Rendered inside a `<p>`. */
38
40
  description?: ReactNode;
39
41
  /** Logo node above the heading. */
40
42
  logo?: ReactNode;
@@ -64,6 +64,7 @@ export declare function SaveBar({ open, message, saveLabel, discardLabel, onSave
64
64
  }): import("react").JSX.Element;
65
65
  /** Site-wide announcement bar with an optional link and dismiss button. */
66
66
  export declare function Banner({ children, action, onDismiss, label, dismissLabel, tone, variant, placement, id, className, }: {
67
+ /** Phrasing content only (text, links, emphasis). Rendered inside a `<p>`. */
67
68
  children: ReactNode;
68
69
  action?: LinkAction;
69
70
  onDismiss?: () => void;
package/docs/agents.md CHANGED
@@ -108,6 +108,7 @@ Add `--json` for machine-readable output. `mortar audit` exits with status 1 whe
108
108
  | `class-override` | error | A Tailwind arbitrary variant that targets `.m-*` classes, such as `[&_.m-button]:rounded-none` |
109
109
  | `local-copy` | error | A copy of a Mortar source file, or code rendering Mortar's component marker |
110
110
  | `raw-element` | error | A raw `<table>`, `<select>`, `<textarea>`, `<dialog>`, `<progress>` or `<input>` (by type; not `hidden`, `file`, `range`, `color` or `image`) anywhere in an app that uses Mortar, naming the component to use instead. A raw `<button>` is a warning. The mapping comes from each contract's `replaces` field, so new components extend it |
111
+ | `invalid-phrasing` | error | A block HTML element (`div`, `p`, heading, list, …) in a phrasing-only slot that Mortar renders inside a `<p>` (from each contract's `phrasingSlots`, today `Banner` `children` and `AuthLayout` `description`) |
111
112
  | `legacy-package` | error | An import or `package.json` dependency of the retired private-registry package (see [CHANGELOG Migration](../CHANGELOG.md#migration)); install and import `@tonycodes-ui/mortar` instead. A `node_modules` copy of the old package does not count as installing the public one |
112
113
  | `email-app-import` | error | In an email (a file importing `@tonycodes-ui/mortar/email` or React Email), an app component or `styles.css`, naming the email component to use. Raw elements in emails are not reported: email layout is tables |
113
114
  | `email-peer-missing` | error | `@tonycodes-ui/mortar/email` is imported but `@react-email/components` is not in package.json |
@@ -2,7 +2,7 @@
2
2
 
3
3
  Every auth screen is a page of its own, built from the same parts:
4
4
 
5
- - **AuthLayout** is the page. It renders the `main` landmark and the page's `h1`, with an optional logo, description and footer link. `layout="center"` sets the form on the page, `layout="cards"` on a raised card, and `layout="split"` beside an `aside` (a quote or image) on wide screens.
5
+ - **AuthLayout** is the page. It renders the `main` landmark and the page's `h1`, with an optional logo, description and footer link. The description is phrasing-only (a string or inline markup): it sits inside a `<p>`, so a nested `<p>`, `<div>` or heading is invalid. `layout="center"` sets the form on the page, `layout="cards"` on a raised card, and `layout="split"` beside an `aside` (a quote or image) on wide screens.
6
6
  - **ProviderButtons** lists sign-in providers (GitHub, Google, SSO). Separate them from the email form with `<Divider label="or continue with" soft spacing="none" />`.
7
7
  - **PasswordInput** is every password field: a show/hide toggle, the right `autocomplete`, an optional requirement checklist and a strength meter.
8
8
  - **CodeInput** is every one-time code: one input drawn as a cell per character.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonycodes-ui/mortar",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Mortar: a shared design foundation, application and marketing UI for React and Tailwind.",
5
5
  "keywords": [
6
6
  "react",
package/src/auth.tsx CHANGED
@@ -74,6 +74,7 @@ export function AuthHeader({
74
74
  }: {
75
75
  logo?: ReactNode;
76
76
  title: string;
77
+ /** Phrasing content only; rendered inside a `<p>`. */
77
78
  description?: ReactNode;
78
79
  headingLevel: HeadingLevel;
79
80
  headingId: string;
@@ -95,6 +96,7 @@ export function AuthHeader({
95
96
  export interface AuthLayoutProps {
96
97
  /** The screen's heading, e.g. "Sign in to your account". */
97
98
  title: string;
99
+ /** Phrasing content only (text, links, emphasis). Rendered inside a `<p>`. */
98
100
  description?: ReactNode;
99
101
  /** Logo node above the heading. */
100
102
  logo?: ReactNode;
package/src/feedback.tsx CHANGED
@@ -328,6 +328,7 @@ export function Banner({
328
328
  id,
329
329
  className,
330
330
  }: {
331
+ /** Phrasing content only (text, links, emphasis). Rendered inside a `<p>`. */
331
332
  children: ReactNode;
332
333
  action?: LinkAction;
333
334
  onDismiss?: () => void;