-
Notifications
You must be signed in to change notification settings - Fork 8
/
styleguide.config.js
282 lines (280 loc) · 7.76 KB
/
styleguide.config.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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
const path = require('path');
const { version } = require('./package');
const fs = require('fs');
module.exports = {
assetsDir: './src/assets/',
styleguideComponents: {
Wrapper: path.join(__dirname, 'src/StyleGuideWrapper'),
},
skipComponentsWithoutExample: true,
version,
title: 'FDNS UI',
sections: [
{
sections: [
{
name: '', // N.B. ALL SECTIONS MUST HAVE A NAME, EVEN IF IT'S JUST AN EMPTY STRING
content: './src/documentation/introduction.md',
},
]
},
{
name: 'Getting Started',
sections: [
{
name: 'Design',
content: './src/documentation/getting-started/design.md',
},
{
name: 'Develop',
content: './src/documentation/getting-started/develop.md',
},
]
},
{
name: 'Accessibility',
content: './src/documentation/accessibility/accessibility.md',
sections: [
{
name: 'Accessibility Standards',
content: './src/documentation/accessibility/accessibility-standards.md',
},
{
name: '508 Compliance Report',
content: './src/documentation/accessibility/508-compliance-report.md',
},
{
name: 'Resources',
content: './src/documentation/accessibility/resources.md',
},
{
name: 'Tools',
content: './src/documentation/accessibility/tools.md',
},
]
},
{
name: 'Style Guide',
description: 'A Style Guide is a set of standards and rules for the formatting of digital interfaces. Representing a subclass in the design system, this static documentation describes the design system itself: how products should look and feel, use cases for UI patterns, correct typographic scales, etc.',
content: './src/documentation/style-guide/introduction.md',
sections: [
{
name: 'Color',
content: './src/documentation/style-guide/colors.html',
},
{
name: 'Spacing',
content: './src/documentation/style-guide/spacing.md',
},
{
name: 'Typography',
content: './src/documentation/style-guide/typography.md',
},
]
},
{
name: 'Pattern Library',
description: 'A Pattern library is a collection of functional design modules (components), that appear across or within an application multiple times.',
content: './src/documentation/pattern-library/introduction.md',
sections: [
{
name: 'Pattern Components',
content: './src/documentation/pattern-library/patterns.md',
},
{
name: 'Layout',
content: './src/documentation/pattern-library/layout.md',
},
{
name: 'Themes',
content: './src/documentation/pattern-library/themes.md',
},
{
name: 'Icons',
content: './src/documentation/pattern-library/icons.md',
},
]
},
{
name: 'Coded Components',
description: 'Current FDNS UI is built using react, however the code could be refactored using style and pattern libraries as a guide into other front-end frameworks.',
content: './src/documentation/coded-components/component-status.md',
sections: [
{
name: 'Buttons',
components: './src/components/buttons/*.js',
},
{
name: 'Data Display',
components: './src/components/data-display/*.js',
},
{
name: 'Feedback',
components: './src/components/feedback/*.js',
},
{
name: 'Filters',
components: './src/components/filters/*.js',
},
{
name: 'Icons',
components: './src/components/icons/index.js',
},
{
name: 'Layouts',
components: './src/components/layouts/*.js',
},
{
name: 'Navigation',
components: './src/components/navigation/*.js',
},
{
name: 'Options',
components: './src/components/options/*.js',
},
{
name: 'Search',
components: './src/components/search/*.js',
},
{
name: 'Surfaces',
components: './src/components/surfaces/*.js'
},
{
name: 'Uploaders',
components: './src/components/uploaders/*.js'
},
{
name: 'Utils',
components: './src/components/utils/*.js'
},
],
},
{
name: 'Shapes & Fixtures',
description: 'The shapes and fixtures used in the various components.',
sections: [
{
name: 'Shapes',
content: './src/fixtures/shapes.md',
},
{
name: 'Fixtures',
content: './src/fixtures/fixtures.md',
}
]
},
{
name: 'Contribution Guidelines',
sections: [
{
name: 'Contributing',
content: './src/documentation/contributing-guidelines/contributing.md',
}
]
},
{
name: 'About FDNS UI',
description: 'FDNS UI is a pragmatic component and design library used to build evolving interfaces for public health applications. It utilizes a system of styles, patterns, components and documentation; to provide a unified language and consistent look and feel when designing data-driven applications. This project is built and maintained open-source by the Centers for Disease Control under the CSELS/DHIS.',
sections: [
{
name: 'Current Initiatives',
content: './src/documentation/about-fdns-ui/current-initiatives.md',
},
{
name: 'FDNS UI History',
content: './src/documentation/about-fdns-ui/fdns-ui-history.md',
},
{
name: 'Release Notes',
content: './src/documentation/about-fdns-ui/release-notes.md',
},
{
name: 'Roadmap',
content: './src/documentation/about-fdns-ui/roadmap.md',
},
]
},
{
name: 'CDC Notices',
sections: [
{
name: 'Public Domain',
content: './src/documentation/cdc-notices/public-domain.md',
},
{
name: 'License',
content: './src/documentation//cdc-notices/license.md',
},
{
name: 'Privacy',
content: './src/documentation//cdc-notices/privacy.md',
},
{
name: 'Records',
content: './src/documentation//cdc-notices/records.md',
},
{
name: 'Notices',
content: './src/documentation//cdc-notices/notices.md',
},
]
},
{
name: 'Resources',
description: 'There are many online reference sites and forums which are a great place for learning best practices and application architecture',
sections: [
{
name: 'Links',
content: './src/documentation/resources/link.md',
},
]
},
],
theme: {
color: {
name: '#FFF',
baseBackground: '#FFFFFF',
link: '#2E845F',
linkHover: '#90a7bf',
border: '#717376',
sidebarLinks: '#2c3e50;',
sidebarLink: '#2c3e50;',
sidebarBackground: '#FFFFFF',
codeBase: '#fff',
codeComment: '#999',
codePunctuation: '#fff',
codeProperty: '#fff',
codeDeleted: '#fff',
codeString: '#3EAF7C',
codeInserted: '#fff',
codeOperator: '#F7F8F9',
codeKeyword: '#A6D7FF',
codeFunction: '#fff1c2',
codeVariable: '#fff',
codeBackground: '#282c34;'
},
fontFamily: {
base: '"proxima-nova", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
}
},
updateExample(props, exampleFilePath) {
// props.settings are passed by any fenced code block, in this case
const { settings, lang } = props;
// "../mySourceCode.js"
if (settings && settings.file && typeof settings.file === 'string') {
// "absolute path to mySourceCode.js"
const filepath = path.resolve(exampleFilePath, settings.file);
// displays the block as static code
settings.static = true;
// no longer needed
delete settings.file;
return {
content: fs.readFileSync(filepath, 'utf8'),
settings,
lang,
}
}
return props;
}
};