Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Commit fd191d9

Browse files
authored
Merge pull request #10 from material-docs/prod
Material Docs Documentation v0.1.6
2 parents 663d64b + bacd958 commit fd191d9

File tree

55 files changed

+423
-211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+423
-211
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@material-docs/material-docs-documentation",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"private": false,
55
"description": "Documentation for Material Docs. material-docs - react framework for easy creating documentation site in material design style.",
66
"homepage": "http://material-docs.com/",
@@ -30,7 +30,7 @@
3030
"license": "MIT",
3131
"dependencies": {
3232
"@craco/craco": "^5.6.4",
33-
"@material-docs/core": "^0.4.7",
33+
"@material-docs/core": "^0.4.9",
3434
"@material-docs/react-components-docs-extension": "^0.2.0",
3535
"@material-ui/core": "^4.11.0",
3636
"@material-ui/icons": "^4.9.1",

src/Documentation.js

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ import ReactComponentApiPageDemo
6868
from "./pages/Extensions/ReactComponentsDocsExtension/Components/ReactComponentApiPageDemo";
6969
import CodeDemo from "./pages/Components/CodeDemo";
7070
import TablesDemo from "./pages/Components/TablesDemo";
71+
import LangProviderAPI from "./pages/APIs/LangProviderAPI";
72+
import LocaleAPI from "./pages/APIs/LocaleAPI";
73+
import LandingAPI from "./pages/APIs/LandingAPI";
74+
import LinkAPI from "./pages/APIs/LinkAPI";
7175

7276

7377
export default function Documentation() {
@@ -105,10 +109,13 @@ export default function Documentation() {
105109
<MaterialDocsLanding/>
106110
</Landing>
107111
<DocsPages>
108-
<PagesGroup name={"Getting started"}>
112+
<PagesGroup name={"Getting started"} order={1}>
109113
<Installation/>
110114
</PagesGroup>
111-
<PagesGroup name={"Components"}>
115+
<PagesGroup name={"Tutorials"} order={2}>
116+
<CreatingMaterialDocs/>
117+
</PagesGroup>
118+
<PagesGroup name={"Components"} order={3}>
112119
<CodeDemo/>
113120
<ListsDemo/>
114121
<LayoutDemo/>
@@ -118,7 +125,7 @@ export default function Documentation() {
118125
<ImagesDemo/>
119126
<TablesDemo/>
120127
</PagesGroup>
121-
<PagesGroup name={"Component APIs"}>
128+
<PagesGroup name={"Component APIs"} order={4}>
122129
<DocsLayoutAPI/>
123130
<DocsPageAPI/>
124131
<DemoWithCodeAPI/>
@@ -150,16 +157,20 @@ export default function Documentation() {
150157
<H6API/>
151158
<HeaderAPI/>
152159
<AutoDocsMenuAPI/>
160+
<LocaleAPI/>
161+
<LandingAPI/>
162+
<LinkAPI/>
153163
<PagesGroup name={"System components"}>
164+
<LangProviderAPI/>
154165
<LanguageSelectorAPI/>
155166
<SearchFieldAPI/>
156167
<TagableAPI/>
157168
</PagesGroup>
158169
</PagesGroup>
159-
<PagesGroup name={"Tutorials"}>
160-
<CreatingMaterialDocs/>
170+
<PagesGroup name={"System"} order={5}>
171+
161172
</PagesGroup>
162-
<PagesGroup name={"Extensions"}>
173+
<PagesGroup name={"Extensions"} order={6}>
163174
<PagesGroup name={"React Components Docs Extension"}>
164175
<ReactComponentApiPageDemo/>
165176
<PagesGroup name={"Component API"}>
@@ -169,9 +180,6 @@ export default function Documentation() {
169180
</PagesGroup>
170181
</PagesGroup>
171182
</PagesGroup>
172-
<PagesGroup name={"System"}>
173-
174-
</PagesGroup>
175183
</DocsPages>
176184
</DocsLayout>
177185
);

src/components/ApiPage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export default function ApiPage(props, ref) {
5050
<ReactComponentApiPage
5151
name={name}
5252
searchDescription={locale.searchDescription}
53+
searchLabel={name + " API"}
5354
searchTags={searchTags}
5455
>
5556
<ReactComponentApiPageSummary>
@@ -60,7 +61,7 @@ export default function ApiPage(props, ref) {
6061
</H3>
6162
</ReactComponentApiPageSummary>
6263
<ReactComponentApiPageImport>
63-
<Code theme={"darcula"}>{importCode}</Code>
64+
<Code themeLight={"darcula"}>{importCode}</Code>
6465
<Markdown>{componentAPILocale.importDifferenceText}</Markdown>
6566
{overrideName && <Markdown data={{name: overrideName}}>{componentAPILocale.componentName}</Markdown>}
6667
</ReactComponentApiPageImport>

src/locale/EN.json

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,11 @@
182182
"noTag": "If true and name prop is defined - header with name will not generate tag for content tab.",
183183
"paperContainer": "If true - demo content will be wrapped in Paper component.",
184184
"actions": "Array of additional actions. The actions will be displayed in the dropdown menu when you click the ExpandMore icon button.",
185-
"p": "Padding of demo block in theme.spacing units.",
186-
"m": "Margin of demo block in theme.spacing units.",
185+
"p": "Padding of demo block in _theme.spacing_ units.",
186+
"m": "Margin of demo block in _theme.spacing_ units.",
187+
"theme": "Code highlighting and background styling type.",
188+
"themeLight": "Code highlighting and background styling type when global theme in light mode.",
189+
"themeDark": "Code highlighting and background styling type when global theme in dark mode.",
187190
"children": "Children of an element. Will be placed in demo block."
188191
},
189192
"css": {
@@ -206,6 +209,8 @@
206209
"props": {
207210
"language": "Language name for code highlighter.",
208211
"theme": "Code highlighting and background styling type.",
212+
"themeLight": "Code highlighting and background styling type when global theme in light mode.",
213+
"themeDark": "Code highlighting and background styling type when global theme in dark mode.",
209214
"children": "Code to display in code highlighter."
210215
},
211216
"css": {
@@ -225,10 +230,67 @@
225230
"name": "Name of the group. Will be displayed on button in menu.",
226231
"getData": "Callback, provided to get group data without context usage.",
227232
"order": "As lower order as higher will be displayed menu item.",
233+
"defaultExpanded": "If true, menu group will be expanded on startup.",
234+
"children": "Children of an element."
235+
},
236+
"css": {}
237+
},
238+
"LandingAPI": {
239+
"searchDescription": "Landing - react component, designed to provide documentation with free style landing page.",
240+
"searchTags": {
241+
"page": "page",
242+
"landing": "landing",
243+
"container": "container"
244+
},
245+
"props": {
228246
"children": "Children of an element."
229247
},
230248
"css": {}
231249
},
250+
"LangProviderAPI": {
251+
"searchDescription": "LangProvider - react component, designed to provide children with locale lang settings.",
252+
"searchTags": {
253+
"page": "page",
254+
"lang": "lang",
255+
"provider": "provider",
256+
"locale": "locale",
257+
"container": "container"
258+
},
259+
"props": {
260+
"lang": "lang extension, will be merged with main lang. To main lang will be added fields from provider lang if in main lang they are not defined.",
261+
"children": "Children of an element."
262+
},
263+
"css": {}
264+
},
265+
"LocaleAPI": {
266+
"searchDescription": "Locale - react component, designed to provide user with flexible locale access.",
267+
"searchTags": {
268+
"locale": "locale",
269+
"lang": "lang"
270+
},
271+
"props": {
272+
"path": "Path to the data in the Lang.locale. Exampele: \"hello/darkness/my\".",
273+
"children": "Children of an element. Will be displayed by default if can not load data from Lang."
274+
},
275+
"css": {}
276+
},
277+
"LinkAPI": {
278+
"searchDescription": "Link - react component, designed to create links to outside resource or inner docs page.",
279+
"searchTags": {
280+
"link": "link",
281+
"page": "page",
282+
"href": "href",
283+
"redirect": "redirect"
284+
},
285+
"props": {
286+
"page": "Page route. Can be passed as string or as array of routes.",
287+
"href": "Link to external resource.",
288+
"children": "Children of an element. Will be displayed by default if can not load data from Lang."
289+
},
290+
"css": {
291+
"root": "Styles applied to the root element."
292+
}
293+
},
232294
"ImageAPI": {
233295
"searchDescription": "Image - react component, designed to show images. Image component uses lazy load technology.",
234296
"searchTags": {
@@ -242,8 +304,10 @@
242304
},
243305
"props": {
244306
"src": "Source link. Used to define image path.",
307+
"placeholderSrc": "Src of low quality image, which will be displayed while main image is loading.",
245308
"alt": "Alternative text. Will be displayed if image can not load.",
246309
"fullWidth": "If true - image will be 100 percent wide.",
310+
"frame": "If true, image will be placed inside decorative border frame.",
247311
"children": "Elements, which will appear in image caption."
248312
},
249313
"css": {
@@ -288,6 +352,8 @@
288352
"collapsedHeight": "Height of the component when it is collapsed.",
289353
"actions": "Array of additional actions. The actions will be displayed in the dropdown menu when you click the ExpandMore icon button.",
290354
"theme": "Code highlighting and background styling type.",
355+
"themeLight": "Code highlighting and background styling type when global theme in light mode.",
356+
"themeDark": "Code highlighting and background styling type when global theme in dark mode.",
291357
"language": "Language name for code highlighter.",
292358
"children": "Code to display in code highlighter. This code will appear in the Code block if component is expanded."
293359
},
@@ -699,6 +765,8 @@
699765
"name": "Name of the docs. Needs for metadata. Will be displayed in app header. Also you can find this name near version label in side menu drawer.",
700766
"version": "Version of the docs. Needs for metadata.",
701767
"logo": "A path to the logo image, will be displayed in drawer near name and version.",
768+
"onNameClick": "Callback, designed to handle click on docs name in drawer badge.",
769+
"onVersionClick": "Callback, designed to handle click on docs version in drawer badge.",
702770
"children": "Children of an element. Normally DocsMenu and DocsPages."
703771
},
704772
"forwardRef": true,

src/pages/APIs/AutoDocsMenuAPI/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function AutoDocsMenuAPI() {
1717
return (
1818
<ApiPage
1919
name={"AutoDocsMenu"}
20-
overrideName={"MatDoc-AutoDocsMenu"}
20+
overrideName={"MaterialDocs-AutoDocsMenu"}
2121
localeName={"AutoDocsMenuAPI"}
2222
importCode={importCode}
2323
properties={[

src/pages/APIs/BlockAPI/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function BlockAPI() {
1616
return (
1717
<ApiPage
1818
name={"Block"}
19-
overrideName={"MatDoc-Block"}
19+
overrideName={"MaterialDocs-Block"}
2020
localeName={"BlockAPI"}
2121
searchTags={["block", "tip", "slided", "separated", "blockquote", "quote"]}
2222
importCode={importCode}
@@ -25,9 +25,9 @@ export default function BlockAPI() {
2525
{name: "children", type: "node", default: "", description: locale.props.children},
2626
]}
2727
css={[
28-
{name: "root", global: "MatDoc-root", description: locale.css.root},
29-
{name: "colorLight", global: "MatDoc-colorLight", description: locale.css.colorLight},
30-
{name: "colorDark", global: "MatDoc-colorDark", description: locale.css.colorDark},
28+
{name: "root", global: "MaterialDocs-root", description: locale.css.root},
29+
{name: "colorLight", global: "MaterialDocs-colorLight", description: locale.css.colorLight},
30+
{name: "colorDark", global: "MaterialDocs-colorDark", description: locale.css.colorDark},
3131
]}
3232
>
3333
<H2>Demos</H2>

src/pages/APIs/BoldAPI/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ export default function BoldAPI() {
1818
return (
1919
<ApiPage
2020
name={"Bold"}
21-
overrideName={"MatDoc-Bold"}
21+
overrideName={"MaterialDocs-Bold"}
2222
localeName={"BoldAPI"}
2323
importCode={importCode}
2424
properties={[
25-
{name: "chidlren", type: "node", default: "", description: locale.props.children},
25+
{name: "children", type: "node", default: "", description: locale.props.children},
2626
]}
2727
css={[
28-
{name: "root", global: "MatDocs-root", description: locale.css.root},
29-
{name: "bold", global: "MatDocs-bold", description: locale.css.bold},
28+
{name: "root", global: "MaterialDocss-root", description: locale.css.root},
29+
{name: "bold", global: "MaterialDocss-bold", description: locale.css.bold},
3030
]}
3131
>
3232
<H2>Demos</H2>

src/pages/APIs/CodeAPI/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ export default function CodeAPI() {
1818
<ApiPage
1919
name={"Code"}
2020
localeName={"CodeAPI"}
21-
overrideName={"MatDocs-Code"}
21+
overrideName={"MaterialDocss-Code"}
2222
importCode={importCode}
2323
properties={[
2424
{name: "language", type: "string", default: "\"javascript\"", description: locale.props.language},
25-
{name: "theme", type: "\"light\" | \"dark\" | \"darcula\"", default: "\"light\"", description: locale.props.theme},
25+
{name: "theme", type: "\"light\" | \"dark\" | \"darcula\"", default: "", description: locale.props.theme},
26+
{name: "themeLight", type: "\"light\" | \"dark\" | \"darcula\"", default: "\"light\"", description: locale.props.themeLight},
27+
{name: "themeDark", type: "\"light\" | \"dark\" | \"darcula\"", default: "\"dark\"", description: locale.props.themeDark},
2628
{name: "children", type: "string", default: "", description: locale.props.children},
2729
]}
2830
css={[
29-
{name: "root", global: "MatDoc-root", description: locale.css.root},
30-
{name: "highlighterContainer", global: "MatDoc-highlighterContainer", description: locale.css.highlighterContainer},
31+
{name: "root", global: "MaterialDocs-root", description: locale.css.root},
32+
{name: "highlighterContainer", global: "MaterialDocs-highlighterContainer", description: locale.css.highlighterContainer},
3133
]}
3234
>
3335
<H2>Demos</H2>

src/pages/APIs/CodeSpanAPI/index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function CodeSpanAPI() {
1818
return (
1919
<ApiPage
2020
name={"CodeSpan"}
21-
overrideName={"MatDoc-CodeSpan"}
21+
overrideName={"MaterialDocs-CodeSpan"}
2222
localeName={"CodeSpanAPI"}
2323
importCode={importCode}
2424
properties={[
@@ -27,15 +27,15 @@ export default function CodeSpanAPI() {
2727
{name: "children", type: "node", default: "", description: locale.props.children},
2828
]}
2929
css={[
30-
{name: "root", global: "MatDoc-root", description: locale.css.root},
31-
{name: "colorDefault", global: "MatDoc-colorDefault", description: locale.css.colorDefault},
32-
{name: "colorPrimary", global: "MatDoc-colorPrimary", description: locale.css.colorPrimary},
33-
{name: "colorSecondary", global: "MatDoc-colorSecondary", description: locale.css.colorSecondary},
34-
{name: "colorGrey", global: "MatDoc-colorGrey", description: locale.css.colorGrey},
35-
{name: "font", global: "MatDoc-font", description: locale.css.font},
36-
{name: "textInherit", global: "MatDoc-textInherit", description: locale.css.textInherit},
37-
{name: "textWhite", global: "MatDoc-textWhite", description: locale.css.textWhite},
38-
{name: "textBlack", global: "MatDoc-textBlack", description: locale.css.textBlack},
30+
{name: "root", global: "MaterialDocs-root", description: locale.css.root},
31+
{name: "colorDefault", global: "MaterialDocs-colorDefault", description: locale.css.colorDefault},
32+
{name: "colorPrimary", global: "MaterialDocs-colorPrimary", description: locale.css.colorPrimary},
33+
{name: "colorSecondary", global: "MaterialDocs-colorSecondary", description: locale.css.colorSecondary},
34+
{name: "colorGrey", global: "MaterialDocs-colorGrey", description: locale.css.colorGrey},
35+
{name: "font", global: "MaterialDocs-font", description: locale.css.font},
36+
{name: "textInherit", global: "MaterialDocs-textInherit", description: locale.css.textInherit},
37+
{name: "textWhite", global: "MaterialDocs-textWhite", description: locale.css.textWhite},
38+
{name: "textBlack", global: "MaterialDocs-textBlack", description: locale.css.textBlack},
3939
]}
4040
>
4141
<H2>Demos</H2>

src/pages/APIs/DemoWithCodeAPI/index.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function DemoWithCodeAPI() {
1818
return (
1919
<ApiPage
2020
name={"DemoWithCode"}
21-
overrideName={"MatDoc-DemoWithCode"}
21+
overrideName={"MaterialDocs-DemoWithCode"}
2222
localeName={"DemoWithCodeAPI"}
2323
importCode={importCode}
2424
properties={[
@@ -32,14 +32,17 @@ export default function DemoWithCodeAPI() {
3232
{name: "p", type: "number", default: "0", description: locale.props.p},
3333
{name: "m", type: "number", default: "0", description: locale.props.m},
3434
{name: "children", type: "node", default: "", description: locale.props.children},
35+
{name: "theme", type: "\"light\" | \"dark\" | \"darcula\"", default: "", description: locale.props.theme},
36+
{name: "themeLight", type: "\"light\" | \"dark\" | \"darcula\"", default: "\"light\"", description: locale.props.themeLight},
37+
{name: "themeDark", type: "\"light\" | \"dark\" | \"darcula\"", default: "\"dark\"", description: locale.props.themeDark},
3538
]}
3639
css={[
37-
{name: "root", global: "MatDoc-root", description: locale.css.root},
38-
{name: "collapse", global: "MatDoc-collapse", description: locale.css.collapse},
39-
{name: "toolbar", global: "MatDoc-toolbar", description: locale.css.toolbar},
40-
{name: "paperContainer", global: "MatDoc-paperContainer", description: locale.css.paperContainer},
41-
{name: "menuButtonLink", global: "MatDoc-menuButtonLink", description: locale.css.menuButtonLink},
42-
{name: "demo", global: "MatDoc-demo", description: locale.css.demo},
40+
{name: "root", global: "MaterialDocs-root", description: locale.css.root},
41+
{name: "collapse", global: "MaterialDocs-collapse", description: locale.css.collapse},
42+
{name: "toolbar", global: "MaterialDocs-toolbar", description: locale.css.toolbar},
43+
{name: "paperContainer", global: "MaterialDocs-paperContainer", description: locale.css.paperContainer},
44+
{name: "menuButtonLink", global: "MaterialDocs-menuButtonLink", description: locale.css.menuButtonLink},
45+
{name: "demo", global: "MaterialDocs-demo", description: locale.css.demo},
4346
]}
4447
>
4548
<H2>Demos</H2>

0 commit comments

Comments
 (0)