forked from react-ui-org/react-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doczrc.js
250 lines (248 loc) · 5.88 KB
/
doczrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
import vsDarkTheme from 'prism-react-renderer/themes/vsDark';
const codeMaxHeight = 'min(66vh, 1000px)';
const defaultFontFamily = '"Titillium Web", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
export default {
dest: 'docs',
groups: {
'': [],
Basics: [
'Getting Started',
'Foundation',
],
Components: [
'Actions',
'Inputs',
'Layouts',
'Miscellaneous',
],
Helpers: [
'CSS Helpers',
'JS Helpers',
],
// eslint-disable-next-line sort-keys
Guides: [
'Customize',
'Contribute',
],
},
ignore: ['LICENSE.md', 'README.md'],
lang: 'en',
menu: [
'Introduction',
{
menu: [
'Installation',
'Usage',
'Browsers & Devices',
],
name: 'Getting Started',
},
{
menu: [],
name: 'Foundation',
},
{
menu: [],
name: 'Actions',
},
{
menu: [],
name: 'Inputs',
},
{
menu: [],
name: 'Layouts',
},
{
menu: [],
name: 'Miscellaneous',
},
{
menu: [],
name: 'CSS Helpers',
},
{
menu: [],
name: 'JS Helpers',
},
{
menu: [
'Theming Overview', // Theming submenu
'Forms Theming', // Theming submenu
'Global Props',
'Translations',
],
name: 'Customize',
},
{
menu: [
'General Guidelines',
'API Guidelines',
'Composition',
'CSS Guidelines',
'Releasing',
],
name: 'Contribute',
},
],
// Use short menu items while keeping page title descriptive.
menuDisplayName: {
'Forms Theming': 'Forms',
'Theming Overview': 'Overview',
},
public: '/public',
themeConfig: {
colors: {
modes: {
dark: {
text: '#ced4de',
},
},
},
editor: {
fontSize: 1,
},
fonts: {
monospace: 'var(--rui-code-font-family)',
},
footer: {
navigation: true,
},
header: {
fixed: false,
icons: 'minimal',
},
menu: {
headings: {
rightSide: true,
},
search: false,
},
prism: {
dark: vsDarkTheme,
light: vsDarkTheme,
},
search: true,
showPlaygroundEditor: false,
styles: {
Container: {
'& > div > div > div > :is(ul, ol)': {
ml: 5,
},
'& > div > div > div > h1': {
fontFamily: defaultFontFamily,
mb: 4,
},
'& > div > div > div > h2': {
fontSize: 5,
mb: 3,
mt: 5,
},
'& > div > div > div > h3': {
fontSize: 4,
mb: 2,
mt: 4,
},
'& > div > div > div > h4': {
fontSize: 3,
mb: 1,
mt: 2,
},
'& [data-testid="live-preview"]': {
fontSize: '1rem', // Set the font size in playground to override the docs theme default.
overflow: 'auto', // Make preview scrollable.
p: 3,
},
'& [data-testid="live-preview"] * ul': { // Reset lists in components.
ml: 0,
},
'& [data-testid="live-preview"] > *:not(.example), & [data-testid="live-preview"] .example > *': {
m: 1,
maxWidth: ['-webkit-fill-available', '-moz-available'], // Fix overflowing full-width components in some browsers.
},
'& [data-testid="playground"]': {
my: '1.5rem !important',
},
'& [data-testid="playground"] > div:last-child > div': { // Visually emphasize the resize bar.
'&:hover, &:active': {
borderRightColor: 'var(--rui-color-note)',
},
borderRight: '3px solid transparent',
transition: 'border-color 200ms ease-in-out',
},
'& [data-testid="playground"] > div[class$="NormalWrapper"]': { // Make code editor scrollable.
maxHeight: codeMaxHeight,
overflow: 'auto !important',
},
'& [data-testid="playground"] pre': {
maxHeight: 'none',
},
'& [data-testid="prop-name"]': {
flexShrink: 0,
},
'.prism-code': {
my: '1.5rem !important',
},
blockquote: {
fontStyle: 'normal',
},
code: {
bg: 'rgba(0, 0, 0, 0.05)',
},
'code, pre': {
fontSize: '80%', // Adjust code font size to work better with 20px body text size.
},
'h1 + p': {
fontSize: 4,
},
hr: {
my: 6,
},
maxWidth: 1150,
p: null,
pre: {
maxHeight: codeMaxHeight,
},
px: 4,
py: 6,
table: {
fontSize: 'var(--rui-typography-size-0)',
minWidth: '0 !important',
},
'table tbody td:first-child': {
fontWeight: 'bold', // Emphasize prop names.
},
'table tbody td:first-child code': {
fontWeight: 'initial', // Revert previously set emphasize for custom property names.
},
'table tbody td:nth-child(2) code': {
whiteSpace: 'pre-wrap', // Preserve formatting for prop types, wrap lines when necessary.
},
'table td p:not(:last-child)': {
mb: 3,
},
'table ul, table ol': {
ml: 1,
},
},
Header: {
'a:hover': {
color: 'unset',
},
},
a: {
'&:hover': {
color: 'var(--rui-link-hover-color)',
textDecoration: 'var(--rui-link-hover-decoration)',
},
color: 'var(--rui-link-color)',
textDecoration: 'var(--rui-link-decoration)',
},
root: {
'--theme-ui-colors-playground-bg': 'rgba(179, 179, 179, 0.1)', // Make components with white background stand out.
fontFamily: defaultFontFamily,
},
},
},
title: 'React UI',
};