box-ui-elements 16.1.0-beta.20 → 16.1.0-beta.21
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.
- package/es/components/inline-error/InlineError.stories.js +12 -0
- package/es/components/inline-error/InlineError.stories.js.flow +9 -0
- package/es/components/inline-error/InlineError.stories.js.map +1 -0
- package/es/components/inline-notice/InlineNotice.stories.js +42 -0
- package/es/components/inline-notice/InlineNotice.stories.js.flow +59 -0
- package/es/components/inline-notice/InlineNotice.stories.js.map +1 -0
- package/es/components/nav-sidebar/NavSidebar.stories.js +37 -0
- package/es/components/nav-sidebar/NavSidebar.stories.js.flow +54 -0
- package/es/components/nav-sidebar/NavSidebar.stories.js.map +1 -0
- package/es/src/styles/typography.stories.d.ts +8 -0
- package/es/styles/typography.stories.js +55 -0
- package/es/styles/typography.stories.js.map +1 -0
- package/es/styles/typography.stories.scss +60 -0
- package/i18n/ko-KR.js +1 -1
- package/i18n/ko-KR.properties +1 -1
- package/i18n/ru-RU.js +1 -1
- package/i18n/ru-RU.properties +1 -1
- package/i18n/zh-CN.js +1 -1
- package/i18n/zh-CN.properties +1 -1
- package/package.json +1 -1
- package/src/components/inline-error/InlineError.stories.js +9 -0
- package/src/components/inline-error/InlineError.stories.md +3 -0
- package/src/components/inline-notice/InlineNotice.stories.js +59 -0
- package/src/components/inline-notice/InlineNotice.stories.md +1 -0
- package/src/components/nav-sidebar/NavSidebar.stories.js +54 -0
- package/src/components/nav-sidebar/NavSidebar.stories.md +1 -0
- package/src/styles/typography.stories.scss +60 -0
- package/src/styles/typography.stories.tsx +70 -0
- package/src/components/inline-error/README.md +0 -10
- package/src/components/inline-notice/README.md +0 -57
- package/src/components/nav-sidebar/README.md +0 -57
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import InlineError from './InlineError';
|
|
3
|
+
export var regular = function regular() {
|
|
4
|
+
return React.createElement(InlineError, {
|
|
5
|
+
title: "Something bad happened"
|
|
6
|
+
}, "Username is required");
|
|
7
|
+
};
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components|InlineError',
|
|
10
|
+
component: InlineError
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=InlineError.stories.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import InlineError from './InlineError';
|
|
3
|
+
|
|
4
|
+
export const regular = () => <InlineError title="Something bad happened">Username is required</InlineError>;
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components|InlineError',
|
|
8
|
+
component: InlineError,
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/inline-error/InlineError.stories.js"],"names":["React","InlineError","regular","title","component"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAEA,OAAO,IAAMC,OAAO,GAAG,SAAVA,OAAU;AAAA,SAAM,oBAAC,WAAD;AAAa,IAAA,KAAK,EAAC;AAAnB,4BAAN;AAAA,CAAhB;AAEP,eAAe;AACXC,EAAAA,KAAK,EAAE,wBADI;AAEXC,EAAAA,SAAS,EAAEH;AAFA,CAAf","sourcesContent":["import * as React from 'react';\nimport InlineError from './InlineError';\n\nexport const regular = () => <InlineError title=\"Something bad happened\">Username is required</InlineError>;\n\nexport default {\n title: 'Components|InlineError',\n component: InlineError,\n};\n"],"file":"InlineError.stories.js"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import InlineNotice from './InlineNotice';
|
|
3
|
+
import notes from './InlineNotice.stories.md';
|
|
4
|
+
export var withoutTitle = function withoutTitle() {
|
|
5
|
+
return React.createElement("div", null, React.createElement(InlineNotice, {
|
|
6
|
+
type: "warning"
|
|
7
|
+
}, "This is a ", React.createElement("strong", null, "warning"), " notice. You might want to pay attention to this."), React.createElement(InlineNotice, {
|
|
8
|
+
type: "error"
|
|
9
|
+
}, "This is an ", React.createElement("strong", null, "error"), " notice. You really want to pay attention to this."), React.createElement(InlineNotice, {
|
|
10
|
+
type: "success"
|
|
11
|
+
}, "This is a ", React.createElement("strong", null, "success"), " notice. You ought to feel really good about this."), React.createElement(InlineNotice, {
|
|
12
|
+
type: "info"
|
|
13
|
+
}, "This is an ", React.createElement("strong", null, "info"), " notice. You should get some context from this."), React.createElement(InlineNotice, {
|
|
14
|
+
type: "generic"
|
|
15
|
+
}, "This is an ", React.createElement("strong", null, "generic"), " notice. You will just want to see this."));
|
|
16
|
+
};
|
|
17
|
+
export var withTitle = function withTitle() {
|
|
18
|
+
return React.createElement("div", null, React.createElement(InlineNotice, {
|
|
19
|
+
type: "warning",
|
|
20
|
+
title: "Warning Title"
|
|
21
|
+
}, "This is a warning notice. You might want to pay attention to this."), React.createElement(InlineNotice, {
|
|
22
|
+
type: "error",
|
|
23
|
+
title: "Error Title"
|
|
24
|
+
}, "This is an error notice. You really want to pay attention to this."), React.createElement(InlineNotice, {
|
|
25
|
+
type: "success",
|
|
26
|
+
title: "Success Title"
|
|
27
|
+
}, "This is a success notice. You ought to feel really good about this."), React.createElement(InlineNotice, {
|
|
28
|
+
type: "info",
|
|
29
|
+
title: "Info Title"
|
|
30
|
+
}, "This is an info notice. You should get some context from this."), React.createElement(InlineNotice, {
|
|
31
|
+
type: "generic",
|
|
32
|
+
title: "Generic Title"
|
|
33
|
+
}, "This is a generic notice. You will just want to notice this."));
|
|
34
|
+
};
|
|
35
|
+
export default {
|
|
36
|
+
title: 'Components|InlineNotice',
|
|
37
|
+
component: InlineNotice,
|
|
38
|
+
parameters: {
|
|
39
|
+
notes: notes
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=InlineNotice.stories.js.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import InlineNotice from './InlineNotice';
|
|
3
|
+
import notes from './InlineNotice.stories.md';
|
|
4
|
+
|
|
5
|
+
export const withoutTitle = () => (
|
|
6
|
+
<div>
|
|
7
|
+
<InlineNotice type="warning">
|
|
8
|
+
This is a <strong>warning</strong> notice. You might want to pay attention to this.
|
|
9
|
+
</InlineNotice>
|
|
10
|
+
|
|
11
|
+
<InlineNotice type="error">
|
|
12
|
+
This is an <strong>error</strong> notice. You really want to pay attention to this.
|
|
13
|
+
</InlineNotice>
|
|
14
|
+
|
|
15
|
+
<InlineNotice type="success">
|
|
16
|
+
This is a <strong>success</strong> notice. You ought to feel really good about this.
|
|
17
|
+
</InlineNotice>
|
|
18
|
+
|
|
19
|
+
<InlineNotice type="info">
|
|
20
|
+
This is an <strong>info</strong> notice. You should get some context from this.
|
|
21
|
+
</InlineNotice>
|
|
22
|
+
|
|
23
|
+
<InlineNotice type="generic">
|
|
24
|
+
This is an <strong>generic</strong> notice. You will just want to see this.
|
|
25
|
+
</InlineNotice>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const withTitle = () => (
|
|
30
|
+
<div>
|
|
31
|
+
<InlineNotice type="warning" title="Warning Title">
|
|
32
|
+
This is a warning notice. You might want to pay attention to this.
|
|
33
|
+
</InlineNotice>
|
|
34
|
+
|
|
35
|
+
<InlineNotice type="error" title="Error Title">
|
|
36
|
+
This is an error notice. You really want to pay attention to this.
|
|
37
|
+
</InlineNotice>
|
|
38
|
+
|
|
39
|
+
<InlineNotice type="success" title="Success Title">
|
|
40
|
+
This is a success notice. You ought to feel really good about this.
|
|
41
|
+
</InlineNotice>
|
|
42
|
+
|
|
43
|
+
<InlineNotice type="info" title="Info Title">
|
|
44
|
+
This is an info notice. You should get some context from this.
|
|
45
|
+
</InlineNotice>
|
|
46
|
+
|
|
47
|
+
<InlineNotice type="generic" title="Generic Title">
|
|
48
|
+
This is a generic notice. You will just want to notice this.
|
|
49
|
+
</InlineNotice>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
title: 'Components|InlineNotice',
|
|
55
|
+
component: InlineNotice,
|
|
56
|
+
parameters: {
|
|
57
|
+
notes,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/inline-notice/InlineNotice.stories.js"],"names":["React","InlineNotice","notes","withoutTitle","withTitle","title","component","parameters"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,KAAP,MAAkB,2BAAlB;AAEA,OAAO,IAAMC,YAAY,GAAG,SAAfA,YAAe;AAAA,SACxB,iCACI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC;AAAnB,mBACc,8CADd,sDADJ,EAKI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC;AAAnB,oBACe,4CADf,uDALJ,EASI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC;AAAnB,mBACc,8CADd,uDATJ,EAaI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC;AAAnB,oBACe,2CADf,oDAbJ,EAiBI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC;AAAnB,oBACe,8CADf,6CAjBJ,CADwB;AAAA,CAArB;AAwBP,OAAO,IAAMC,SAAS,GAAG,SAAZA,SAAY;AAAA,SACrB,iCACI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC,SAAnB;AAA6B,IAAA,KAAK,EAAC;AAAnC,0EADJ,EAKI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC,OAAnB;AAA2B,IAAA,KAAK,EAAC;AAAjC,0EALJ,EASI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC,SAAnB;AAA6B,IAAA,KAAK,EAAC;AAAnC,2EATJ,EAaI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC,MAAnB;AAA0B,IAAA,KAAK,EAAC;AAAhC,sEAbJ,EAiBI,oBAAC,YAAD;AAAc,IAAA,IAAI,EAAC,SAAnB;AAA6B,IAAA,KAAK,EAAC;AAAnC,oEAjBJ,CADqB;AAAA,CAAlB;AAwBP,eAAe;AACXC,EAAAA,KAAK,EAAE,yBADI;AAEXC,EAAAA,SAAS,EAAEL,YAFA;AAGXM,EAAAA,UAAU,EAAE;AACRL,IAAAA,KAAK,EAALA;AADQ;AAHD,CAAf","sourcesContent":["import * as React from 'react';\nimport InlineNotice from './InlineNotice';\nimport notes from './InlineNotice.stories.md';\n\nexport const withoutTitle = () => (\n <div>\n <InlineNotice type=\"warning\">\n This is a <strong>warning</strong> notice. You might want to pay attention to this.\n </InlineNotice>\n\n <InlineNotice type=\"error\">\n This is an <strong>error</strong> notice. You really want to pay attention to this.\n </InlineNotice>\n\n <InlineNotice type=\"success\">\n This is a <strong>success</strong> notice. You ought to feel really good about this.\n </InlineNotice>\n\n <InlineNotice type=\"info\">\n This is an <strong>info</strong> notice. You should get some context from this.\n </InlineNotice>\n\n <InlineNotice type=\"generic\">\n This is an <strong>generic</strong> notice. You will just want to see this.\n </InlineNotice>\n </div>\n);\n\nexport const withTitle = () => (\n <div>\n <InlineNotice type=\"warning\" title=\"Warning Title\">\n This is a warning notice. You might want to pay attention to this.\n </InlineNotice>\n\n <InlineNotice type=\"error\" title=\"Error Title\">\n This is an error notice. You really want to pay attention to this.\n </InlineNotice>\n\n <InlineNotice type=\"success\" title=\"Success Title\">\n This is a success notice. You ought to feel really good about this.\n </InlineNotice>\n\n <InlineNotice type=\"info\" title=\"Info Title\">\n This is an info notice. You should get some context from this.\n </InlineNotice>\n\n <InlineNotice type=\"generic\" title=\"Generic Title\">\n This is a generic notice. You will just want to notice this.\n </InlineNotice>\n </div>\n);\n\nexport default {\n title: 'Components|InlineNotice',\n component: InlineNotice,\n parameters: {\n notes,\n },\n};\n"],"file":"InlineNotice.stories.js"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { boolean } from '@storybook/addon-knobs';
|
|
5
|
+
import NavSidebar from './NavSidebar';
|
|
6
|
+
import NavListCollapseHeader from './NavListCollapseHeader';
|
|
7
|
+
import NavList from './NavList';
|
|
8
|
+
import Link from '../link/Link';
|
|
9
|
+
import notes from './NavSidebar.stories.md';
|
|
10
|
+
export var notCollapsible = function notCollapsible() {
|
|
11
|
+
return React.createElement(NavSidebar, {
|
|
12
|
+
"data-resin-component": "leftnav"
|
|
13
|
+
}, React.createElement(NavList, null, React.createElement(Link, null, "Item 1-1"), React.createElement(Link, null, "Item 1-2")), React.createElement(NavList, {
|
|
14
|
+
heading: "Item 2"
|
|
15
|
+
}, React.createElement(Link, null, "Item 2-1"), React.createElement(Link, null, "Item 2-2"), React.createElement(Link, null, "Item 2-3")));
|
|
16
|
+
};
|
|
17
|
+
export var collapsible = function collapsible() {
|
|
18
|
+
return React.createElement(NavSidebar, {
|
|
19
|
+
"data-resin-component": "leftnav"
|
|
20
|
+
}, React.createElement(NavList, {
|
|
21
|
+
heading: React.createElement(NavListCollapseHeader, {
|
|
22
|
+
onToggleCollapse: action('onToggleCollapse called')
|
|
23
|
+
}, "Collapse or Expand"),
|
|
24
|
+
className: "is-collapsible",
|
|
25
|
+
collapsed: boolean('collapsed', false)
|
|
26
|
+
}, React.createElement(Link, null, "Item 1-1"), React.createElement(Link, null, "Item 1-2")), React.createElement(NavList, {
|
|
27
|
+
heading: "Item 2"
|
|
28
|
+
}, React.createElement(Link, null, "Item 2-1"), React.createElement(Link, null, "Item 2-2"), React.createElement(Link, null, "Item 2-3")));
|
|
29
|
+
};
|
|
30
|
+
export default {
|
|
31
|
+
title: 'Components|NavSidebar',
|
|
32
|
+
component: NavSidebar,
|
|
33
|
+
parameters: {
|
|
34
|
+
notes: notes
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=NavSidebar.stories.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { boolean } from '@storybook/addon-knobs';
|
|
5
|
+
import NavSidebar from './NavSidebar';
|
|
6
|
+
import NavListCollapseHeader from './NavListCollapseHeader';
|
|
7
|
+
import NavList from './NavList';
|
|
8
|
+
import Link from '../link/Link';
|
|
9
|
+
|
|
10
|
+
import notes from './NavSidebar.stories.md';
|
|
11
|
+
|
|
12
|
+
export const notCollapsible = () => (
|
|
13
|
+
<NavSidebar data-resin-component="leftnav">
|
|
14
|
+
<NavList>
|
|
15
|
+
<Link>Item 1-1</Link>
|
|
16
|
+
<Link>Item 1-2</Link>
|
|
17
|
+
</NavList>
|
|
18
|
+
<NavList heading="Item 2">
|
|
19
|
+
<Link>Item 2-1</Link>
|
|
20
|
+
<Link>Item 2-2</Link>
|
|
21
|
+
<Link>Item 2-3</Link>
|
|
22
|
+
</NavList>
|
|
23
|
+
</NavSidebar>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const collapsible = () => (
|
|
27
|
+
<NavSidebar data-resin-component="leftnav">
|
|
28
|
+
<NavList
|
|
29
|
+
heading={
|
|
30
|
+
<NavListCollapseHeader onToggleCollapse={action('onToggleCollapse called')}>
|
|
31
|
+
Collapse or Expand
|
|
32
|
+
</NavListCollapseHeader>
|
|
33
|
+
}
|
|
34
|
+
className="is-collapsible"
|
|
35
|
+
collapsed={boolean('collapsed', false)}
|
|
36
|
+
>
|
|
37
|
+
<Link>Item 1-1</Link>
|
|
38
|
+
<Link>Item 1-2</Link>
|
|
39
|
+
</NavList>
|
|
40
|
+
<NavList heading="Item 2">
|
|
41
|
+
<Link>Item 2-1</Link>
|
|
42
|
+
<Link>Item 2-2</Link>
|
|
43
|
+
<Link>Item 2-3</Link>
|
|
44
|
+
</NavList>
|
|
45
|
+
</NavSidebar>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
title: 'Components|NavSidebar',
|
|
50
|
+
component: NavSidebar,
|
|
51
|
+
parameters: {
|
|
52
|
+
notes,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/nav-sidebar/NavSidebar.stories.js"],"names":["React","action","boolean","NavSidebar","NavListCollapseHeader","NavList","Link","notes","notCollapsible","collapsible","title","component","parameters"],"mappings":"AAAA;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,MAAT,QAAuB,0BAAvB;AACA,SAASC,OAAT,QAAwB,wBAAxB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,qBAAP,MAAkC,yBAAlC;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,IAAP,MAAiB,cAAjB;AAEA,OAAOC,KAAP,MAAkB,yBAAlB;AAEA,OAAO,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAC1B,oBAAC,UAAD;AAAY,4BAAqB;AAAjC,KACI,oBAAC,OAAD,QACI,oBAAC,IAAD,mBADJ,EAEI,oBAAC,IAAD,mBAFJ,CADJ,EAKI,oBAAC,OAAD;AAAS,IAAA,OAAO,EAAC;AAAjB,KACI,oBAAC,IAAD,mBADJ,EAEI,oBAAC,IAAD,mBAFJ,EAGI,oBAAC,IAAD,mBAHJ,CALJ,CAD0B;AAAA,CAAvB;AAcP,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAc;AAAA,SACvB,oBAAC,UAAD;AAAY,4BAAqB;AAAjC,KACI,oBAAC,OAAD;AACI,IAAA,OAAO,EACH,oBAAC,qBAAD;AAAuB,MAAA,gBAAgB,EAAER,MAAM,CAAC,yBAAD;AAA/C,4BAFR;AAMI,IAAA,SAAS,EAAC,gBANd;AAOI,IAAA,SAAS,EAAEC,OAAO,CAAC,WAAD,EAAc,KAAd;AAPtB,KASI,oBAAC,IAAD,mBATJ,EAUI,oBAAC,IAAD,mBAVJ,CADJ,EAaI,oBAAC,OAAD;AAAS,IAAA,OAAO,EAAC;AAAjB,KACI,oBAAC,IAAD,mBADJ,EAEI,oBAAC,IAAD,mBAFJ,EAGI,oBAAC,IAAD,mBAHJ,CAbJ,CADuB;AAAA,CAApB;AAsBP,eAAe;AACXQ,EAAAA,KAAK,EAAE,uBADI;AAEXC,EAAAA,SAAS,EAAER,UAFA;AAGXS,EAAAA,UAAU,EAAE;AACRL,IAAAA,KAAK,EAALA;AADQ;AAHD,CAAf","sourcesContent":["/* eslint-disable */\nimport * as React from 'react';\nimport { action } from '@storybook/addon-actions';\nimport { boolean } from '@storybook/addon-knobs';\nimport NavSidebar from './NavSidebar';\nimport NavListCollapseHeader from './NavListCollapseHeader';\nimport NavList from './NavList';\nimport Link from '../link/Link';\n\nimport notes from './NavSidebar.stories.md';\n\nexport const notCollapsible = () => (\n <NavSidebar data-resin-component=\"leftnav\">\n <NavList>\n <Link>Item 1-1</Link>\n <Link>Item 1-2</Link>\n </NavList>\n <NavList heading=\"Item 2\">\n <Link>Item 2-1</Link>\n <Link>Item 2-2</Link>\n <Link>Item 2-3</Link>\n </NavList>\n </NavSidebar>\n);\n\nexport const collapsible = () => (\n <NavSidebar data-resin-component=\"leftnav\">\n <NavList\n heading={\n <NavListCollapseHeader onToggleCollapse={action('onToggleCollapse called')}>\n Collapse or Expand\n </NavListCollapseHeader>\n }\n className=\"is-collapsible\"\n collapsed={boolean('collapsed', false)}\n >\n <Link>Item 1-1</Link>\n <Link>Item 1-2</Link>\n </NavList>\n <NavList heading=\"Item 2\">\n <Link>Item 2-1</Link>\n <Link>Item 2-2</Link>\n <Link>Item 2-3</Link>\n </NavList>\n </NavSidebar>\n);\n\nexport default {\n title: 'Components|NavSidebar',\n component: NavSidebar,\n parameters: {\n notes,\n },\n};\n"],"file":"NavSidebar.stories.js"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './typography.stories.scss';
|
|
3
|
+
export var lato = function lato() {
|
|
4
|
+
return React.createElement("div", {
|
|
5
|
+
className: "typography"
|
|
6
|
+
}, React.createElement("div", {
|
|
7
|
+
className: "heading"
|
|
8
|
+
}, React.createElement("h1", null, "Lato 2.0")), React.createElement("div", {
|
|
9
|
+
className: "weights"
|
|
10
|
+
}, React.createElement("div", {
|
|
11
|
+
className: "regular"
|
|
12
|
+
}, React.createElement("div", {
|
|
13
|
+
className: "preview"
|
|
14
|
+
}, "Aa"), React.createElement("div", {
|
|
15
|
+
className: "weight"
|
|
16
|
+
}, "Regular")), React.createElement("div", {
|
|
17
|
+
className: "bold"
|
|
18
|
+
}, React.createElement("div", {
|
|
19
|
+
className: "preview"
|
|
20
|
+
}, "Aa"), React.createElement("div", {
|
|
21
|
+
className: "weight"
|
|
22
|
+
}, "Bold"))));
|
|
23
|
+
};
|
|
24
|
+
export var heading = function heading() {
|
|
25
|
+
return React.createElement("div", {
|
|
26
|
+
className: "typography"
|
|
27
|
+
}, React.createElement("div", {
|
|
28
|
+
className: "heading"
|
|
29
|
+
}, React.createElement("label", null, "H1"), React.createElement("h1", null, "Project Symphony")), React.createElement("div", {
|
|
30
|
+
className: "heading"
|
|
31
|
+
}, React.createElement("label", null, "H2"), React.createElement("h2", null, "Project Symphony")), React.createElement("div", {
|
|
32
|
+
className: "heading"
|
|
33
|
+
}, React.createElement("label", null, "H3"), React.createElement("h3", null, "Project Symphony")), React.createElement("div", {
|
|
34
|
+
className: "heading"
|
|
35
|
+
}, React.createElement("label", null, "H4"), React.createElement("h4", null, "Project Symphony")), React.createElement("div", {
|
|
36
|
+
className: "heading"
|
|
37
|
+
}, React.createElement("label", null, "H5"), React.createElement("h5", null, "Project Symphony")), React.createElement("div", {
|
|
38
|
+
className: "heading"
|
|
39
|
+
}, React.createElement("label", null, "H6"), React.createElement("h6", null, "Project Symphony")));
|
|
40
|
+
};
|
|
41
|
+
export var text = function text() {
|
|
42
|
+
return React.createElement("div", {
|
|
43
|
+
className: "typography"
|
|
44
|
+
}, React.createElement("div", null, React.createElement("label", null, "BODY"), React.createElement("span", {
|
|
45
|
+
className: "body"
|
|
46
|
+
}, "Project Symphony")), React.createElement("div", null, React.createElement("label", null, "INPUT LABEL"), React.createElement("span", {
|
|
47
|
+
className: "input-label"
|
|
48
|
+
}, "Project Symphony")), React.createElement("div", null, React.createElement("label", null, "INPUT TEXT"), React.createElement("span", {
|
|
49
|
+
className: "input-text"
|
|
50
|
+
}, "Project Symphony")));
|
|
51
|
+
};
|
|
52
|
+
export default {
|
|
53
|
+
title: 'Theming|Typography'
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=typography.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/styles/typography.stories.tsx"],"names":["React","lato","heading","text","title"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAO,2BAAP;AAEA,OAAO,IAAMC,IAAI,GAAG,SAAPA,IAAO;AAAA,SAChB;AAAK,IAAA,SAAS,EAAC;AAAf,KACI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI,2CADJ,CADJ,EAII;AAAK,IAAA,SAAS,EAAC;AAAf,KACI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI;AAAK,IAAA,SAAS,EAAC;AAAf,UADJ,EAEI;AAAK,IAAA,SAAS,EAAC;AAAf,eAFJ,CADJ,EAKI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI;AAAK,IAAA,SAAS,EAAC;AAAf,UADJ,EAEI;AAAK,IAAA,SAAS,EAAC;AAAf,YAFJ,CALJ,CAJJ,CADgB;AAAA,CAAb;AAkBP,OAAO,IAAMC,OAAO,GAAG,SAAVA,OAAU;AAAA,SACnB;AAAK,IAAA,SAAS,EAAC;AAAf,KACI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI,wCADJ,EAEI,mDAFJ,CADJ,EAKI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI,wCADJ,EAEI,mDAFJ,CALJ,EASI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI,wCADJ,EAEI,mDAFJ,CATJ,EAaI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI,wCADJ,EAEI,mDAFJ,CAbJ,EAiBI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI,wCADJ,EAEI,mDAFJ,CAjBJ,EAqBI;AAAK,IAAA,SAAS,EAAC;AAAf,KACI,wCADJ,EAEI,mDAFJ,CArBJ,CADmB;AAAA,CAAhB;AA6BP,OAAO,IAAMC,IAAI,GAAG,SAAPA,IAAO;AAAA,SAChB;AAAK,IAAA,SAAS,EAAC;AAAf,KACI,iCACI,0CADJ,EAEI;AAAM,IAAA,SAAS,EAAC;AAAhB,wBAFJ,CADJ,EAKI,iCACI,iDADJ,EAEI;AAAM,IAAA,SAAS,EAAC;AAAhB,wBAFJ,CALJ,EASI,iCACI,gDADJ,EAEI;AAAM,IAAA,SAAS,EAAC;AAAhB,wBAFJ,CATJ,CADgB;AAAA,CAAb;AAiBP,eAAe;AACXC,EAAAA,KAAK,EAAE;AADI,CAAf","sourcesContent":["import * as React from 'react';\nimport './typography.stories.scss';\n\nexport const lato = () => (\n <div className=\"typography\">\n <div className=\"heading\">\n <h1>Lato 2.0</h1>\n </div>\n <div className=\"weights\">\n <div className=\"regular\">\n <div className=\"preview\">Aa</div>\n <div className=\"weight\">Regular</div>\n </div>\n <div className=\"bold\">\n <div className=\"preview\">Aa</div>\n <div className=\"weight\">Bold</div>\n </div>\n </div>\n </div>\n);\n\nexport const heading = () => (\n <div className=\"typography\">\n <div className=\"heading\">\n <label>H1</label>\n <h1>Project Symphony</h1>\n </div>\n <div className=\"heading\">\n <label>H2</label>\n <h2>Project Symphony</h2>\n </div>\n <div className=\"heading\">\n <label>H3</label>\n <h3>Project Symphony</h3>\n </div>\n <div className=\"heading\">\n <label>H4</label>\n <h4>Project Symphony</h4>\n </div>\n <div className=\"heading\">\n <label>H5</label>\n <h5>Project Symphony</h5>\n </div>\n <div className=\"heading\">\n <label>H6</label>\n <h6>Project Symphony</h6>\n </div>\n </div>\n);\n\nexport const text = () => (\n <div className=\"typography\">\n <div>\n <label>BODY</label>\n <span className=\"body\">Project Symphony</span>\n </div>\n <div>\n <label>INPUT LABEL</label>\n <span className=\"input-label\">Project Symphony</span>\n </div>\n <div>\n <label>INPUT TEXT</label>\n <span className=\"input-text\">Project Symphony</span>\n </div>\n </div>\n);\n\nexport default {\n title: 'Theming|Typography',\n};\n"],"file":"typography.stories.js"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@import './base';
|
|
2
|
+
|
|
3
|
+
.typography {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
margin-top: 25px;
|
|
8
|
+
|
|
9
|
+
.weights {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
margin-top: 20px;
|
|
13
|
+
color: $black;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.weights .preview {
|
|
17
|
+
font-size: 72px;
|
|
18
|
+
line-height: 72px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.weights .regular {
|
|
22
|
+
margin-right: 15px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.weights .bold .preview {
|
|
26
|
+
font-weight: bold;
|
|
27
|
+
font-family: 'Lato', sans-serif;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.font-container,
|
|
31
|
+
.headings-container {
|
|
32
|
+
width: 33%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.heading {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
line-height: 32px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
label {
|
|
42
|
+
margin-right: 10px;
|
|
43
|
+
color: $bdl-watermelon-red;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.form-font-container label {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
width: 80px;
|
|
49
|
+
line-height: 30px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.form-font-container .body,
|
|
53
|
+
.form-font-container .input-text {
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.form-font-container .input-label {
|
|
58
|
+
font-size: 13px;
|
|
59
|
+
}
|
|
60
|
+
}
|
package/i18n/ko-KR.js
CHANGED
|
@@ -97,7 +97,7 @@ export default {
|
|
|
97
97
|
"be.contentSidebar.activityFeed.commentForm.commentWrite": "코멘트 작성",
|
|
98
98
|
"be.contentSidebar.activityFeed.commmon.showOriginalMessage": "원본 표시",
|
|
99
99
|
"be.contentSidebar.activityFeed.common.activityStatusResolved": "해결됨",
|
|
100
|
-
"be.contentSidebar.activityFeed.common.editedMessage": "
|
|
100
|
+
"be.contentSidebar.activityFeed.common.editedMessage": "(편집됨)",
|
|
101
101
|
"be.contentSidebar.activityFeed.common.seeLessMessage": "간단히 보기",
|
|
102
102
|
"be.contentSidebar.activityFeed.common.seeMoreMessage": "더 보기",
|
|
103
103
|
"be.contentSidebar.activityFeed.common.translateMessage": "번역",
|
package/i18n/ko-KR.properties
CHANGED
|
@@ -195,7 +195,7 @@ be.contentSidebar.activityFeed.commmon.showOriginalMessage = 원본 표시
|
|
|
195
195
|
# Indicator of resolved status of Comment or Annotation, visible in Feed Item (in upper-case in supported language)
|
|
196
196
|
be.contentSidebar.activityFeed.common.activityStatusResolved = 해결됨
|
|
197
197
|
# Label indicating that message was edited, should be lowercase, should have escaped leading space
|
|
198
|
-
be.contentSidebar.activityFeed.common.editedMessage = \
|
|
198
|
+
be.contentSidebar.activityFeed.common.editedMessage = \(편집됨)
|
|
199
199
|
# See less button for hiding part of long message
|
|
200
200
|
be.contentSidebar.activityFeed.common.seeLessMessage = 간단히 보기
|
|
201
201
|
# See more button for showing whole long message
|
package/i18n/ru-RU.js
CHANGED
|
@@ -97,7 +97,7 @@ export default {
|
|
|
97
97
|
"be.contentSidebar.activityFeed.commentForm.commentWrite": "Оставьте комментарий",
|
|
98
98
|
"be.contentSidebar.activityFeed.commmon.showOriginalMessage": "Показать оригинал",
|
|
99
99
|
"be.contentSidebar.activityFeed.common.activityStatusResolved": "Решено",
|
|
100
|
-
"be.contentSidebar.activityFeed.common.editedMessage": "(изменено)",
|
|
100
|
+
"be.contentSidebar.activityFeed.common.editedMessage": " (изменено)",
|
|
101
101
|
"be.contentSidebar.activityFeed.common.seeLessMessage": "Показать меньше",
|
|
102
102
|
"be.contentSidebar.activityFeed.common.seeMoreMessage": "Показать больше",
|
|
103
103
|
"be.contentSidebar.activityFeed.common.translateMessage": "Перевести",
|
package/i18n/ru-RU.properties
CHANGED
|
@@ -195,7 +195,7 @@ be.contentSidebar.activityFeed.commmon.showOriginalMessage = Показать о
|
|
|
195
195
|
# Indicator of resolved status of Comment or Annotation, visible in Feed Item (in upper-case in supported language)
|
|
196
196
|
be.contentSidebar.activityFeed.common.activityStatusResolved = Решено
|
|
197
197
|
# Label indicating that message was edited, should be lowercase, should have escaped leading space
|
|
198
|
-
be.contentSidebar.activityFeed.common.editedMessage = (изменено)
|
|
198
|
+
be.contentSidebar.activityFeed.common.editedMessage = \ (изменено)
|
|
199
199
|
# See less button for hiding part of long message
|
|
200
200
|
be.contentSidebar.activityFeed.common.seeLessMessage = Показать меньше
|
|
201
201
|
# See more button for showing whole long message
|
package/i18n/zh-CN.js
CHANGED
|
@@ -97,7 +97,7 @@ export default {
|
|
|
97
97
|
"be.contentSidebar.activityFeed.commentForm.commentWrite": "留下评论",
|
|
98
98
|
"be.contentSidebar.activityFeed.commmon.showOriginalMessage": "显示原始评论",
|
|
99
99
|
"be.contentSidebar.activityFeed.common.activityStatusResolved": "Resolved",
|
|
100
|
-
"be.contentSidebar.activityFeed.common.editedMessage": "
|
|
100
|
+
"be.contentSidebar.activityFeed.common.editedMessage": "(已编辑)",
|
|
101
101
|
"be.contentSidebar.activityFeed.common.seeLessMessage": "查看更少",
|
|
102
102
|
"be.contentSidebar.activityFeed.common.seeMoreMessage": "查看更多",
|
|
103
103
|
"be.contentSidebar.activityFeed.common.translateMessage": "翻译",
|
package/i18n/zh-CN.properties
CHANGED
|
@@ -195,7 +195,7 @@ be.contentSidebar.activityFeed.commmon.showOriginalMessage = 显示原始评论
|
|
|
195
195
|
# Indicator of resolved status of Comment or Annotation, visible in Feed Item (in upper-case in supported language)
|
|
196
196
|
be.contentSidebar.activityFeed.common.activityStatusResolved = Resolved
|
|
197
197
|
# Label indicating that message was edited, should be lowercase, should have escaped leading space
|
|
198
|
-
be.contentSidebar.activityFeed.common.editedMessage =
|
|
198
|
+
be.contentSidebar.activityFeed.common.editedMessage = \(已编辑)
|
|
199
199
|
# See less button for hiding part of long message
|
|
200
200
|
be.contentSidebar.activityFeed.common.seeLessMessage = 查看更少
|
|
201
201
|
# See more button for showing whole long message
|
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import InlineError from './InlineError';
|
|
3
|
+
|
|
4
|
+
export const regular = () => <InlineError title="Something bad happened">Username is required</InlineError>;
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components|InlineError',
|
|
8
|
+
component: InlineError,
|
|
9
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import InlineNotice from './InlineNotice';
|
|
3
|
+
import notes from './InlineNotice.stories.md';
|
|
4
|
+
|
|
5
|
+
export const withoutTitle = () => (
|
|
6
|
+
<div>
|
|
7
|
+
<InlineNotice type="warning">
|
|
8
|
+
This is a <strong>warning</strong> notice. You might want to pay attention to this.
|
|
9
|
+
</InlineNotice>
|
|
10
|
+
|
|
11
|
+
<InlineNotice type="error">
|
|
12
|
+
This is an <strong>error</strong> notice. You really want to pay attention to this.
|
|
13
|
+
</InlineNotice>
|
|
14
|
+
|
|
15
|
+
<InlineNotice type="success">
|
|
16
|
+
This is a <strong>success</strong> notice. You ought to feel really good about this.
|
|
17
|
+
</InlineNotice>
|
|
18
|
+
|
|
19
|
+
<InlineNotice type="info">
|
|
20
|
+
This is an <strong>info</strong> notice. You should get some context from this.
|
|
21
|
+
</InlineNotice>
|
|
22
|
+
|
|
23
|
+
<InlineNotice type="generic">
|
|
24
|
+
This is an <strong>generic</strong> notice. You will just want to see this.
|
|
25
|
+
</InlineNotice>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const withTitle = () => (
|
|
30
|
+
<div>
|
|
31
|
+
<InlineNotice type="warning" title="Warning Title">
|
|
32
|
+
This is a warning notice. You might want to pay attention to this.
|
|
33
|
+
</InlineNotice>
|
|
34
|
+
|
|
35
|
+
<InlineNotice type="error" title="Error Title">
|
|
36
|
+
This is an error notice. You really want to pay attention to this.
|
|
37
|
+
</InlineNotice>
|
|
38
|
+
|
|
39
|
+
<InlineNotice type="success" title="Success Title">
|
|
40
|
+
This is a success notice. You ought to feel really good about this.
|
|
41
|
+
</InlineNotice>
|
|
42
|
+
|
|
43
|
+
<InlineNotice type="info" title="Info Title">
|
|
44
|
+
This is an info notice. You should get some context from this.
|
|
45
|
+
</InlineNotice>
|
|
46
|
+
|
|
47
|
+
<InlineNotice type="generic" title="Generic Title">
|
|
48
|
+
This is a generic notice. You will just want to notice this.
|
|
49
|
+
</InlineNotice>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
title: 'Components|InlineNotice',
|
|
55
|
+
component: InlineNotice,
|
|
56
|
+
parameters: {
|
|
57
|
+
notes,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
`import InlineNotice from 'box-ui-elements/es/components/InlineNotice';`
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { boolean } from '@storybook/addon-knobs';
|
|
5
|
+
import NavSidebar from './NavSidebar';
|
|
6
|
+
import NavListCollapseHeader from './NavListCollapseHeader';
|
|
7
|
+
import NavList from './NavList';
|
|
8
|
+
import Link from '../link/Link';
|
|
9
|
+
|
|
10
|
+
import notes from './NavSidebar.stories.md';
|
|
11
|
+
|
|
12
|
+
export const notCollapsible = () => (
|
|
13
|
+
<NavSidebar data-resin-component="leftnav">
|
|
14
|
+
<NavList>
|
|
15
|
+
<Link>Item 1-1</Link>
|
|
16
|
+
<Link>Item 1-2</Link>
|
|
17
|
+
</NavList>
|
|
18
|
+
<NavList heading="Item 2">
|
|
19
|
+
<Link>Item 2-1</Link>
|
|
20
|
+
<Link>Item 2-2</Link>
|
|
21
|
+
<Link>Item 2-3</Link>
|
|
22
|
+
</NavList>
|
|
23
|
+
</NavSidebar>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const collapsible = () => (
|
|
27
|
+
<NavSidebar data-resin-component="leftnav">
|
|
28
|
+
<NavList
|
|
29
|
+
heading={
|
|
30
|
+
<NavListCollapseHeader onToggleCollapse={action('onToggleCollapse called')}>
|
|
31
|
+
Collapse or Expand
|
|
32
|
+
</NavListCollapseHeader>
|
|
33
|
+
}
|
|
34
|
+
className="is-collapsible"
|
|
35
|
+
collapsed={boolean('collapsed', false)}
|
|
36
|
+
>
|
|
37
|
+
<Link>Item 1-1</Link>
|
|
38
|
+
<Link>Item 1-2</Link>
|
|
39
|
+
</NavList>
|
|
40
|
+
<NavList heading="Item 2">
|
|
41
|
+
<Link>Item 2-1</Link>
|
|
42
|
+
<Link>Item 2-2</Link>
|
|
43
|
+
<Link>Item 2-3</Link>
|
|
44
|
+
</NavList>
|
|
45
|
+
</NavSidebar>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
title: 'Components|NavSidebar',
|
|
50
|
+
component: NavSidebar,
|
|
51
|
+
parameters: {
|
|
52
|
+
notes,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import NavSidebar from 'box-ui-elements/es/components/NavSidebar';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@import './base';
|
|
2
|
+
|
|
3
|
+
.typography {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
margin-top: 25px;
|
|
8
|
+
|
|
9
|
+
.weights {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
margin-top: 20px;
|
|
13
|
+
color: $black;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.weights .preview {
|
|
17
|
+
font-size: 72px;
|
|
18
|
+
line-height: 72px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.weights .regular {
|
|
22
|
+
margin-right: 15px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.weights .bold .preview {
|
|
26
|
+
font-weight: bold;
|
|
27
|
+
font-family: 'Lato', sans-serif;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.font-container,
|
|
31
|
+
.headings-container {
|
|
32
|
+
width: 33%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.heading {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
line-height: 32px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
label {
|
|
42
|
+
margin-right: 10px;
|
|
43
|
+
color: $bdl-watermelon-red;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.form-font-container label {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
width: 80px;
|
|
49
|
+
line-height: 30px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.form-font-container .body,
|
|
53
|
+
.form-font-container .input-text {
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.form-font-container .input-label {
|
|
58
|
+
font-size: 13px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './typography.stories.scss';
|
|
3
|
+
|
|
4
|
+
export const lato = () => (
|
|
5
|
+
<div className="typography">
|
|
6
|
+
<div className="heading">
|
|
7
|
+
<h1>Lato 2.0</h1>
|
|
8
|
+
</div>
|
|
9
|
+
<div className="weights">
|
|
10
|
+
<div className="regular">
|
|
11
|
+
<div className="preview">Aa</div>
|
|
12
|
+
<div className="weight">Regular</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div className="bold">
|
|
15
|
+
<div className="preview">Aa</div>
|
|
16
|
+
<div className="weight">Bold</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export const heading = () => (
|
|
23
|
+
<div className="typography">
|
|
24
|
+
<div className="heading">
|
|
25
|
+
<label>H1</label>
|
|
26
|
+
<h1>Project Symphony</h1>
|
|
27
|
+
</div>
|
|
28
|
+
<div className="heading">
|
|
29
|
+
<label>H2</label>
|
|
30
|
+
<h2>Project Symphony</h2>
|
|
31
|
+
</div>
|
|
32
|
+
<div className="heading">
|
|
33
|
+
<label>H3</label>
|
|
34
|
+
<h3>Project Symphony</h3>
|
|
35
|
+
</div>
|
|
36
|
+
<div className="heading">
|
|
37
|
+
<label>H4</label>
|
|
38
|
+
<h4>Project Symphony</h4>
|
|
39
|
+
</div>
|
|
40
|
+
<div className="heading">
|
|
41
|
+
<label>H5</label>
|
|
42
|
+
<h5>Project Symphony</h5>
|
|
43
|
+
</div>
|
|
44
|
+
<div className="heading">
|
|
45
|
+
<label>H6</label>
|
|
46
|
+
<h6>Project Symphony</h6>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export const text = () => (
|
|
52
|
+
<div className="typography">
|
|
53
|
+
<div>
|
|
54
|
+
<label>BODY</label>
|
|
55
|
+
<span className="body">Project Symphony</span>
|
|
56
|
+
</div>
|
|
57
|
+
<div>
|
|
58
|
+
<label>INPUT LABEL</label>
|
|
59
|
+
<span className="input-label">Project Symphony</span>
|
|
60
|
+
</div>
|
|
61
|
+
<div>
|
|
62
|
+
<label>INPUT TEXT</label>
|
|
63
|
+
<span className="input-text">Project Symphony</span>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
export default {
|
|
69
|
+
title: 'Theming|Typography',
|
|
70
|
+
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
### Description
|
|
2
|
-
|
|
3
|
-
Static div displaying a message to the user.
|
|
4
|
-
|
|
5
|
-
### Examples
|
|
6
|
-
|
|
7
|
-
**Without `title` pop**
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
<div style={ { width: '50%' } }>
|
|
11
|
-
<InlineNotice type="warning">
|
|
12
|
-
This is a <strong>warning</strong> notice. You might want to pay attention to this.
|
|
13
|
-
</InlineNotice>
|
|
14
|
-
|
|
15
|
-
<InlineNotice type="error">
|
|
16
|
-
This is an <strong>error</strong> notice. You really want to pay attention to this.
|
|
17
|
-
</InlineNotice>
|
|
18
|
-
|
|
19
|
-
<InlineNotice type="success">
|
|
20
|
-
This is a <strong>success</strong> notice. You ought to feel really good about this.
|
|
21
|
-
</InlineNotice>
|
|
22
|
-
|
|
23
|
-
<InlineNotice type="info">
|
|
24
|
-
This is an <strong>info</strong> notice. You should get some context from this.
|
|
25
|
-
</InlineNotice>
|
|
26
|
-
|
|
27
|
-
<InlineNotice type="generic">
|
|
28
|
-
This is an <strong>generic</strong> notice. You'll just want to see this.
|
|
29
|
-
</InlineNotice>
|
|
30
|
-
</div>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**With `title` prop**
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
<div style={ { width: '50%' } }>
|
|
37
|
-
<InlineNotice type="warning" title="Warning Title">
|
|
38
|
-
This is a warning notice. You might want to pay attention to this.
|
|
39
|
-
</InlineNotice>
|
|
40
|
-
|
|
41
|
-
<InlineNotice type="error" title="Error Title">
|
|
42
|
-
This is an error notice. You really want to pay attention to this.
|
|
43
|
-
</InlineNotice>
|
|
44
|
-
|
|
45
|
-
<InlineNotice type="success" title="Success Title">
|
|
46
|
-
This is a success notice. You ought to feel really good about this.
|
|
47
|
-
</InlineNotice>
|
|
48
|
-
|
|
49
|
-
<InlineNotice type="info" title="Info Title">
|
|
50
|
-
This is an info notice. You should get some context from this.
|
|
51
|
-
</InlineNotice>
|
|
52
|
-
|
|
53
|
-
<InlineNotice type="generic" title="Generic Title">
|
|
54
|
-
This is a generic notice. You'll just want to notice this.
|
|
55
|
-
</InlineNotice>
|
|
56
|
-
</div>
|
|
57
|
-
```
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
### Examples
|
|
2
|
-
|
|
3
|
-
#### Using `NavList`
|
|
4
|
-
```
|
|
5
|
-
const NavList = require('./NavList').default;
|
|
6
|
-
|
|
7
|
-
<NavSidebar data-resin-component="leftnav">
|
|
8
|
-
<NavList>
|
|
9
|
-
<Link>Item 1-1</Link>
|
|
10
|
-
<Link>Item 1-2</Link>
|
|
11
|
-
</NavList>
|
|
12
|
-
<NavList heading="Item 2">
|
|
13
|
-
<Link>Item 2-1</Link>
|
|
14
|
-
<Link>Item 2-2</Link>
|
|
15
|
-
<Link>Item 2-3</Link>
|
|
16
|
-
</NavList>
|
|
17
|
-
</NavSidebar>
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
#### Using `NavListCollapsible`
|
|
22
|
-
```
|
|
23
|
-
const NavList = require('./NavList').default;
|
|
24
|
-
const NavListCollapseHeader = require('./NavListCollapseHeader').default;
|
|
25
|
-
|
|
26
|
-
const handleOnToggle = (ev) => {
|
|
27
|
-
setState((prevState) => {
|
|
28
|
-
prevState.collapsed = !prevState.collapsed;
|
|
29
|
-
return prevState;
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
initialState = {
|
|
34
|
-
collapsed: true
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
<NavSidebar data-resin-component="leftnav">
|
|
38
|
-
<NavList
|
|
39
|
-
heading={
|
|
40
|
-
<NavListCollapseHeader onToggleCollapse={ handleOnToggle }>
|
|
41
|
-
Collapse or Expand
|
|
42
|
-
</NavListCollapseHeader>
|
|
43
|
-
}
|
|
44
|
-
className="is-collapsible example-collapsible"
|
|
45
|
-
collapsed={state.collapsed}
|
|
46
|
-
>
|
|
47
|
-
<Link>Item 1-1</Link>
|
|
48
|
-
<Link>Item 1-2</Link>
|
|
49
|
-
</NavList>
|
|
50
|
-
<NavList heading="Item 2">
|
|
51
|
-
<Link>Item 2-1</Link>
|
|
52
|
-
<Link>Item 2-2</Link>
|
|
53
|
-
<Link>Item 2-3</Link>
|
|
54
|
-
</NavList>
|
|
55
|
-
</NavSidebar>
|
|
56
|
-
|
|
57
|
-
```
|