rl-react-components 2.5.0 → 2.5.1

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 (2) hide show
  1. package/README.md +28 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -49,6 +49,32 @@ export default function App() {
49
49
 
50
50
  The components need no CSS reset: each sets the box model, margins and fonts it relies on.
51
51
 
52
+ ## Fonts
53
+
54
+ The package ships no fonts. The design system suggests the three of the demo page: Inter for text
55
+ and controls, Space Grotesk for titles, JetBrains Mono for labels and code. To use them, load them
56
+ in the page's `<head>`:
57
+
58
+ ```html
59
+ <link
60
+ rel="stylesheet"
61
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
62
+ />
63
+ ```
64
+
65
+ Then set Inter on the page, since buttons, fields and tags take the page's font:
66
+
67
+ ```css
68
+ body {
69
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
70
+ line-height: 1.6;
71
+ }
72
+ ```
73
+
74
+ [Using the same fonts](https://github.com/renatolinsdigital/react-shared-components/blob/master/docs/design-system.md#using-the-same-fonts)
75
+ also shows how to host them with the app, use other fonts, and give the app's own text the same
76
+ hierarchy.
77
+
52
78
  ## Light mode
53
79
 
54
80
  Dark is the default. Put `data-theme="light"` on `<html>` to switch the page, or on any element to
@@ -81,6 +107,8 @@ override any of them in its own CSS.
81
107
  what each one does, with a link to its props and examples.
82
108
  - [Getting started](https://github.com/renatolinsdigital/react-shared-components/blob/master/docs/getting-started.md):
83
109
  routers, server rendering and upgrading.
110
+ - [The design system](https://github.com/renatolinsdigital/react-shared-components/blob/master/docs/design-system.md):
111
+ the ideas behind the components, typography and icons.
84
112
  - [Theming](https://github.com/renatolinsdigital/react-shared-components/blob/master/docs/theming.md):
85
113
  the colour tokens and how to override them.
86
114
  - [Accessibility](https://github.com/renatolinsdigital/react-shared-components/blob/master/docs/accessibility.md):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rl-react-components",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "React components and hooks with no app knowledge: form fields, layout, cards, Markdown, toasts and canvas effects.",
5
5
  "keywords": [
6
6
  "react",