shelving 1.322.1 → 1.322.2

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 (312) hide show
  1. package/docs/api/APIProvider.md +2 -2
  2. package/docs/api/CachedAPIProvider.md +6 -8
  3. package/docs/api/ClientAPIProvider.md +5 -5
  4. package/docs/api/DebugAPIProvider.md +3 -5
  5. package/docs/api/HydratingAPIProvider.md +2 -2
  6. package/docs/api/JSONAPIProvider.md +3 -5
  7. package/docs/api/LoggingAPIProvider.md +7 -9
  8. package/docs/api/MockAPIProvider.md +4 -4
  9. package/docs/api/MockEndpointAPIProvider.md +5 -7
  10. package/docs/api/ThroughAPIProvider.md +15 -10
  11. package/docs/api/ValidationAPIProvider.md +3 -5
  12. package/docs/api/XMLAPIProvider.md +3 -3
  13. package/docs/api.md +48 -44
  14. package/docs/bun.md +9 -9
  15. package/docs/db/DBProvider.md +6 -6
  16. package/docs/db/MemoryDBProvider.md +3 -3
  17. package/docs/db/PostgresProvider.md +6 -4
  18. package/docs/db/SQLProvider.md +6 -3
  19. package/docs/db/SQLiteProvider.md +9 -4
  20. package/docs/db/StorageDBProvider.md +2 -2
  21. package/docs/db/ThroughDBProvider.md +6 -6
  22. package/docs/db/UndoDBProvider.md +2 -2
  23. package/docs/db.md +32 -32
  24. package/docs/error/NetworkError.md +5 -5
  25. package/docs/error/RequestError.md +4 -4
  26. package/docs/error/RequiredError.md +2 -2
  27. package/docs/error/ResponseError.md +1 -1
  28. package/docs/error/UnexpectedError.md +1 -1
  29. package/docs/error/UnsupportedError.md +3 -3
  30. package/docs/error/ValueError.md +2 -2
  31. package/docs/error.md +20 -19
  32. package/docs/extract.md +14 -14
  33. package/docs/firebase.md +6 -6
  34. package/docs/guides/building-with-shelving.md +112 -84
  35. package/docs/guides/styleguide.md +29 -29
  36. package/docs/index.md +3 -2
  37. package/docs/llms-full.txt +2531 -2291
  38. package/docs/markup.md +15 -17
  39. package/docs/react/createAPIContext.md +12 -12
  40. package/docs/react/createDBContext.md +21 -15
  41. package/docs/react/useInstance.md +2 -2
  42. package/docs/react/useLazy.md +1 -1
  43. package/docs/react/useMap.md +10 -6
  44. package/docs/react/useReduce.md +2 -2
  45. package/docs/react/useSequence.md +2 -2
  46. package/docs/react/useStore.md +10 -10
  47. package/docs/react.md +22 -16
  48. package/docs/schema/ArraySchema.md +6 -6
  49. package/docs/schema/BooleanSchema.md +5 -5
  50. package/docs/schema/ChoiceSchema.md +1 -1
  51. package/docs/schema/CurrencyAmountSchema.md +2 -2
  52. package/docs/schema/DataSchema.md +5 -5
  53. package/docs/schema/NullableSchema.md +4 -4
  54. package/docs/schema/NumberSchema.md +4 -4
  55. package/docs/schema/OptionalSchema.md +1 -1
  56. package/docs/schema/StringSchema.md +7 -7
  57. package/docs/schema.md +21 -21
  58. package/docs/sequence/DeferredSequence.md +1 -1
  59. package/docs/sequence/InspectSequence.md +8 -6
  60. package/docs/sequence/LazySequence.md +3 -3
  61. package/docs/sequence/Sequence.md +6 -6
  62. package/docs/sequence/ThroughSequence.md +4 -2
  63. package/docs/sequence.md +3 -3
  64. package/docs/store/ArrayStore.md +6 -6
  65. package/docs/store/BooleanStore.md +2 -2
  66. package/docs/store/BusyStore.md +1 -1
  67. package/docs/store/DataStore.md +5 -5
  68. package/docs/store/DictionaryStore.md +4 -4
  69. package/docs/store/FetchStore.md +6 -6
  70. package/docs/store/PathStore.md +4 -4
  71. package/docs/store/PayloadFetchStore.md +1 -5
  72. package/docs/store/Store.md +8 -6
  73. package/docs/store/URLStore.md +5 -5
  74. package/docs/store.md +15 -15
  75. package/docs/test.md +6 -6
  76. package/docs/ui/App.md +99 -69
  77. package/docs/ui/AppLayout.md +33 -24
  78. package/docs/ui/BackButton.md +13 -11
  79. package/docs/ui/Button.md +73 -64
  80. package/docs/ui/Card.md +23 -22
  81. package/docs/ui/Catcher.md +3 -3
  82. package/docs/ui/ClassProps.md +1 -1
  83. package/docs/ui/Code.md +11 -11
  84. package/docs/ui/CollapseTransition.md +5 -5
  85. package/docs/ui/Deleted.md +6 -6
  86. package/docs/ui/Details.md +13 -13
  87. package/docs/ui/Dialog.md +39 -27
  88. package/docs/ui/DocumentationButtons.md +2 -2
  89. package/docs/ui/DocumentationCard.md +2 -2
  90. package/docs/ui/DocumentationFrame.md +4 -4
  91. package/docs/ui/DocumentationLive.md +11 -11
  92. package/docs/ui/DocumentationPage.md +3 -3
  93. package/docs/ui/Emphasis.md +4 -4
  94. package/docs/ui/Empty.md +2 -2
  95. package/docs/ui/FadeTransition.md +9 -9
  96. package/docs/ui/Field.md +14 -14
  97. package/docs/ui/FixedLayout.md +27 -25
  98. package/docs/ui/Form.md +41 -39
  99. package/docs/ui/FormStore.md +6 -2
  100. package/docs/ui/Grid.md +21 -9
  101. package/docs/ui/HTML.md +10 -8
  102. package/docs/ui/Head.md +2 -3
  103. package/docs/ui/Heading.md +12 -12
  104. package/docs/ui/HorizontalTransition.md +10 -10
  105. package/docs/ui/Icon.md +4 -4
  106. package/docs/ui/ImageInput.md +12 -12
  107. package/docs/ui/Inserted.md +6 -6
  108. package/docs/ui/Link.md +11 -11
  109. package/docs/ui/List.md +7 -7
  110. package/docs/ui/Loading.md +6 -6
  111. package/docs/ui/Mark.md +11 -9
  112. package/docs/ui/Markup.md +4 -4
  113. package/docs/ui/Menu.md +24 -24
  114. package/docs/ui/MenuItem.md +29 -29
  115. package/docs/ui/Modal.md +57 -45
  116. package/docs/ui/Navigation.md +28 -26
  117. package/docs/ui/NavigationStore.md +18 -18
  118. package/docs/ui/Notice.md +15 -15
  119. package/docs/ui/Notices.md +17 -17
  120. package/docs/ui/Page.md +13 -13
  121. package/docs/ui/Panel.md +8 -8
  122. package/docs/ui/Paragraph.md +5 -5
  123. package/docs/ui/Progress.md +11 -11
  124. package/docs/ui/Prose.md +6 -6
  125. package/docs/ui/QueryRadiosInput.md +2 -2
  126. package/docs/ui/RouteCache.md +27 -27
  127. package/docs/ui/Router.md +70 -61
  128. package/docs/ui/SchemaInput.md +20 -20
  129. package/docs/ui/Scroll.md +16 -16
  130. package/docs/ui/Section.md +13 -10
  131. package/docs/ui/SidebarLayout.md +27 -27
  132. package/docs/ui/Small.md +4 -4
  133. package/docs/ui/Span.md +3 -1
  134. package/docs/ui/StackButton.md +13 -7
  135. package/docs/ui/Strong.md +4 -4
  136. package/docs/ui/Subheading.md +12 -12
  137. package/docs/ui/TINT_CLASS.md +11 -11
  138. package/docs/ui/Table.md +40 -29
  139. package/docs/ui/Tag.md +15 -15
  140. package/docs/ui/Title.md +13 -13
  141. package/docs/ui/Transition.md +22 -22
  142. package/docs/ui/TreeApp.md +8 -8
  143. package/docs/ui/TreeMarkup.md +2 -2
  144. package/docs/ui/TreeMenu.md +3 -3
  145. package/docs/ui/TreeSidebar.md +1 -1
  146. package/docs/ui/VerticalTransition.md +8 -8
  147. package/docs/ui/getClass.md +10 -10
  148. package/docs/ui/getColorClass.md +23 -23
  149. package/docs/ui/getDurationClass.md +5 -5
  150. package/docs/ui/getGridClass.md +2 -2
  151. package/docs/ui/getHeightClass.md +4 -4
  152. package/docs/ui/getRadiusClass.md +9 -9
  153. package/docs/ui/getShadowClass.md +6 -6
  154. package/docs/ui/getSpaceClass.md +13 -13
  155. package/docs/ui/getStrokeClass.md +6 -6
  156. package/docs/ui/getTypographyClass.md +38 -38
  157. package/docs/ui/getWidthClass.md +4 -4
  158. package/docs/ui/notify.md +11 -11
  159. package/docs/ui/requireContext.md +1 -1
  160. package/docs/ui.md +4 -4
  161. package/docs/util/array.md +35 -29
  162. package/docs/util/async.md +2 -2
  163. package/docs/util/base64.md +7 -7
  164. package/docs/util/boolean.md +10 -10
  165. package/docs/util/buffer.md +5 -5
  166. package/docs/util/bytes.md +9 -9
  167. package/docs/util/class.md +10 -6
  168. package/docs/util/color.md +13 -13
  169. package/docs/util/constants.md +2 -2
  170. package/docs/util/crypto.md +1 -1
  171. package/docs/util/currency.md +2 -2
  172. package/docs/util/data.md +18 -18
  173. package/docs/util/date.md +22 -22
  174. package/docs/util/debug/debug.md +12 -12
  175. package/docs/util/dictionary.md +21 -18
  176. package/docs/util/diff.md +6 -6
  177. package/docs/util/dispose/dispose.md +5 -5
  178. package/docs/util/duration.md +9 -9
  179. package/docs/util/element.md +1 -1
  180. package/docs/util/entity.md +6 -6
  181. package/docs/util/entry.md +21 -8
  182. package/docs/util/env.md +2 -2
  183. package/docs/util/equal.md +16 -16
  184. package/docs/util/error.md +4 -4
  185. package/docs/util/file.md +8 -8
  186. package/docs/util/filter.md +9 -5
  187. package/docs/util/format.md +18 -18
  188. package/docs/util/function.md +4 -4
  189. package/docs/util/geo.md +13 -13
  190. package/docs/util/hash.md +3 -3
  191. package/docs/util/http.md +1 -1
  192. package/docs/util/hydrate/hydrate.md +7 -4
  193. package/docs/util/item.md +4 -4
  194. package/docs/util/iterate.md +11 -11
  195. package/docs/util/jwt.md +1 -6
  196. package/docs/util/link.md +5 -5
  197. package/docs/util/map.md +17 -11
  198. package/docs/util/merge.md +2 -5
  199. package/docs/util/null.md +20 -10
  200. package/docs/util/number.md +16 -16
  201. package/docs/util/object.md +25 -22
  202. package/docs/util/path.md +17 -17
  203. package/docs/util/query.md +23 -25
  204. package/docs/util/random.md +7 -7
  205. package/docs/util/regexp.md +16 -16
  206. package/docs/util/sequence.md +16 -10
  207. package/docs/util/serialise/serialise.md +6 -6
  208. package/docs/util/set.md +10 -10
  209. package/docs/util/sort.md +10 -11
  210. package/docs/util/source.md +11 -7
  211. package/docs/util/start.md +8 -8
  212. package/docs/util/string.md +14 -14
  213. package/docs/util/template.md +3 -3
  214. package/docs/util/timeout.md +5 -5
  215. package/docs/util/transform.md +6 -6
  216. package/docs/util/tree.md +13 -13
  217. package/docs/util/undefined.md +3 -3
  218. package/docs/util/units.md +15 -15
  219. package/docs/util/update.md +16 -16
  220. package/docs/util/uri.md +12 -12
  221. package/docs/util/url.md +11 -11
  222. package/docs/util/uuid.md +3 -3
  223. package/docs/util/validate.md +14 -9
  224. package/package.json +3 -3
  225. package/skills/shelving/SKILL.md +1 -0
  226. package/ui/README.md +4 -4
  227. package/ui/app/App.md +99 -69
  228. package/ui/block/Card.md +23 -22
  229. package/ui/block/Details.md +13 -13
  230. package/ui/block/Grid.md +21 -9
  231. package/ui/block/Heading.md +12 -12
  232. package/ui/block/List.md +7 -7
  233. package/ui/block/Panel.md +8 -8
  234. package/ui/block/Paragraph.md +5 -5
  235. package/ui/block/Prose.md +6 -6
  236. package/ui/block/Section.md +13 -10
  237. package/ui/block/Subheading.md +12 -12
  238. package/ui/block/Title.md +13 -13
  239. package/ui/button/Button.md +73 -64
  240. package/ui/dialog/Dialog.md +39 -27
  241. package/ui/dialog/Modal.md +57 -45
  242. package/ui/docs/DocumentationButtons.md +2 -2
  243. package/ui/docs/DocumentationCard.md +2 -2
  244. package/ui/docs/DocumentationFrame.md +4 -4
  245. package/ui/docs/DocumentationLive.md +11 -11
  246. package/ui/docs/DocumentationPage.md +3 -3
  247. package/ui/form/Field.md +14 -14
  248. package/ui/form/Form.md +41 -39
  249. package/ui/form/FormStore.md +6 -2
  250. package/ui/form/Progress.md +11 -11
  251. package/ui/inline/Code.md +11 -11
  252. package/ui/inline/Deleted.md +6 -6
  253. package/ui/inline/Emphasis.md +4 -4
  254. package/ui/inline/Inserted.md +6 -6
  255. package/ui/inline/Link.md +11 -11
  256. package/ui/inline/Mark.md +11 -9
  257. package/ui/inline/Small.md +4 -4
  258. package/ui/inline/Span.md +3 -1
  259. package/ui/inline/Strong.md +4 -4
  260. package/ui/input/ImageInput.md +12 -12
  261. package/ui/input/QueryRadiosInput.md +2 -2
  262. package/ui/input/SchemaInput.md +20 -20
  263. package/ui/layout/AppLayout.md +33 -24
  264. package/ui/layout/AppLayout.module.css +1 -0
  265. package/ui/layout/FixedLayout.md +27 -25
  266. package/ui/layout/SidebarLayout.md +27 -27
  267. package/ui/layout/SidebarLayout.module.css +1 -0
  268. package/ui/menu/Menu.md +24 -24
  269. package/ui/menu/MenuItem.md +29 -29
  270. package/ui/misc/Catcher.md +3 -3
  271. package/ui/misc/Icon.md +4 -4
  272. package/ui/misc/Loading.md +6 -6
  273. package/ui/misc/Markup.md +4 -4
  274. package/ui/misc/Tag.md +15 -15
  275. package/ui/notice/Empty.md +2 -2
  276. package/ui/notice/Notice.md +15 -15
  277. package/ui/notice/Notices.md +17 -17
  278. package/ui/page/HTML.md +10 -8
  279. package/ui/page/Head.md +2 -3
  280. package/ui/page/Page.md +13 -13
  281. package/ui/router/BackButton.md +13 -11
  282. package/ui/router/Navigation.md +28 -26
  283. package/ui/router/NavigationStore.md +18 -18
  284. package/ui/router/RouteCache.md +27 -27
  285. package/ui/router/Router.md +70 -61
  286. package/ui/router/StackButton.md +13 -7
  287. package/ui/style/Scroll.md +16 -16
  288. package/ui/style/TINT_CLASS.md +11 -11
  289. package/ui/style/getColorClass.md +23 -23
  290. package/ui/style/getDurationClass.md +5 -5
  291. package/ui/style/getGridClass.md +2 -2
  292. package/ui/style/getHeightClass.md +4 -4
  293. package/ui/style/getRadiusClass.md +9 -9
  294. package/ui/style/getShadowClass.md +6 -6
  295. package/ui/style/getSpaceClass.md +13 -13
  296. package/ui/style/getStrokeClass.md +6 -6
  297. package/ui/style/getTypographyClass.md +38 -38
  298. package/ui/style/getWidthClass.md +4 -4
  299. package/ui/table/Table.md +40 -30
  300. package/ui/transition/CollapseTransition.md +5 -5
  301. package/ui/transition/FadeTransition.md +9 -9
  302. package/ui/transition/HorizontalTransition.md +10 -10
  303. package/ui/transition/Transition.md +22 -22
  304. package/ui/transition/VerticalTransition.md +8 -8
  305. package/ui/tree/TreeApp.md +8 -8
  306. package/ui/tree/TreeMarkup.md +2 -2
  307. package/ui/tree/TreeMenu.md +3 -3
  308. package/ui/tree/TreeSidebar.md +1 -1
  309. package/ui/util/ClassProps.md +1 -1
  310. package/ui/util/getClass.md +10 -10
  311. package/ui/util/notify.md +11 -11
  312. package/ui/util/requireContext.md +1 -1
@@ -19,37 +19,39 @@ A pure URL matcher: it reads the current URL from the surrounding `<Meta>` conte
19
19
  import { HTML, Navigation, Router } from "shelving/ui";
20
20
 
21
21
  <HTML url={initialUrl} root="https://example.com/">
22
- <Navigation>
23
- <Router routes={{
24
- "/": HomePage,
25
- "/users/{id}": UserPage,
26
- "/about": AboutPage,
27
- }}/>
28
- </Navigation>
29
- </HTML>
22
+ <Navigation>
23
+ <Router
24
+ routes={{
25
+ "/": HomePage,
26
+ "/users/{id}": UserPage,
27
+ "/about": AboutPage,
28
+ }}
29
+ />
30
+ </Navigation>
31
+ </HTML>;
30
32
  ```
31
33
 
32
34
  ### Route value types
33
35
 
34
- | Value | Behaviour |
35
- |---|---|
36
- | Component | Rendered as `<Component {...params}/>` with merged placeholder + query props. |
37
- | `AbsolutePath` string | Redirects to that path (placeholders resolved against the source). |
38
- | `ReactElement` | Rendered as-is — use for layout wrapping or composing inner routers. |
39
- | `null` / `false` | Skipped, as if the route were absent — lets a route be conditionally disabled. |
36
+ | Value | Behaviour |
37
+ | --------------------- | ------------------------------------------------------------------------------ |
38
+ | Component | Rendered as `<Component {...params}/>` with merged placeholder + query props. |
39
+ | `AbsolutePath` string | Redirects to that path (placeholders resolved against the source). |
40
+ | `ReactElement` | Rendered as-is — use for layout wrapping or composing inner routers. |
41
+ | `null` / `false` | Skipped, as if the route were absent — lets a route be conditionally disabled. |
40
42
 
41
43
  ### Placeholder syntax
42
44
 
43
45
  All forms produce the same matched value — pick whichever reads best:
44
46
 
45
- | Form | Single segment | Catchall (one+ segments, also matches empty) |
46
- |---|---|---|
47
- | Anonymous | `*` (named `"0"`) | `**` / `***` (named `"0"`) |
48
- | Colon | `:name` | `:name*` / `:name**` |
49
- | Single brace | `{name}` | `{...name}` / `{name*}` |
50
- | Square bracket | `[name]` | `[...name]` / `[name*]` |
51
- | Dollar brace | `${name}` | `${...name}` / `${name*}` |
52
- | Double brace | `{{name}}` | `{{...name}}` / `{{name*}}` |
47
+ | Form | Single segment | Catchall (one+ segments, also matches empty) |
48
+ | -------------- | ----------------- | -------------------------------------------- |
49
+ | Anonymous | `*` (named `"0"`) | `**` / `***` (named `"0"`) |
50
+ | Colon | `:name` | `:name*` / `:name**` |
51
+ | Single brace | `{name}` | `{...name}` / `{name*}` |
52
+ | Square bracket | `[name]` | `[...name]` / `[name*]` |
53
+ | Dollar brace | `${name}` | `${...name}` / `${name*}` |
54
+ | Double brace | `{{name}}` | `{{...name}}` / `{{name*}}` |
53
55
 
54
56
  Modifier chars are tolerant: one-or-more stars and three-or-more dots are all equivalent, so `{path*}`, `{path**}`, `{...path}`, and `{....path}` behave the same. Catchall placeholders allow empty values, so a trailing catchall matches the trailing-slash-absent variant — `/files/{...path}` matches `/files`, `/files/`, and `/files/a/b/c`.
55
57
 
@@ -59,21 +61,23 @@ Put layout JSX as the route value with another `<Router>` inside. Since `<Router
59
61
 
60
62
  ```tsx
61
63
  const SIDEBARRED_ROUTES = {
62
- "/users": <UsersPage/>,
63
- "/users/{id}": <UserPage/>,
64
- "/settings": <SettingsPage/>,
64
+ "/users": <UsersPage />,
65
+ "/users/{id}": <UserPage />,
66
+ "/settings": <SettingsPage />,
65
67
  };
66
68
 
67
- <Router routes={{
68
- "/": <HomePage/>,
69
- "/{...path}": (
70
- <SidebarLayout sidebar={<Nav/>}>
71
- <Scroll vertical cover>
72
- <Router routes={SIDEBARRED_ROUTES}/>
73
- </Scroll>
74
- </SidebarLayout>
75
- ),
76
- }}/>
69
+ <Router
70
+ routes={{
71
+ "/": <HomePage />,
72
+ "/{...path}": (
73
+ <SidebarLayout sidebar={<Nav />}>
74
+ <Scroll vertical cover>
75
+ <Router routes={SIDEBARRED_ROUTES} />
76
+ </Scroll>
77
+ </SidebarLayout>
78
+ ),
79
+ }}
80
+ />;
77
81
  ```
78
82
 
79
83
  ### Section / microsite pattern
@@ -82,21 +86,23 @@ A self-contained "section" — its own URL prefix and routes — composes via a
82
86
 
83
87
  ```tsx
84
88
  const USER_ROUTES = {
85
- "/": UsersPage,
86
- "/{id}": UserPage,
87
- "/{id}/edit": UserEditPage,
89
+ "/": UsersPage,
90
+ "/{id}": UserPage,
91
+ "/{id}/edit": UserEditPage,
88
92
  };
89
93
 
90
94
  export function UserRouter({ path = "/" }: { path?: AbsolutePath }) {
91
- return <Router routes={USER_ROUTES} url={path}/>;
95
+ return <Router routes={USER_ROUTES} url={path} />;
92
96
  }
93
97
 
94
98
  // At the call site — the top-level router stays a flat list of section prefixes:
95
- <Router routes={{
96
- "/": <HomePage/>,
97
- "/users/{...path}": ({ path }) => <UserRouter path={path}/>,
98
- "/blog/{...path}": ({ path }) => <BlogRouter path={path}/>,
99
- }}/>
99
+ <Router
100
+ routes={{
101
+ "/": <HomePage />,
102
+ "/users/{...path}": ({ path }) => <UserRouter path={path} />,
103
+ "/blog/{...path}": ({ path }) => <BlogRouter path={path} />,
104
+ }}
105
+ />;
100
106
  ```
101
107
 
102
108
  The outer router captures everything under `/users` into `path`; the inner router treats it as its starting URL, so its `"/"` matches the bare `/users` and `/{id}` matches `/users/123`.
@@ -107,22 +113,25 @@ The two patterns compose — wrap a group of routes in a layout, then route furt
107
113
 
108
114
  ```tsx
109
115
  const SIDEBARRED_ROUTES = {
110
- "/": <Dashboard/>,
111
- "/users/{...path}": ({ path }) => <UserRouter path={path}/>,
112
- "/blog/{...path}": ({ path }) => <BlogRouter path={path}/>,
113
- "/settings": <SettingsPage/>,
116
+ "/": <Dashboard />,
117
+ "/users/{...path}": ({ path }) => <UserRouter path={path} />,
118
+ "/blog/{...path}": ({ path }) => <BlogRouter path={path} />,
119
+ "/settings": <SettingsPage />,
114
120
  };
115
121
 
116
- <Router routes={{
117
- "/login": <LoginPage/>, // no sidebar
118
- "/{...path}": ( // everything else wrapped
119
- <SidebarLayout sidebar={<Nav/>}>
120
- <Scroll vertical cover>
121
- <Router routes={SIDEBARRED_ROUTES}/>
122
- </Scroll>
123
- </SidebarLayout>
124
- ),
125
- }}/>
122
+ <Router
123
+ routes={{
124
+ "/login": <LoginPage />, // no sidebar
125
+ "/{...path}": // everything else wrapped
126
+ (
127
+ <SidebarLayout sidebar={<Nav />}>
128
+ <Scroll vertical cover>
129
+ <Router routes={SIDEBARRED_ROUTES} />
130
+ </Scroll>
131
+ </SidebarLayout>
132
+ ),
133
+ }}
134
+ />;
126
135
  ```
127
136
 
128
137
  ### Keeping page state
@@ -135,9 +144,9 @@ By default a page is unmounted when you navigate away and mounted fresh when you
135
144
 
136
145
  ```tsx
137
146
  renderToString(
138
- <HTML url={path} root="https://example.com/">
139
- <Router routes={ROUTES}/>
140
- </HTML>
147
+ <HTML url={path} root="https://example.com/">
148
+ <Router routes={ROUTES} />
149
+ </HTML>,
141
150
  );
142
151
  ```
143
152
 
@@ -20,13 +20,19 @@ import { Navigation, StackButton } from "shelving/ui";
20
20
  import { HomeIcon, SearchIcon, UserIcon } from "./icons.js";
21
21
 
22
22
  <Navigation stacks={["/home", "/discover", "/profile"]}>
23
- {/* … */}
24
- <nav className="tab-bar">
25
- <StackButton stack="/home" title="Home"><HomeIcon/></StackButton>
26
- <StackButton stack="/discover" title="Discover"><SearchIcon/></StackButton>
27
- <StackButton stack="/profile" title="Profile"><UserIcon/></StackButton>
28
- </nav>
29
- </Navigation>
23
+ {/* … */}
24
+ <nav className="tab-bar">
25
+ <StackButton stack="/home" title="Home">
26
+ <HomeIcon />
27
+ </StackButton>
28
+ <StackButton stack="/discover" title="Discover">
29
+ <SearchIcon />
30
+ </StackButton>
31
+ <StackButton stack="/profile" title="Profile">
32
+ <UserIcon />
33
+ </StackButton>
34
+ </nav>
35
+ </Navigation>;
30
36
  ```
31
37
 
32
38
  ## Styling
@@ -18,8 +18,8 @@ A box that scrolls its content on one or both axes. Use it for a wide table on a
18
18
  import { Scroll, Table } from "shelving/ui";
19
19
 
20
20
  <Scroll horizontal>
21
- <Table>…</Table>
22
- </Scroll>
21
+ <Table>…</Table>
22
+ </Scroll>;
23
23
  ```
24
24
 
25
25
  ### A scroll box for each page
@@ -30,30 +30,30 @@ Put `<Scroll vertical cover>` inside `<RouteCache>`, so each kept page has its o
30
30
  import { AppLayout, HorizontalTransition, PageLoader, RouteCache, Router, Scroll } from "shelving/ui";
31
31
 
32
32
  <AppLayout nav={<StackBar />}>
33
- <HorizontalTransition>
34
- <RouteCache>
35
- <Scroll vertical cover>
36
- <PageLoader>
37
- <Router routes={ROUTES} />
38
- </PageLoader>
39
- </Scroll>
40
- </RouteCache>
41
- </HorizontalTransition>
42
- </AppLayout>
33
+ <HorizontalTransition>
34
+ <RouteCache>
35
+ <Scroll vertical cover>
36
+ <PageLoader>
37
+ <Router routes={ROUTES} />
38
+ </PageLoader>
39
+ </Scroll>
40
+ </RouteCache>
41
+ </HorizontalTransition>
42
+ </AppLayout>;
43
43
  ```
44
44
 
45
45
  ### A chat
46
46
 
47
47
  ```tsx
48
48
  <Scroll vertical cover reverse>
49
- <div>{messages}</div>
50
- </Scroll>
49
+ <div>{messages}</div>
50
+ </Scroll>;
51
51
  ```
52
52
 
53
53
  ## Styling
54
54
 
55
- | Variable | Styles | Default |
56
- |---|---|---|
55
+ | Variable | Styles | Default |
56
+ | ----------------------- | --------------------------------------- | ---------------------------------------------- |
57
57
  | `--scroll-focus-border` | Outline when the box has keyboard focus | `var(--stroke-focus) solid var(--color-focus)` |
58
58
 
59
59
  **Global tokens it reads** — `--stroke-focus`, `--stroke-normal`, and `--color-focus`.
@@ -8,7 +8,7 @@ The anchor defaults to `--color-gray`, so the default ladder is a neutral grey r
8
8
 
9
9
  ## The recompute trick
10
10
 
11
- The ladder is computed at `:root` and *recomputed* under `TINT_CLASS` (the `.tint` class). That recomputation is the whole trick: move the anchor at any scope, apply `TINT_CLASS`, and all 21 shades (and `--tint-contrast`) rebuild from the new hue at that scope. Colour and status classes are exactly that — they only move the anchor:
11
+ The ladder is computed at `:root` and _recomputed_ under `TINT_CLASS` (the `.tint` class). That recomputation is the whole trick: move the anchor at any scope, apply `TINT_CLASS`, and all 21 shades (and `--tint-contrast`) rebuild from the new hue at that scope. Colour and status classes are exactly that — they only move the anchor:
12
12
 
13
13
  ```css
14
14
  /* Color.module.css — a colour variant just moves the anchor. */
@@ -28,15 +28,15 @@ The ladder is computed at `:root` and *recomputed* under `TINT_CLASS` (the `.tin
28
28
 
29
29
  Components paint from the ladder by convention:
30
30
 
31
- | Step | Used for |
32
- |---|---|
33
- | `--tint-00` | Body text, headings — maximum contrast |
34
- | `--tint-50` | The hue itself — accents, labels, `Tag` backgrounds, `<Button>` backgrounds |
35
- | `--tint-80` | Borders of boxes and controls — `<Card>`, `<Input>`, `<Notice>` |
36
- | `--tint-90` | Surfaces — `<Card>`, `Preformatted` backgrounds; light rules — `<Divider>`, `<Table>` rows, `<Blockquote>` |
37
- | `--tint-95` | Hover state of those surfaces |
38
- | `--tint-100` | The page background; text on `--tint-50` backgrounds |
39
- | `--tint-contrast` | Text on `--tint-50` backgrounds when the anchor can be light or dark |
31
+ | Step | Used for |
32
+ | ----------------- | ---------------------------------------------------------------------------------------------------------- |
33
+ | `--tint-00` | Body text, headings — maximum contrast |
34
+ | `--tint-50` | The hue itself — accents, labels, `Tag` backgrounds, `<Button>` backgrounds |
35
+ | `--tint-80` | Borders of boxes and controls — `<Card>`, `<Input>`, `<Notice>` |
36
+ | `--tint-90` | Surfaces — `<Card>`, `Preformatted` backgrounds; light rules — `<Divider>`, `<Table>` rows, `<Blockquote>` |
37
+ | `--tint-95` | Hover state of those surfaces |
38
+ | `--tint-100` | The page background; text on `--tint-50` backgrounds |
39
+ | `--tint-contrast` | Text on `--tint-50` backgrounds when the anchor can be light or dark |
40
40
 
41
41
  Pairings follow contrast: long text reads at `00`-on-`90` or `00`-on-`100`; short labels read at `100`-on-`50`, or at `contrast`-on-`50` when the anchor can be light.
42
42
 
@@ -65,4 +65,4 @@ A theme is a CSS file of custom-property overrides at `:root`, imported after th
65
65
 
66
66
  `TINT_CLASS` adds a plain global `tint` class (as well as its hashed module class) for this purpose, so `tint` is a reserved class name. Do not use `* { … }` for this: it declares the variable on every element, which adds style-recalc cost on large pages.
67
67
 
68
- **Don't override individual ladder steps (`--tint-90`, etc.) at `:root`.** The ladder is *recomputed* from the anchor inside every `TINT_CLASS` scope — which includes every component that accepts `color=` or `status=` — so a step override at `:root` only reaches untinted regions and produces inconsistent surfaces. Move the anchor (option 1 or 2) instead, and the steps follow.
68
+ **Don't override individual ladder steps (`--tint-90`, etc.) at `:root`.** The ladder is _recomputed_ from the anchor inside every `TINT_CLASS` scope — which includes every component that accepts `color=` or `status=` — so a step override at `:root` only reaches untinted regions and produces inconsistent surfaces. Move the anchor (option 1 or 2) instead, and the steps follow.
@@ -10,33 +10,33 @@ The following `:root` variables are defined by this module and can be overridden
10
10
 
11
11
  ### Palette
12
12
 
13
- | Variable | Default | Notes |
14
- |---|---|---|
15
- | `--color-gray` | `oklch(60% 0.01 240)` | Neutral anchor — also the default tint when nothing moves it. |
16
- | `--color-red` | `oklch(62% 0.2 30)` | |
17
- | `--color-orange` | `oklch(74% 0.157 60)` | |
18
- | `--color-yellow` | `oklch(86% 0.16 92)` | |
19
- | `--color-green` | `oklch(72% 0.185 130)` | |
20
- | `--color-aqua` | `oklch(72% 0.121 185)` | |
21
- | `--color-blue` | `oklch(57% 0.216 260)` | |
22
- | `--color-purple` | `oklch(58% 0.25 300)` | |
23
- | `--color-pink` | `oklch(68% 0.239 350)` | |
13
+ | Variable | Default | Notes |
14
+ | ---------------- | ---------------------- | ------------------------------------------------------------- |
15
+ | `--color-gray` | `oklch(60% 0.01 240)` | Neutral anchor — also the default tint when nothing moves it. |
16
+ | `--color-red` | `oklch(62% 0.2 30)` | |
17
+ | `--color-orange` | `oklch(74% 0.157 60)` | |
18
+ | `--color-yellow` | `oklch(86% 0.16 92)` | |
19
+ | `--color-green` | `oklch(72% 0.185 130)` | |
20
+ | `--color-aqua` | `oklch(72% 0.121 185)` | |
21
+ | `--color-blue` | `oklch(57% 0.216 260)` | |
22
+ | `--color-purple` | `oklch(58% 0.25 300)` | |
23
+ | `--color-pink` | `oklch(68% 0.239 350)` | |
24
24
 
25
25
  ### Semantic
26
26
 
27
- | Variable | Default | Used for |
28
- |---|---|---|
29
- | `--color-link` | `var(--color-blue)` | Link colour. |
30
- | `--color-focus` | `var(--color-blue)` | Focus outlines. |
31
- | `--color-success` | `var(--color-green)` | `status="success"`. |
32
- | `--color-warning` | `var(--color-orange)` | `status="warning"`. |
33
- | `--color-failure` | `var(--color-red)` | `status="error"` / `status="danger"`. |
34
- | `--color-backdrop` | `#0006` | The backdrop that dims the page behind `<Dialog>` and an open `<SidebarLayout>` drawer. |
27
+ | Variable | Default | Used for |
28
+ | ------------------ | --------------------- | --------------------------------------------------------------------------------------- |
29
+ | `--color-link` | `var(--color-blue)` | Link colour. |
30
+ | `--color-focus` | `var(--color-blue)` | Focus outlines. |
31
+ | `--color-success` | `var(--color-green)` | `status="success"`. |
32
+ | `--color-warning` | `var(--color-orange)` | `status="warning"`. |
33
+ | `--color-failure` | `var(--color-red)` | `status="error"` / `status="danger"`. |
34
+ | `--color-backdrop` | `#0006` | The backdrop that dims the page behind `<Dialog>` and an open `<SidebarLayout>` drawer. |
35
35
 
36
36
  ### Brand
37
37
 
38
- | Variable | Default | Used for |
39
- |---|---|---|
40
- | `--color-primary` | `var(--color-blue)` | `color="primary"`. |
38
+ | Variable | Default | Used for |
39
+ | ------------------- | --------------------- | -------------------- |
40
+ | `--color-primary` | `var(--color-blue)` | `color="primary"`. |
41
41
  | `--color-secondary` | `var(--color-purple)` | `color="secondary"`. |
42
- | `--color-tertiary` | `var(--color-pink)` | `color="tertiary"`. |
42
+ | `--color-tertiary` | `var(--color-pink)` | `color="tertiary"`. |
@@ -6,8 +6,8 @@ This module's main job is to **define and document the transition/animation timi
6
6
 
7
7
  The following `:root` variables are defined by this module and can be overridden in a theme file to adjust default styling across the whole app.
8
8
 
9
- | Variable | Default | Used for |
10
- |---|---|---|
11
- | `--duration-fast` | `150ms` | Snappy UI feedback — hovers, small toggles. |
12
- | `--duration-normal` | `300ms` | Default transitions. |
13
- | `--duration-slow` | `600ms` | Deliberate, large movements. |
9
+ | Variable | Default | Used for |
10
+ | ------------------- | ------- | ------------------------------------------- |
11
+ | `--duration-fast` | `150ms` | Snappy UI feedback — hovers, small toggles. |
12
+ | `--duration-normal` | `300ms` | Default transitions. |
13
+ | `--duration-slow` | `600ms` | Deliberate, large movements. |
@@ -17,8 +17,8 @@ The grid variant props lay out a component's children in equal-width columns —
17
17
 
18
18
  ## Styling
19
19
 
20
- | Variable | Styles | Default |
21
- |---|---|---|
20
+ | Variable | Styles | Default |
21
+ | ------------ | ---------------------------------------- | --------------------------- |
22
22
  | `--grid-gap` | Space between cells when no `gap` is set | `var(--space-small)` (12px) |
23
23
 
24
24
  **Global tokens it reads:** `--space-small`, plus the `--space-*` token of the `gap` variant.
@@ -23,8 +23,8 @@ A log-in screen, in the middle of a layout's scroll box:
23
23
 
24
24
  ```tsx
25
25
  <Page title="Log in">
26
- <Block height="full" middle width="narrow" padding="xxlarge" indent="normal">
27
- <LoginForm />
28
- </Block>
29
- </Page>
26
+ <Block height="full" middle width="narrow" padding="xxlarge" indent="normal">
27
+ <LoginForm />
28
+ </Block>
29
+ </Page>;
30
30
  ```
@@ -6,12 +6,12 @@ This module's main job is to **define and document the corner-radius design toke
6
6
 
7
7
  The following `:root` variables are defined by this module and can be overridden in a theme file to adjust default styling across the whole app. Every step derives from `--radius-normal`, so changing that one value reflows the whole ramp.
8
8
 
9
- | Variable | Default | Notes |
10
- |---|---|---|
11
- | `--radius-xxsmall` | `calc(var(--radius-normal) * 0.25)` | 4px |
12
- | `--radius-xsmall` | `calc(var(--radius-normal) * 0.5)` | 8px |
13
- | `--radius-small` | `calc(var(--radius-normal) * 0.75)` | 12px |
14
- | `--radius-normal` | `1rem` | 16px — Base radius (the root of the scale) |
15
- | `--radius-large` | `calc(var(--radius-normal) * 1.5)` | 24px |
16
- | `--radius-xlarge` | `calc(var(--radius-normal) * 2)` | 32px |
17
- | `--radius-xxlarge` | `calc(var(--radius-normal) * 3)` | 48px |
9
+ | Variable | Default | Notes |
10
+ | ------------------ | ----------------------------------- | ------------------------------------------ |
11
+ | `--radius-xxsmall` | `calc(var(--radius-normal) * 0.25)` | 4px |
12
+ | `--radius-xsmall` | `calc(var(--radius-normal) * 0.5)` | 8px |
13
+ | `--radius-small` | `calc(var(--radius-normal) * 0.75)` | 12px |
14
+ | `--radius-normal` | `1rem` | 16px — Base radius (the root of the scale) |
15
+ | `--radius-large` | `calc(var(--radius-normal) * 1.5)` | 24px |
16
+ | `--radius-xlarge` | `calc(var(--radius-normal) * 2)` | 32px |
17
+ | `--radius-xxlarge` | `calc(var(--radius-normal) * 3)` | 48px |
@@ -6,12 +6,12 @@ This module's main job is to **define and document the elevation drop-shadow des
6
6
 
7
7
  The following `:root` variables are defined by this module and can be overridden in a theme file to adjust default styling across the whole app. The scale is [Tailwind's](https://tailwindcss.com/docs/box-shadow) `shadow-md`, `shadow-lg` and `shadow-xl` with half the Y offset, so a sliver of shadow always shows at the top. Each shadow has two layers of `--shadow-color`. Both layers have a negative spread, so no dark line shows under the bottom edge.
8
8
 
9
- | Variable | Default | Used by |
10
- |---|---|---|
11
- | `--shadow-color` | `#0003` (20% black) | Every layer of every shadow below. |
12
- | `--shadow-small` | `0 2px 6px -1px`, `0 1px 4px -2px` | `<Popover>` |
13
- | `--shadow-normal` | `0 5px 15px -3px`, `0 2px 6px -4px` | Floating `<Notices>` |
14
- | `--shadow-large` | `0 10px 25px -5px`, `0 4px 10px -6px` | `<Modal>`, the open `<SidebarLayout>` drawer |
9
+ | Variable | Default | Used by |
10
+ | ----------------- | ------------------------------------- | -------------------------------------------- |
11
+ | `--shadow-color` | `#0003` (20% black) | Every layer of every shadow below. |
12
+ | `--shadow-small` | `0 2px 6px -1px`, `0 1px 4px -2px` | `<Popover>` |
13
+ | `--shadow-normal` | `0 5px 15px -3px`, `0 2px 6px -4px` | Floating `<Notices>` |
14
+ | `--shadow-large` | `0 10px 25px -5px`, `0 4px 10px -6px` | `<Modal>`, the open `<SidebarLayout>` drawer |
15
15
 
16
16
  The table shows the values in pixels. The source uses `rem`.
17
17
 
@@ -14,19 +14,19 @@ The following `:root` variables are defined by this module and can be overridden
14
14
 
15
15
  ### Scale
16
16
 
17
- | Variable | Default | Notes |
18
- |---|---|---|
19
- | `--space-xxsmall` | `var(--space-normal) * 0.25` | 4px |
20
- | `--space-xsmall` | `var(--space-normal) * 0.5` | 8px |
21
- | `--space-small` | `var(--space-normal) * 0.75` | 12px |
22
- | `--space-normal` | 1rem | 16px - base spacing unit (the root of the scale). |
23
- | `--space-large` | `var(--space-normal) * 1.5` | 24px |
24
- | `--space-xlarge` | `var(--space-normal) * 2` | 32px |
25
- | `--space-xxlarge` | `var(--space-normal) * 3` | 48px |
17
+ | Variable | Default | Notes |
18
+ | ----------------- | ---------------------------- | ------------------------------------------------- |
19
+ | `--space-xxsmall` | `var(--space-normal) * 0.25` | 4px |
20
+ | `--space-xsmall` | `var(--space-normal) * 0.5` | 8px |
21
+ | `--space-small` | `var(--space-normal) * 0.75` | 12px |
22
+ | `--space-normal` | 1rem | 16px - base spacing unit (the root of the scale). |
23
+ | `--space-large` | `var(--space-normal) * 1.5` | 24px |
24
+ | `--space-xlarge` | `var(--space-normal) * 2` | 32px |
25
+ | `--space-xxlarge` | `var(--space-normal) * 3` | 48px |
26
26
 
27
27
  ### Semantic
28
28
 
29
- | Variable | Default | Used for |
30
- |---|---|---|
31
- | `--space-section` | `2rem` | Top margin for titles / headings / section blocks. |
32
- | `--space-paragraph` | `var(--space-normal)` | Default block-space for most prose elements. |
29
+ | Variable | Default | Used for |
30
+ | ------------------- | --------------------- | -------------------------------------------------- |
31
+ | `--space-section` | `2rem` | Top margin for titles / headings / section blocks. |
32
+ | `--space-paragraph` | `var(--space-normal)` | Default block-space for most prose elements. |
@@ -6,9 +6,9 @@ This module's main job is to **define and document the border-thickness design t
6
6
 
7
7
  The following `:root` variables are defined by this module and can be overridden in a theme file to adjust default styling across the whole app.
8
8
 
9
- | Variable | Default | Used for |
10
- |---|---|---|
11
- | `--stroke` | `2px` | Base border thickness — the root of the scale. |
12
- | `--stroke-normal` | `calc(var(--stroke) * 1)` | Default borders. |
13
- | `--stroke-thick` | `calc(var(--stroke) * 1.5)` | Heavier borders. |
14
- | `--stroke-focus` | `var(--stroke-thick)` | Focus-outline thickness. |
9
+ | Variable | Default | Used for |
10
+ | ----------------- | --------------------------- | ---------------------------------------------- |
11
+ | `--stroke` | `2px` | Base border thickness — the root of the scale. |
12
+ | `--stroke-normal` | `calc(var(--stroke) * 1)` | Default borders. |
13
+ | `--stroke-thick` | `calc(var(--stroke) * 1.5)` | Heavier borders. |
14
+ | `--stroke-focus` | `var(--stroke-thick)` | Focus-outline thickness. |
@@ -14,54 +14,54 @@ The following `:root` variables are defined by this module and can be overridden
14
14
 
15
15
  ### Faces
16
16
 
17
- | Variable | Default | Notes |
18
- |---|---|---|
19
- | `--font-sans` | `system-ui` | Default UI face. |
20
- | `--font-monospace` | `ui-monospace, "SF Mono", "Consolas", "Menlo", monospace` | Code face. |
21
- | `--font-serif` | `"Palatino", "Garamond", serif` | Serif face. |
22
- | `--font-title` | `var(--font-sans)` | Headings and titles. |
23
- | `--font-body` | `var(--font-sans)` | Body baseline. |
24
- | `--font-label` | `var(--font-sans)` | Labels. |
25
- | `--font-code` | `var(--font-monospace)` | Code and preformatted text. |
17
+ | Variable | Default | Notes |
18
+ | ------------------ | --------------------------------------------------------- | --------------------------- |
19
+ | `--font-sans` | `system-ui` | Default UI face. |
20
+ | `--font-monospace` | `ui-monospace, "SF Mono", "Consolas", "Menlo", monospace` | Code face. |
21
+ | `--font-serif` | `"Palatino", "Garamond", serif` | Serif face. |
22
+ | `--font-title` | `var(--font-sans)` | Headings and titles. |
23
+ | `--font-body` | `var(--font-sans)` | Body baseline. |
24
+ | `--font-label` | `var(--font-sans)` | Labels. |
25
+ | `--font-code` | `var(--font-monospace)` | Code and preformatted text. |
26
26
 
27
27
  ### Weights
28
28
 
29
- | Variable | Default | Used for |
30
- |---|---|---|
31
- | `--weight-normal` | `400` | Body text. |
32
- | `--weight-strong` | `700` | Bold / emphasis. |
33
- | `--weight-title` | `var(--weight-strong)` | Headings and titles. |
34
- | `--weight-body` | `var(--weight-normal)` | Body baseline. |
35
- | `--weight-label` | `var(--weight-strong)` | Labels (`<Label>`, table/definition headers). |
36
- | `--weight-code` | `500` | Monospace / code. |
29
+ | Variable | Default | Used for |
30
+ | ----------------- | ---------------------- | --------------------------------------------- |
31
+ | `--weight-normal` | `400` | Body text. |
32
+ | `--weight-strong` | `700` | Bold / emphasis. |
33
+ | `--weight-title` | `var(--weight-strong)` | Headings and titles. |
34
+ | `--weight-body` | `var(--weight-normal)` | Body baseline. |
35
+ | `--weight-label` | `var(--weight-strong)` | Labels (`<Label>`, table/definition headers). |
36
+ | `--weight-code` | `500` | Monospace / code. |
37
37
 
38
38
  ### Sizes
39
39
 
40
- | Variable | Default | Notes |
41
- |---|---|---|
42
- | `--size-scale` | `1.25` | Ratio between steps. |
43
- | `--size-normal` | `1rem` | Base size — the root of the modular scale. |
40
+ | Variable | Default | Notes |
41
+ | ------------------------------------ | ------------------------------------------------------ | ----------------------------------------------------- |
42
+ | `--size-scale` | `1.25` | Ratio between steps. |
43
+ | `--size-normal` | `1rem` | Base size — the root of the modular scale. |
44
44
  | `--size-xxsmall` … `--size-xxxlarge` | `calc(var(--size-normal) * pow(var(--size-scale), n))` | Each step is the base scaled by a power of the ratio. |
45
- | `--size-1x` … `--size-10x` | `calc(var(--size-normal) * n)` | Direct multiples of normal size. |
46
- | `--size-icon` | `1.5rem` | Icon box size. |
47
- | `--size-label` | `var(--size-small)` | Label text size. |
48
- | `--size-smaller` | `0.875em` | Relative (em) shrink — e.g. inline `<Small>`. |
49
- | `--size-larger` | `1.5em` | Relative grow. |
50
- | `--size-xlarger` | `2.5em` | Relative grow. |
51
- | `--size-xxlarger` | `5em` | Relative grow. |
45
+ | `--size-1x` … `--size-10x` | `calc(var(--size-normal) * n)` | Direct multiples of normal size. |
46
+ | `--size-icon` | `1.5rem` | Icon box size. |
47
+ | `--size-label` | `var(--size-small)` | Label text size. |
48
+ | `--size-smaller` | `0.875em` | Relative (em) shrink — e.g. inline `<Small>`. |
49
+ | `--size-larger` | `1.5em` | Relative grow. |
50
+ | `--size-xlarger` | `2.5em` | Relative grow. |
51
+ | `--size-xxlarger` | `5em` | Relative grow. |
52
52
 
53
53
  ### Line height
54
54
 
55
- | Variable | Default | Used for |
56
- |---|---|---|
57
- | `--leading` | `clamp(1.05em, calc(1em + 0.5rem), 1.5em)` | Default line height; paired with every font-size variant and the body baseline. |
58
- | `--leading-normal` | `1.5` | Plain unitless line height for dense blocks. |
55
+ | Variable | Default | Used for |
56
+ | ------------------ | ------------------------------------------ | ------------------------------------------------------------------------------- |
57
+ | `--leading` | `clamp(1.05em, calc(1em + 0.5rem), 1.5em)` | Default line height; paired with every font-size variant and the body baseline. |
58
+ | `--leading-normal` | `1.5` | Plain unitless line height for dense blocks. |
59
59
 
60
60
  ### Case
61
61
 
62
- | Variable | Default | Used for |
63
- |---|---|---|
64
- | `--case-title` | `none` | `text-transform` for titles and headings. |
65
- | `--case-body` | `none` | `text-transform` for body text and the body baseline. |
66
- | `--case-label` | `uppercase` | `text-transform` for labels and tags. |
67
- | `--case-code` | `none` | `text-transform` for code and preformatted text. |
62
+ | Variable | Default | Used for |
63
+ | -------------- | ----------- | ----------------------------------------------------- |
64
+ | `--case-title` | `none` | `text-transform` for titles and headings. |
65
+ | `--case-body` | `none` | `text-transform` for body text and the body baseline. |
66
+ | `--case-label` | `uppercase` | `text-transform` for labels and tags. |
67
+ | `--case-code` | `none` | `text-transform` for code and preformatted text. |
@@ -21,8 +21,8 @@ The `width` variant prop sets a component's inline-size — `<Card width="narrow
21
21
 
22
22
  The following `:root` variables are defined by this module and can be overridden in a theme file to adjust default styling across the whole app.
23
23
 
24
- | Variable | Default | Used for |
25
- |---|---|---
24
+ | Variable | Default | Used for |
25
+ | ---------------- | ------- | ---------------------------------------------------------- |
26
26
  | `--width-narrow` | `36rem` | Focused single-purpose column, e.g. forms and login pages. |
27
- | `--width-normal` | `48rem` | Standard content column. |
28
- | `--width-wide` | `80rem` | Full dashboard-style content. |
27
+ | `--width-normal` | `48rem` | Standard content column. |
28
+ | `--width-wide` | `80rem` | Full dashboard-style content. |