shelving 1.236.2 → 1.237.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/extract/IndexExtractor.js +9 -2
  2. package/extract/MergingExtractor.d.ts +3 -1
  3. package/extract/MergingExtractor.js +41 -3
  4. package/extract/TypescriptExtractor.d.ts +1 -0
  5. package/extract/TypescriptExtractor.js +12 -2
  6. package/package.json +1 -1
  7. package/ui/README.md +19 -274
  8. package/ui/app/App.d.ts +1 -0
  9. package/ui/app/App.js +1 -0
  10. package/ui/app/App.md +58 -0
  11. package/ui/app/App.tsx +1 -0
  12. package/ui/block/Card.d.ts +1 -0
  13. package/ui/block/Card.js +1 -0
  14. package/ui/block/Card.md +85 -0
  15. package/ui/block/Card.tsx +1 -0
  16. package/ui/block/Heading.d.ts +1 -0
  17. package/ui/block/Heading.js +1 -0
  18. package/ui/block/Heading.md +70 -0
  19. package/ui/block/Heading.tsx +1 -0
  20. package/ui/block/List.d.ts +1 -0
  21. package/ui/block/List.js +1 -0
  22. package/ui/block/List.md +51 -0
  23. package/ui/block/List.tsx +1 -0
  24. package/ui/block/Panel.d.ts +1 -0
  25. package/ui/block/Panel.js +1 -0
  26. package/ui/block/Panel.md +50 -0
  27. package/ui/block/Panel.tsx +1 -0
  28. package/ui/block/Paragraph.d.ts +1 -0
  29. package/ui/block/Paragraph.js +1 -0
  30. package/ui/block/Paragraph.md +48 -0
  31. package/ui/block/Paragraph.tsx +1 -0
  32. package/ui/block/Prose.d.ts +1 -0
  33. package/ui/block/Prose.js +1 -0
  34. package/ui/block/Prose.md +49 -0
  35. package/ui/block/Prose.tsx +1 -0
  36. package/ui/block/Section.d.ts +6 -0
  37. package/ui/block/Section.js +6 -0
  38. package/ui/block/Section.md +56 -0
  39. package/ui/block/Section.tsx +6 -0
  40. package/ui/block/Subheading.d.ts +1 -0
  41. package/ui/block/Subheading.js +1 -0
  42. package/ui/block/Subheading.md +58 -0
  43. package/ui/block/Subheading.tsx +1 -0
  44. package/ui/block/Table.d.ts +1 -0
  45. package/ui/block/Table.js +1 -0
  46. package/ui/block/Table.md +54 -0
  47. package/ui/block/Table.tsx +1 -0
  48. package/ui/block/Title.d.ts +1 -0
  49. package/ui/block/Title.js +1 -0
  50. package/ui/block/Title.md +57 -0
  51. package/ui/block/Title.tsx +1 -0
  52. package/ui/dialog/Dialog.d.ts +1 -0
  53. package/ui/dialog/Dialog.js +1 -0
  54. package/ui/dialog/Dialog.md +73 -0
  55. package/ui/dialog/Dialog.tsx +1 -0
  56. package/ui/dialog/Modal.d.ts +1 -0
  57. package/ui/dialog/Modal.js +1 -0
  58. package/ui/dialog/Modal.md +40 -0
  59. package/ui/dialog/Modal.tsx +1 -0
  60. package/ui/docs/DocumentationButtons.d.ts +2 -0
  61. package/ui/docs/DocumentationButtons.js +2 -0
  62. package/ui/docs/DocumentationButtons.md +38 -0
  63. package/ui/docs/DocumentationButtons.tsx +2 -0
  64. package/ui/docs/DocumentationCard.d.ts +1 -0
  65. package/ui/docs/DocumentationCard.js +1 -0
  66. package/ui/docs/DocumentationCard.md +35 -0
  67. package/ui/docs/DocumentationCard.tsx +1 -0
  68. package/ui/docs/DocumentationKind.d.ts +1 -1
  69. package/ui/docs/DocumentationKind.js +9 -4
  70. package/ui/docs/DocumentationKind.tsx +10 -5
  71. package/ui/docs/DocumentationPage.d.ts +1 -0
  72. package/ui/docs/DocumentationPage.js +2 -0
  73. package/ui/docs/DocumentationPage.md +46 -0
  74. package/ui/docs/DocumentationPage.tsx +2 -0
  75. package/ui/form/Button.d.ts +1 -0
  76. package/ui/form/Button.js +1 -0
  77. package/ui/form/Button.md +88 -0
  78. package/ui/form/Button.tsx +1 -0
  79. package/ui/form/Field.d.ts +6 -1
  80. package/ui/form/Field.js +6 -1
  81. package/ui/form/Field.md +59 -0
  82. package/ui/form/Field.tsx +6 -1
  83. package/ui/form/Form.d.ts +1 -0
  84. package/ui/form/Form.md +118 -0
  85. package/ui/form/Form.tsx +1 -0
  86. package/ui/form/FormStore.md +47 -0
  87. package/ui/form/SchemaInput.d.ts +1 -0
  88. package/ui/form/SchemaInput.md +64 -0
  89. package/ui/form/SchemaInput.tsx +1 -0
  90. package/ui/inline/Code.d.ts +1 -0
  91. package/ui/inline/Code.js +1 -0
  92. package/ui/inline/Code.md +58 -0
  93. package/ui/inline/Code.tsx +1 -0
  94. package/ui/inline/Link.d.ts +1 -0
  95. package/ui/inline/Link.js +1 -0
  96. package/ui/inline/Link.md +47 -0
  97. package/ui/inline/Link.tsx +1 -0
  98. package/ui/inline/Mark.d.ts +1 -0
  99. package/ui/inline/Mark.js +1 -0
  100. package/ui/inline/Mark.md +40 -0
  101. package/ui/inline/Mark.tsx +1 -0
  102. package/ui/inline/Strong.d.ts +1 -0
  103. package/ui/inline/Strong.js +1 -0
  104. package/ui/inline/Strong.md +34 -0
  105. package/ui/inline/Strong.tsx +1 -0
  106. package/ui/layout/CenteredLayout.d.ts +1 -0
  107. package/ui/layout/CenteredLayout.js +1 -0
  108. package/ui/layout/CenteredLayout.md +38 -0
  109. package/ui/layout/CenteredLayout.tsx +1 -0
  110. package/ui/layout/SidebarLayout.d.ts +1 -0
  111. package/ui/layout/SidebarLayout.js +1 -0
  112. package/ui/layout/SidebarLayout.md +65 -0
  113. package/ui/layout/SidebarLayout.tsx +1 -0
  114. package/ui/menu/Menu.d.ts +2 -0
  115. package/ui/menu/Menu.js +2 -0
  116. package/ui/menu/Menu.md +51 -0
  117. package/ui/menu/Menu.tsx +2 -0
  118. package/ui/menu/MenuItem.md +54 -0
  119. package/ui/misc/Catcher.d.ts +1 -0
  120. package/ui/misc/Catcher.js +1 -0
  121. package/ui/misc/Catcher.md +41 -0
  122. package/ui/misc/Catcher.tsx +1 -0
  123. package/ui/misc/Loading.d.ts +1 -0
  124. package/ui/misc/Loading.js +1 -0
  125. package/ui/misc/Loading.md +28 -0
  126. package/ui/misc/Loading.tsx +1 -0
  127. package/ui/misc/Mapper.md +40 -0
  128. package/ui/misc/Markup.d.ts +1 -0
  129. package/ui/misc/Markup.js +1 -0
  130. package/ui/misc/Markup.md +34 -0
  131. package/ui/misc/Markup.tsx +1 -0
  132. package/ui/misc/StatusIcon.d.ts +1 -0
  133. package/ui/misc/StatusIcon.js +1 -0
  134. package/ui/misc/StatusIcon.md +25 -0
  135. package/ui/misc/StatusIcon.tsx +1 -0
  136. package/ui/misc/Tag.d.ts +1 -0
  137. package/ui/misc/Tag.js +1 -0
  138. package/ui/misc/Tag.md +47 -0
  139. package/ui/misc/Tag.tsx +1 -0
  140. package/ui/notice/Notice.d.ts +1 -0
  141. package/ui/notice/Notice.js +1 -0
  142. package/ui/notice/Notice.md +53 -0
  143. package/ui/notice/Notice.tsx +1 -0
  144. package/ui/notice/Notices.d.ts +1 -0
  145. package/ui/notice/Notices.js +1 -0
  146. package/ui/notice/Notices.md +59 -0
  147. package/ui/notice/Notices.tsx +1 -0
  148. package/ui/page/HTML.d.ts +1 -0
  149. package/ui/page/HTML.js +1 -0
  150. package/ui/page/HTML.md +36 -0
  151. package/ui/page/HTML.tsx +1 -0
  152. package/ui/page/Head.d.ts +1 -0
  153. package/ui/page/Head.js +1 -0
  154. package/ui/page/Head.md +26 -0
  155. package/ui/page/Head.tsx +1 -0
  156. package/ui/page/Page.d.ts +1 -0
  157. package/ui/page/Page.js +1 -0
  158. package/ui/page/Page.md +42 -0
  159. package/ui/page/Page.tsx +1 -0
  160. package/ui/router/Navigation.d.ts +1 -0
  161. package/ui/router/Navigation.js +1 -0
  162. package/ui/router/Navigation.md +41 -0
  163. package/ui/router/Navigation.tsx +1 -0
  164. package/ui/router/NavigationStore.md +34 -0
  165. package/ui/router/Router.d.ts +1 -0
  166. package/ui/router/Router.js +1 -0
  167. package/ui/router/Router.md +143 -0
  168. package/ui/router/Router.tsx +1 -0
  169. package/ui/style/TINT_CLASS.md +55 -0
  170. package/ui/transition/CollapseTransition.d.ts +1 -0
  171. package/ui/transition/CollapseTransition.js +1 -0
  172. package/ui/transition/CollapseTransition.md +34 -0
  173. package/ui/transition/CollapseTransition.tsx +1 -0
  174. package/ui/transition/FadeTransition.d.ts +1 -0
  175. package/ui/transition/FadeTransition.js +1 -0
  176. package/ui/transition/FadeTransition.md +36 -0
  177. package/ui/transition/FadeTransition.tsx +1 -0
  178. package/ui/transition/HorizontalTransition.d.ts +1 -0
  179. package/ui/transition/HorizontalTransition.js +1 -0
  180. package/ui/transition/HorizontalTransition.md +44 -0
  181. package/ui/transition/HorizontalTransition.tsx +1 -0
  182. package/ui/transition/Transition.d.ts +1 -0
  183. package/ui/transition/Transition.js +1 -0
  184. package/ui/transition/Transition.md +70 -0
  185. package/ui/transition/Transition.tsx +1 -0
  186. package/ui/transition/VerticalTransition.d.ts +1 -0
  187. package/ui/transition/VerticalTransition.js +1 -0
  188. package/ui/transition/VerticalTransition.md +34 -0
  189. package/ui/transition/VerticalTransition.tsx +1 -0
  190. package/ui/tree/TreeApp.d.ts +1 -0
  191. package/ui/tree/TreeApp.js +1 -0
  192. package/ui/tree/TreeApp.md +59 -0
  193. package/ui/tree/TreeApp.tsx +1 -0
  194. package/ui/tree/TreeMenu.d.ts +1 -0
  195. package/ui/tree/TreeMenu.js +1 -0
  196. package/ui/tree/TreeMenu.md +35 -0
  197. package/ui/tree/TreeMenu.tsx +1 -0
  198. package/ui/tree/TreeSidebar.d.ts +1 -0
  199. package/ui/tree/TreeSidebar.js +1 -0
  200. package/ui/tree/TreeSidebar.md +24 -0
  201. package/ui/tree/TreeSidebar.tsx +1 -0
  202. package/ui/util/getClass.md +55 -0
  203. package/ui/util/notify.md +50 -0
  204. package/ui/util/requireContext.md +24 -0
  205. package/ui/app/README.md +0 -32
  206. package/ui/block/README.md +0 -144
  207. package/ui/dialog/README.md +0 -80
  208. package/ui/docs/README.md +0 -71
  209. package/ui/form/README.md +0 -165
  210. package/ui/inline/README.md +0 -86
  211. package/ui/layout/README.md +0 -71
  212. package/ui/menu/README.md +0 -33
  213. package/ui/misc/README.md +0 -121
  214. package/ui/notice/README.md +0 -94
  215. package/ui/page/README.md +0 -56
  216. package/ui/router/README.md +0 -186
  217. package/ui/transition/README.md +0 -80
  218. package/ui/tree/README.md +0 -78
  219. package/ui/util/README.md +0 -153
@@ -0,0 +1,85 @@
1
+ # Card
2
+
3
+ A boxed surface that groups a self-contained piece of content. Rendered as an `<article>`, painted from the tint ladder (surface, border, text) and styled with rounded corners and padding by default.
4
+
5
+ **Things to know:**
6
+
7
+ - Set `href` or `onClick` to make the whole card navigable — a stretched, visually-hidden overlay `<a>` / `<button>` covers the card while the children render normally inside. Real interactive elements inside the card (inline links, buttons) stay clickable and keyboard-focusable.
8
+ - `color=` and `status=` move the tint anchor for the card's scope, so the surface, border, text, and hover shade all re-derive together — and nested components (`Tag`, `Preformatted`, `Button`) inherit the same tint.
9
+ - A card styles only the box. Lay out its contents with the usual block components (`Subheading`, `Paragraph`, `Row`, …).
10
+ - Composes the standard styling variants: `color`, `status`, `padding`, `space`, `width`, plus typography.
11
+
12
+ ## Usage
13
+
14
+ ### Static card
15
+
16
+ ```tsx
17
+ import { Card, Subheading, Paragraph } from "shelving/ui";
18
+
19
+ <Card>
20
+ <Subheading>Storage</Subheading>
21
+ <Paragraph>1.2 GB of 5 GB used.</Paragraph>
22
+ </Card>
23
+ ```
24
+
25
+ ### Navigable card
26
+
27
+ ```tsx
28
+ import { Card, Subheading, Paragraph } from "shelving/ui";
29
+
30
+ // The entire card is a link; `title` labels the overlay for screen readers.
31
+ <Card href="/projects/shelving" title="Open Shelving">
32
+ <Subheading>Shelving</Subheading>
33
+ <Paragraph>TypeScript data toolkit.</Paragraph>
34
+ </Card>
35
+ ```
36
+
37
+ ### Status and colour
38
+
39
+ ```tsx
40
+ import { Card, Subheading } from "shelving/ui";
41
+
42
+ <Card status="error"><Subheading>Couldn't load</Subheading></Card>
43
+ <Card color="purple" padding="large" space="none"><Subheading>Featured</Subheading></Card>
44
+ ```
45
+
46
+ ## Styling
47
+
48
+ `Card` paints from the [tint ladder](/ui/TINT_CLASS); override these hooks at `:root` (or any ancestor scope) to retheme. Move `--card-tint` to recolour everything at once; reach for a per-property hook for a single surgical change.
49
+
50
+ | Variable | Styles | Default |
51
+ |---|---|---|
52
+ | `--card-tint` | Tint anchor for the card scope — recolours surface, border, text and hover together | `inherit` (flows from `color=` / `status=` / parent) |
53
+ | `--card-background` | Surface fill | `var(--tint-90)` |
54
+ | `--card-hover-background` | Surface fill when a navigable card is hovered | `var(--tint-95)` |
55
+ | `--card-color` | Text colour | `var(--tint-00)` |
56
+ | `--card-border` | Border shorthand | `var(--card-stroke) solid var(--tint-80)` |
57
+ | `--card-stroke` | Border / outline thickness | `var(--stroke-normal)` (2px) |
58
+ | `--card-radius` | Corner radius | `var(--radius-normal)` (16px) |
59
+ | `--card-padding` | Inner padding | `var(--space-normal)` (16px) |
60
+ | `--card-space` | Outer block margin (top + bottom) | `var(--space-paragraph)` (16px) |
61
+ | `--card-shadow` | Drop shadow | `none` |
62
+ | `--card-transition` | Transition | `all var(--duration-fast)` (150ms) |
63
+ | `--card-focus-border` | Focus outline | `var(--stroke-focus) solid var(--color-focus)` |
64
+
65
+ **Global tokens it reads** — move these to retheme broadly rather than overriding ladder steps directly: the tint ladder `--tint-00` / `--tint-80` / `--tint-90` / `--tint-95`, plus `--space-normal`, `--space-paragraph`, `--radius-normal`, `--stroke-normal`, `--stroke-focus`, `--color-focus`, and `--duration-fast`.
66
+
67
+ ```css
68
+ /* Theme: borderless cards with a soft shadow and tighter corners. */
69
+ :root {
70
+ --card-border: none;
71
+ --card-shadow: var(--shadow-small);
72
+ --card-radius: var(--radius-small);
73
+ }
74
+
75
+ /* Retint every card purple — surface, border, text and hover all follow. */
76
+ :root {
77
+ --card-tint: var(--color-purple);
78
+ }
79
+ ```
80
+
81
+ ## See also
82
+
83
+ - [`Panel`](/ui/Panel) — a card-like grouping for stacked sections rather than standalone content.
84
+ - [`Section`](/ui/Section) — a titled block; cards often hold one or more sections.
85
+ - [`ui`](/ui) — the styling system: tint ladder, cascade layers, and theming.
package/ui/block/Card.tsx CHANGED
@@ -29,6 +29,7 @@ export interface CardProps
29
29
  * - Real interactive elements inside the card (e.g. inline `<a>` links) stay clickable thanks to `position: relative; z-index: 2` rules in the stylesheet.
30
30
  * - Accepts a `status` colour and raw `ColorProps` — the card styles the box; lay out its contents however the use case needs.
31
31
  *
32
+ * @kind component
32
33
  * @example <Card><Subheading>Static</Subheading></Card>
33
34
  * @example <Card href="/foo" title="Open foo"><Subheading>Clickable</Subheading></Card>
34
35
  * @example <Card status="error"><Subheading>Not found</Subheading></Card>
@@ -31,6 +31,7 @@ export interface HeadingProps extends ColorVariants, SpaceVariants, TypographyVa
31
31
  * Section heading — renders an `<h2>`.
32
32
  * - Sits between `Title` (`<h1>`) and `Subheading` (`<h3>`) in the heading hierarchy.
33
33
  *
34
+ * @kind component
34
35
  * @param props Colour, space, and typography variants plus an optional `level` override and `children`.
35
36
  * @returns Rendered `<h2>` heading element.
36
37
  * @example <Heading>Section title</Heading>
@@ -20,6 +20,7 @@ export const HEADING_PROSE_CLASS = getModuleClass(HEADING_CSS, "prose");
20
20
  * Section heading — renders an `<h2>`.
21
21
  * - Sits between `Title` (`<h1>`) and `Subheading` (`<h3>`) in the heading hierarchy.
22
22
  *
23
+ * @kind component
23
24
  * @param props Colour, space, and typography variants plus an optional `level` override and `children`.
24
25
  * @returns Rendered `<h2>` heading element.
25
26
  * @example <Heading>Section title</Heading>
@@ -0,0 +1,70 @@
1
+ # Heading
2
+
3
+ A section heading — renders an `<h2>`. It sits in the middle of the three-level heading family: `Title` (`<h1>`), `Heading` (`<h2>`), `Subheading` (`<h3>`).
4
+
5
+ **Things to know:**
6
+
7
+ - Pick the component that matches the level rather than overriding `level`. Choosing `Title` / `Heading` / `Subheading` keeps the visual size and the document outline in step, which matters for accessibility and the docs-site table of contents.
8
+ - The `level` prop (`1`–`6`) is an escape hatch for the rare case where the outline level must differ from the visual size — avoid it in normal use.
9
+ - Inside `Prose`, an `<h2>` is styled by the same rules (`HEADING_PROSE_CLASS`), so Markdown-rendered headings match component ones.
10
+ - Accepts `color=` and the typography variants; like all block components it collapses its outer margin when it's the first/last child of its container.
11
+
12
+ ## Usage
13
+
14
+ ### Section heading
15
+
16
+ ```tsx
17
+ import { Heading, Paragraph } from "shelving/ui";
18
+
19
+ <Heading>Billing</Heading>
20
+ <Paragraph>Manage your plan and payment method.</Paragraph>
21
+ ```
22
+
23
+ ### The heading family together
24
+
25
+ ```tsx
26
+ import { Title, Heading, Subheading } from "shelving/ui";
27
+
28
+ <Title>Account</Title> {/* <h1> */}
29
+ <Heading>Security</Heading> {/* <h2> */}
30
+ <Subheading>Sessions</Subheading> {/* <h3> */}
31
+ ```
32
+
33
+ ### Coloured heading
34
+
35
+ ```tsx
36
+ import { Heading } from "shelving/ui";
37
+
38
+ <Heading color="red">Danger zone</Heading>
39
+ ```
40
+
41
+ ## Styling
42
+
43
+ `Heading` exposes hooks for its rhythm and type. It inherits text colour by default (so it picks up the surrounding tint); set `--heading-color` only to override that.
44
+
45
+ | Variable | Styles | Default |
46
+ |---|---|---|
47
+ | `--heading-tint` | Tint anchor for the heading scope | `inherit` (flows from `color=` / parent) |
48
+ | `--heading-color` | Text colour | `inherit` |
49
+ | `--heading-space-before` | Top margin | `var(--space-section)` (2rem) |
50
+ | `--heading-space` | Bottom margin | `var(--space-paragraph)` (16px) |
51
+ | `--heading-font` | Font family | `var(--font-title)` |
52
+ | `--heading-weight` | Font weight | `var(--weight-strong)` (700) |
53
+ | `--heading-size` | Font size | `var(--size-xxlarge)` |
54
+ | `--heading-leading` | Line height | `var(--leading)` |
55
+
56
+ **Global tokens it reads:** `--space-section`, `--space-paragraph`, `--font-title`, `--weight-strong`, `--size-xxlarge`, and `--leading`. (`Title` and `Subheading` share this component and expose the parallel `--title-*` / `--subheading-*` hooks.)
57
+
58
+ ```css
59
+ /* Theme: serif headings, a touch larger. */
60
+ :root {
61
+ --heading-font: var(--font-serif);
62
+ --heading-size: var(--size-xxxlarge);
63
+ }
64
+ ```
65
+
66
+ ## See also
67
+
68
+ - [`Title`](/ui/Title) — the top-level page heading that pairs with `Heading`.
69
+ - [`Section`](/ui/Section) — wraps a heading and its content as a titled section.
70
+ - [`ui`](/ui) — the styling system: tint ladder, typography variants, and theming.
@@ -37,6 +37,7 @@ export interface HeadingProps extends ColorVariants, SpaceVariants, TypographyVa
37
37
  * Section heading — renders an `<h2>`.
38
38
  * - Sits between `Title` (`<h1>`) and `Subheading` (`<h3>`) in the heading hierarchy.
39
39
  *
40
+ * @kind component
40
41
  * @param props Colour, space, and typography variants plus an optional `level` override and `children`.
41
42
  * @returns Rendered `<h2>` heading element.
42
43
  * @example <Heading>Section title</Heading>
@@ -34,6 +34,7 @@ export interface ListProps extends ColorVariants, GapVariants, SpaceVariants, Ty
34
34
  * List block — wraps each child in an `<li>` and renders an `<ul>` or `<ol>`.
35
35
  * - Pass `ordered` to render an ordered `<ol>` instead of the default unordered `<ul>`.
36
36
  *
37
+ * @kind component
37
38
  * @param props Colour, gap, space, and typography variants plus the `children` items and `ordered` toggle.
38
39
  * @returns Rendered `<ul>` or `<ol>` list element.
39
40
  * @example <List>{["One", "Two", "Three"]}</List>
package/ui/block/List.js CHANGED
@@ -27,6 +27,7 @@ export const LIST_PROSE_CLASS = getModuleClass(LIST_CSS, "prose");
27
27
  * List block — wraps each child in an `<li>` and renders an `<ul>` or `<ol>`.
28
28
  * - Pass `ordered` to render an ordered `<ol>` instead of the default unordered `<ul>`.
29
29
  *
30
+ * @kind component
30
31
  * @param props Colour, gap, space, and typography variants plus the `children` items and `ordered` toggle.
31
32
  * @returns Rendered `<ul>` or `<ol>` list element.
32
33
  * @example <List>{["One", "Two", "Three"]}</List>
@@ -0,0 +1,51 @@
1
+ # List
2
+
3
+ A bulleted or numbered list. Renders a `<ul>` by default (or an `<ol>` when `ordered` is set) and wraps each child in its own `<li>`, so you pass the items as children rather than writing the `<li>` markup yourself.
4
+
5
+ **Things to know:**
6
+
7
+ - Pass `ordered` to render an `<ol>` with numbered markers; the default is an unordered `<ul>`.
8
+ - Each child becomes one list item — give it plain content, not an `<li>`.
9
+ - Items are laid out as a flex column; tune the spacing between them with the `gap` variant (`<List gap="small">`).
10
+ - Like the other block components it carries its own outer block margin and collapses it when it is the first or last child of its container.
11
+ - Inside [`Prose`](/ui/Prose) a raw `<ul>` / `<ol>` picks up the same styling, so Markdown-rendered lists match component ones.
12
+
13
+ ## Usage
14
+
15
+ ### Unordered and ordered lists
16
+
17
+ ```tsx
18
+ import { List } from "shelving/ui";
19
+
20
+ <List>{["Apples", "Oranges", "Pears"]}</List>
21
+ <List ordered>{["First", "Second", "Third"]}</List>
22
+ ```
23
+
24
+ ### Tighter spacing
25
+
26
+ ```tsx
27
+ import { List } from "shelving/ui";
28
+
29
+ <List gap="small">{items.map(item => item.label)}</List>
30
+ ```
31
+
32
+ ## Styling
33
+
34
+ `List` paints from the [tint ladder](/ui/TINT_CLASS) for its markers only; rebind `--list-tint` to recolour the scope, or reach for a per-property hook for a single change.
35
+
36
+ | Variable | Styles | Default |
37
+ |---|---|---|
38
+ | `--list-tint` | Tint anchor for the list scope | `inherit` (flows from `color=` / parent) |
39
+ | `--list-space` | Outer block margin (top + bottom) | `var(--space-paragraph)` (16px) |
40
+ | `--list-gap` | Space between items | `var(--space-xsmall)` |
41
+ | `--list-indent` | Inline start padding (marker gutter) | `1.125em` unordered / `1.8em` ordered |
42
+ | `--list-marker-color` | Bullet / number colour | `var(--tint-80)` |
43
+
44
+ **Global tokens it reads:** `--space-paragraph`, `--space-xsmall`, and the tint-ladder step `--tint-80`. The `gap` variant comes from the shared [`ui`](/ui) styling system.
45
+
46
+ ## See also
47
+
48
+ - [`Definitions`](/ui/Definitions) — term/value pairs in a styled `<dl>` when a key/value list is needed.
49
+ - [`Paragraph`](/ui/Paragraph) — body text that sits alongside lists.
50
+ - [`Prose`](/ui/Prose) — styles raw `<ul>` / `<ol>` inside longform content.
51
+ - [`ui`](/ui) — the styling system: gap and tint variants, and theming.
package/ui/block/List.tsx CHANGED
@@ -41,6 +41,7 @@ export interface ListProps extends ColorVariants, GapVariants, SpaceVariants, Ty
41
41
  * List block — wraps each child in an `<li>` and renders an `<ul>` or `<ol>`.
42
42
  * - Pass `ordered` to render an ordered `<ol>` instead of the default unordered `<ul>`.
43
43
  *
44
+ * @kind component
44
45
  * @param props Colour, gap, space, and typography variants plus the `children` items and `ordered` toggle.
45
46
  * @returns Rendered `<ul>` or `<ol>` list element.
46
47
  * @example <List>{["One", "Two", "Three"]}</List>
@@ -23,6 +23,7 @@ export interface PanelProps extends ColorVariants, StatusVariants, TypographyVar
23
23
  *
24
24
  * Renders as a `<section>` by default; pass `as="header"` etc. for other semantic elements.
25
25
  *
26
+ * @kind component
26
27
  * @param props Colour, status, and typography variants plus `children`.
27
28
  * @returns Rendered full-width panel region.
28
29
  * @example <Panel><Block narrow><Title>Welcome</Title></Block></Panel>
package/ui/block/Panel.js CHANGED
@@ -12,6 +12,7 @@ const PANEL_CLASS = getModuleClass(PANEL_CSS, "panel");
12
12
  *
13
13
  * Renders as a `<section>` by default; pass `as="header"` etc. for other semantic elements.
14
14
  *
15
+ * @kind component
15
16
  * @param props Colour, status, and typography variants plus `children`.
16
17
  * @returns Rendered full-width panel region.
17
18
  * @example <Panel><Block narrow><Title>Welcome</Title></Block></Panel>
@@ -0,0 +1,50 @@
1
+ # Panel
2
+
3
+ A full-width vertical region that paints the current surface colour. Use panels to break a page into stacked bands: each one butts against its neighbours (zero block margin) but carries generous vertical padding, so a page becomes a sequence of coloured sections.
4
+
5
+ **Things to know:**
6
+
7
+ - A panel always spans the full width of its container. To constrain the content inside, compose a [`Block`](/ui/Block) `narrow` (or `wide`) within it.
8
+ - Block margin is always zero so panels stack flush; control the vertical breathing room with the `padding` variant (`<Panel padding="large">`, `<Panel padding="none">`). Inline padding is fixed.
9
+ - `color=` / `status=` move the tint anchor for the whole panel scope, so the surface, border, and text re-derive together and cascade into nested content.
10
+ - The top and bottom borders are dropped on the first and last panel so the page doesn't gain stray edge lines.
11
+
12
+ ## Usage
13
+
14
+ ### Page banded into panels
15
+
16
+ ```tsx
17
+ import { Panel, Block, Title, Paragraph } from "shelving/ui";
18
+
19
+ <Panel as="header" color="primary">
20
+ <Block narrow>
21
+ <Title>Welcome</Title>
22
+ </Block>
23
+ </Panel>
24
+ <Panel padding="large">
25
+ <Block narrow>
26
+ <Paragraph>Each panel is a full-width band; the inner block constrains the content.</Paragraph>
27
+ </Block>
28
+ </Panel>
29
+ ```
30
+
31
+ ## Styling
32
+
33
+ `Panel` paints from the [tint ladder](/ui/TINT_CLASS); rebind `--panel-tint` to recolour the whole scope at once, or reach for a per-property hook for a single change.
34
+
35
+ | Variable | Styles | Default |
36
+ |---|---|---|
37
+ | `--panel-tint` | Tint anchor for the panel scope — recolours surface, border, and text together | `inherit` (flows from `color=` / `status=` / parent) |
38
+ | `--panel-background` | Surface fill | `var(--tint-90)` |
39
+ | `--panel-color` | Text colour | `var(--tint-00)` |
40
+ | `--panel-border` | Top/bottom border shorthand | `var(--panel-stroke) solid var(--tint-80)` |
41
+ | `--panel-stroke` | Border thickness | `var(--stroke-normal)` (2px) |
42
+
43
+ **Global tokens it reads:** the tint-ladder steps `--tint-00` / `--tint-80` / `--tint-90`, plus `--stroke-normal`. Vertical padding comes from the shared `padding` variant.
44
+
45
+ ## See also
46
+
47
+ - [`Card`](/ui/Card) — a boxed surface for standalone content rather than a full-width band.
48
+ - [`Block`](/ui/Block) — the inner width-constraining wrapper for panel content.
49
+ - [`Section`](/ui/Section) — a landmark region that sits inside a panel's inner block.
50
+ - [`ui`](/ui) — the styling system: tint ladder, padding variants, and theming.
@@ -29,6 +29,7 @@ export interface PanelProps extends ColorVariants, StatusVariants, TypographyVar
29
29
  *
30
30
  * Renders as a `<section>` by default; pass `as="header"` etc. for other semantic elements.
31
31
  *
32
+ * @kind component
32
33
  * @param props Colour, status, and typography variants plus `children`.
33
34
  * @returns Rendered full-width panel region.
34
35
  * @example <Panel><Block narrow><Title>Welcome</Title></Block></Panel>
@@ -25,6 +25,7 @@ export interface ParagraphProps extends ColorVariants, SpaceVariants, Typography
25
25
  /**
26
26
  * Paragraph block of body text — rendered as `<p>`.
27
27
  *
28
+ * @kind component
28
29
  * @param props Colour, space, and typography variants plus `children`.
29
30
  * @returns Rendered `<p>` paragraph element.
30
31
  * @example <Paragraph>Hello world.</Paragraph>
@@ -19,6 +19,7 @@ export const PARAGRAPH_PROSE_CLASS = getModuleClass(PARAGRAPH_CSS, "prose");
19
19
  /**
20
20
  * Paragraph block of body text — rendered as `<p>`.
21
21
  *
22
+ * @kind component
22
23
  * @param props Colour, space, and typography variants plus `children`.
23
24
  * @returns Rendered `<p>` paragraph element.
24
25
  * @example <Paragraph>Hello world.</Paragraph>
@@ -0,0 +1,48 @@
1
+ # Paragraph
2
+
3
+ A block of body text — renders a `<p>`. The default container for running prose between headings, lists, and other blocks.
4
+
5
+ **Things to know:**
6
+
7
+ - Carries its own outer block margin and collapses it when it is the first or last child of its container, so stacked paragraphs space evenly without doubling up at the edges.
8
+ - Accepts `color=` and the typography variants (`size`, `serif`, `center`, …) to retint or restyle the text.
9
+ - Fill it with inline annotations such as [`Strong`](/ui/Strong), [`Emphasis`](/ui/Emphasis), [`Code`](/ui/Code), [`Mark`](/ui/Mark), and [`Link`](/ui/Link).
10
+ - Inside [`Prose`](/ui/Prose) a raw `<p>` picks up the same styling, so Markdown-rendered paragraphs match component ones.
11
+
12
+ ## Usage
13
+
14
+ ### Body text
15
+
16
+ ```tsx
17
+ import { Paragraph } from "shelving/ui";
18
+
19
+ <Paragraph>The best widget on the market.</Paragraph>
20
+ ```
21
+
22
+ ### With inline annotations
23
+
24
+ ```tsx
25
+ import { Paragraph, Strong, Link } from "shelving/ui";
26
+
27
+ <Paragraph>
28
+ <Strong>Note:</Strong> read our <Link href="/privacy">privacy policy</Link> first.
29
+ </Paragraph>
30
+ ```
31
+
32
+ ## Styling
33
+
34
+ `Paragraph` exposes a single hook for its own block margin and rebinds the tint anchor for its scope; it paints no colour of its own, so it inherits the surrounding text colour.
35
+
36
+ | Variable | Styles | Default |
37
+ |---|---|---|
38
+ | `--paragraph-tint` | Tint anchor for the paragraph scope | `inherit` (flows from `color=` / parent) |
39
+ | `--paragraph-space` | Outer block margin (top + bottom) | `var(--space-paragraph)` (16px) |
40
+
41
+ **Global tokens it reads:** `--space-paragraph`.
42
+
43
+ ## See also
44
+
45
+ - [`Prose`](/ui/Prose) — wrap mixed content to style raw `<p>` and friends in one step.
46
+ - [`Heading`](/ui/Heading) — the section heading that usually precedes a paragraph.
47
+ - [`List`](/ui/List) — bulleted or numbered content alongside paragraphs.
48
+ - [`ui`](/ui) — the styling system: tint ladder, typography variants, and theming.
@@ -30,6 +30,7 @@ export interface ParagraphProps extends ColorVariants, SpaceVariants, Typography
30
30
  /**
31
31
  * Paragraph block of body text — rendered as `<p>`.
32
32
  *
33
+ * @kind component
33
34
  * @param props Colour, space, and typography variants plus `children`.
34
35
  * @returns Rendered `<p>` paragraph element.
35
36
  * @example <Paragraph>Hello world.</Paragraph>
@@ -11,6 +11,7 @@ export interface ProseProps extends OptionalChildProps {
11
11
  * A section of longform text containing lots of `<p>` or `<ul>` style elements.
12
12
  * - Applies the prose variant of every block and inline component so nested content picks up the right longform spacing and typography.
13
13
  *
14
+ * @kind component
14
15
  * @param props The longform `children` to render inside the prose container.
15
16
  * @returns Rendered `<div>` wrapping the prose content.
16
17
  * @example <Prose><Paragraph>First.</Paragraph><Paragraph>Second.</Paragraph></Prose>
package/ui/block/Prose.js CHANGED
@@ -29,6 +29,7 @@ const PROSE_STYLES = getClass(PARAGRAPH_PROSE_CLASS, HEADING_PROSE_CLASS, SUBHEA
29
29
  * A section of longform text containing lots of `<p>` or `<ul>` style elements.
30
30
  * - Applies the prose variant of every block and inline component so nested content picks up the right longform spacing and typography.
31
31
  *
32
+ * @kind component
32
33
  * @param props The longform `children` to render inside the prose container.
33
34
  * @returns Rendered `<div>` wrapping the prose content.
34
35
  * @example <Prose><Paragraph>First.</Paragraph><Paragraph>Second.</Paragraph></Prose>
@@ -0,0 +1,49 @@
1
+ # Prose
2
+
3
+ A wrapper that applies cohesive longform typography to a subtree of mixed HTML content. Wrap any block of paragraphs, lists, headings, code, tables, and inline annotations in `<Prose>` and they pick up the right spacing and type in one step — including raw HTML elements emitted by a markup renderer.
4
+
5
+ **Things to know:**
6
+
7
+ - `Prose` applies the "prose" variant of *every* block and inline component as a single compound class, so raw `<p>`, `<ul>`, `<h2>`, `<code>`, `<a>`, etc. are styled to match their component counterparts ([`Paragraph`](/ui/Paragraph), [`List`](/ui/List), [`Heading`](/ui/Heading), [`Code`](/ui/Code), [`Link`](/ui/Link), …).
8
+ - This is the bridge for markup: wrap [`Markup`](/markup) output (or anything that emits raw HTML) in `<Prose>` and it just works — no per-element component wrapping needed.
9
+ - It only sets up typography and its own outer margin; it paints no colour and adds no box of its own.
10
+
11
+ ## Usage
12
+
13
+ ### Prose content from a renderer
14
+
15
+ ```tsx
16
+ import { Prose, Markup } from "shelving/ui";
17
+
18
+ <Prose>
19
+ <Markup>{article.body}</Markup>
20
+ </Prose>
21
+ ```
22
+
23
+ ### Hand-written longform
24
+
25
+ ```tsx
26
+ import { Prose, Paragraph } from "shelving/ui";
27
+
28
+ <Prose>
29
+ <Paragraph>First.</Paragraph>
30
+ <Paragraph>Second.</Paragraph>
31
+ </Prose>
32
+ ```
33
+
34
+ ## Styling
35
+
36
+ `Prose` exposes a single hook for its own block margin. The longform typography of nested content is themed through each block/inline component's own hooks (e.g. `--paragraph-space`, `--heading-size`), not through `Prose` itself.
37
+
38
+ | Variable | Styles | Default |
39
+ |---|---|---|
40
+ | `--prose-space` | Outer block margin (top + bottom) | `var(--space-paragraph)` (16px) |
41
+
42
+ **Global tokens it reads:** `--space-paragraph`.
43
+
44
+ ## See also
45
+
46
+ - [`Paragraph`](/ui/Paragraph) — body text; its prose variant styles raw `<p>` inside `Prose`.
47
+ - [`List`](/ui/List) — its prose variant styles raw `<ul>` / `<ol>` inside `Prose`.
48
+ - [`Markup`](/markup) — renders a markup string into the raw HTML that `Prose` styles.
49
+ - [`ui`](/ui) — the styling system and per-component theming hooks.
@@ -64,6 +64,7 @@ export interface ProseProps extends OptionalChildProps {}
64
64
  * A section of longform text containing lots of `<p>` or `<ul>` style elements.
65
65
  * - Applies the prose variant of every block and inline component so nested content picks up the right longform spacing and typography.
66
66
  *
67
+ * @kind component
67
68
  * @param props The longform `children` to render inside the prose container.
68
69
  * @returns Rendered `<div>` wrapping the prose content.
69
70
  * @example <Prose><Paragraph>First.</Paragraph><Paragraph>Second.</Paragraph></Prose>
@@ -34,6 +34,7 @@ export interface SectionProps extends ColorVariants, SpaceVariants, TypographyVa
34
34
  * `<section>` block with block-level spacing.
35
35
  * - Pass `as` to render a different semantic element.
36
36
  *
37
+ * @kind component
37
38
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
38
39
  * @returns Rendered `<section>` element.
39
40
  * @example <Section><Heading>About</Heading></Section>
@@ -43,6 +44,7 @@ export declare function Section(props: SectionProps): ReactElement;
43
44
  /**
44
45
  * `<header>` block with block-level spacing.
45
46
  *
47
+ * @kind component
46
48
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
47
49
  * @returns Rendered `<header>` element.
48
50
  * @example <Header><Title>Welcome</Title></Header>
@@ -52,6 +54,7 @@ export declare function Header(props: SectionProps): ReactElement;
52
54
  /**
53
55
  * `<footer>` block with block-level spacing.
54
56
  *
57
+ * @kind component
55
58
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
56
59
  * @returns Rendered `<footer>` element.
57
60
  * @example <Footer><Small>© 2026</Small></Footer>
@@ -61,6 +64,7 @@ export declare function Footer(props: SectionProps): ReactElement;
61
64
  /**
62
65
  * `<nav>` block with block-level spacing.
63
66
  *
67
+ * @kind component
64
68
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
65
69
  * @returns Rendered `<nav>` element.
66
70
  * @example <Nav><Link href="/">Home</Link></Nav>
@@ -70,6 +74,7 @@ export declare function Nav(props: SectionProps): ReactElement;
70
74
  /**
71
75
  * `<aside>` block with block-level spacing.
72
76
  *
77
+ * @kind component
73
78
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
74
79
  * @returns Rendered `<aside>` element.
75
80
  * @example <Aside narrow><Paragraph>Sidebar</Paragraph></Aside>
@@ -79,6 +84,7 @@ export declare function Aside(props: SectionProps): ReactElement;
79
84
  /**
80
85
  * `<figure>` block with block-level spacing. Pair with `<Caption>` for `<figcaption>` content.
81
86
  *
87
+ * @kind component
82
88
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
83
89
  * @returns Rendered `<figure>` element.
84
90
  * @example <Figure><Image src="/cat.jpg" /><Caption>A cat</Caption></Figure>
@@ -24,6 +24,7 @@ function renderSection(defaultComponent, { as: Component = defaultComponent, chi
24
24
  * `<section>` block with block-level spacing.
25
25
  * - Pass `as` to render a different semantic element.
26
26
  *
27
+ * @kind component
27
28
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
28
29
  * @returns Rendered `<section>` element.
29
30
  * @example <Section><Heading>About</Heading></Section>
@@ -35,6 +36,7 @@ export function Section(props) {
35
36
  /**
36
37
  * `<header>` block with block-level spacing.
37
38
  *
39
+ * @kind component
38
40
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
39
41
  * @returns Rendered `<header>` element.
40
42
  * @example <Header><Title>Welcome</Title></Header>
@@ -46,6 +48,7 @@ export function Header(props) {
46
48
  /**
47
49
  * `<footer>` block with block-level spacing.
48
50
  *
51
+ * @kind component
49
52
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
50
53
  * @returns Rendered `<footer>` element.
51
54
  * @example <Footer><Small>© 2026</Small></Footer>
@@ -57,6 +60,7 @@ export function Footer(props) {
57
60
  /**
58
61
  * `<nav>` block with block-level spacing.
59
62
  *
63
+ * @kind component
60
64
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
61
65
  * @returns Rendered `<nav>` element.
62
66
  * @example <Nav><Link href="/">Home</Link></Nav>
@@ -68,6 +72,7 @@ export function Nav(props) {
68
72
  /**
69
73
  * `<aside>` block with block-level spacing.
70
74
  *
75
+ * @kind component
71
76
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
72
77
  * @returns Rendered `<aside>` element.
73
78
  * @example <Aside narrow><Paragraph>Sidebar</Paragraph></Aside>
@@ -79,6 +84,7 @@ export function Aside(props) {
79
84
  /**
80
85
  * `<figure>` block with block-level spacing. Pair with `<Caption>` for `<figcaption>` content.
81
86
  *
87
+ * @kind component
82
88
  * @param props Colour, space, typography, and width variants plus optional `as` override and `children`.
83
89
  * @returns Rendered `<figure>` element.
84
90
  * @example <Figure><Image src="/cat.jpg" /><Caption>A cat</Caption></Figure>