@inc2734/unitone-css 0.47.2 → 0.48.0
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/README.md +1 -1
- package/dist/app.css +1 -1
- package/dist/app.js +1 -1
- package/dist/index.js +1 -1
- package/dist/library.js +1 -1
- package/package.json +8 -14
- package/src/app.js +50 -11
- package/src/layout-primitives/both-sides/index.jsx +1 -0
- package/src/layout-primitives/center/_center.scss +1 -6
- package/src/layout-primitives/center/index.jsx +2 -1
- package/src/layout-primitives/cluster/index.jsx +1 -0
- package/src/layout-primitives/container/index.jsx +1 -0
- package/src/layout-primitives/cover/_cover.scss +1 -0
- package/src/layout-primitives/cover/index.jsx +1 -0
- package/src/layout-primitives/decorator/index.jsx +1 -0
- package/src/layout-primitives/float/_float.scss +4 -4
- package/src/layout-primitives/float/index.jsx +2 -1
- package/src/layout-primitives/frame/index.jsx +1 -0
- package/src/layout-primitives/gutters/index.jsx +1 -0
- package/src/layout-primitives/layers/_layers.scss +21 -8
- package/src/layout-primitives/layers/index.jsx +5 -2
- package/src/layout-primitives/reel/index.jsx +1 -0
- package/src/layout-primitives/responsive-grid/index.jsx +1 -0
- package/src/layout-primitives/stack/index.jsx +1 -0
- package/src/layout-primitives/switcher/index.jsx +1 -0
- package/src/layout-primitives/text/index.jsx +3 -1
- package/src/layout-primitives/vertical-writing/index.jsx +4 -1
- package/src/layout-primitives/with-sidebar/index.jsx +1 -0
- package/src/library.js +2 -1
- package/dist/storybook.css +0 -1
- package/src/layout-primitives/both-sides/README.md +0 -143
- package/src/layout-primitives/both-sides/stories/index.stories.jsx +0 -49
- package/src/layout-primitives/center/README.md +0 -113
- package/src/layout-primitives/center/stories/index.stories.jsx +0 -63
- package/src/layout-primitives/cluster/README.md +0 -133
- package/src/layout-primitives/cluster/stories/index.stories.jsx +0 -135
- package/src/layout-primitives/container/README.md +0 -93
- package/src/layout-primitives/container/stories/index.stories.jsx +0 -65
- package/src/layout-primitives/cover/README.md +0 -195
- package/src/layout-primitives/cover/stories/index.stories.jsx +0 -179
- package/src/layout-primitives/decorator/README.md +0 -179
- package/src/layout-primitives/decorator/stories/index.stories.jsx +0 -198
- package/src/layout-primitives/float/README.md +0 -115
- package/src/layout-primitives/float/stories/index.stories.jsx +0 -78
- package/src/layout-primitives/frame/README.md +0 -67
- package/src/layout-primitives/frame/stories/index.stories.jsx +0 -50
- package/src/layout-primitives/gutters/README.md +0 -47
- package/src/layout-primitives/gutters/stories/index.stories.jsx +0 -48
- package/src/layout-primitives/layers/README.md +0 -307
- package/src/layout-primitives/layers/stories/index.stories.jsx +0 -187
- package/src/layout-primitives/reel/README.md +0 -115
- package/src/layout-primitives/reel/stories/index.stories.jsx +0 -80
- package/src/layout-primitives/responsive-grid/README.md +0 -130
- package/src/layout-primitives/responsive-grid/stories/index.stories.jsx +0 -234
- package/src/layout-primitives/stack/README.md +0 -98
- package/src/layout-primitives/stack/stories/index.stories.jsx +0 -193
- package/src/layout-primitives/switcher/README.md +0 -73
- package/src/layout-primitives/switcher/stories/index.stories.jsx +0 -50
- package/src/layout-primitives/text/README.md +0 -139
- package/src/layout-primitives/text/stories/index.stories.jsx +0 -148
- package/src/layout-primitives/vertical-writing/README.md +0 -133
- package/src/layout-primitives/vertical-writing/stories/index.stories.jsx +0 -104
- package/src/layout-primitives/with-sidebar/README.md +0 -169
- package/src/layout-primitives/with-sidebar/stories/index.stories.jsx +0 -124
- package/src/patterns/features/features-1/Features1.jsx +0 -54
- package/src/patterns/features/features-1/stories/index.stories.jsx +0 -68
- package/src/patterns/features/features-2/Features2.jsx +0 -28
- package/src/patterns/features/features-2/stories/index.stories.jsx +0 -67
- package/src/patterns/header/header-1/Header1.jsx +0 -34
- package/src/patterns/header/header-1/stories/index.stories.jsx +0 -44
- package/src/patterns/header/header-2/Header2.jsx +0 -28
- package/src/patterns/header/header-2/stories/index.stories.jsx +0 -44
- package/src/patterns/header/header-3/Header3.jsx +0 -25
- package/src/patterns/header/header-3/stories/index.stories.jsx +0 -43
- package/src/patterns/header/header-4/Header4.jsx +0 -28
- package/src/patterns/header/header-4/stories/index.stories.jsx +0 -41
- package/src/patterns/header/header-5/Header5.jsx +0 -35
- package/src/patterns/header/header-5/stories/index.stories.jsx +0 -43
- package/src/patterns/header/header-6/Header6.jsx +0 -37
- package/src/patterns/header/header-6/stories/index.stories.jsx +0 -58
- package/src/patterns/media-text/media-text-1/MediaText1.jsx +0 -44
- package/src/patterns/media-text/media-text-1/stories/index.stories.jsx +0 -34
- package/src/patterns/media-text/media-text-2/MediaText2.jsx +0 -42
- package/src/patterns/media-text/media-text-2/stories/index.stories.jsx +0 -34
- package/src/stories/1.introduction.stories.mdx +0 -60
- package/src/stories/2.get-started.stories.mdx +0 -49
- package/src/stories/3.global-api.stories.mdx +0 -61
- package/src/stories/4.global-css-variables.stories.mdx +0 -198
- package/src/storybook.scss +0 -10
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Header3 } from '../Header3';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Patterns/Header/Header-3',
|
|
7
|
-
component: Header3,
|
|
8
|
-
argTypes: {
|
|
9
|
-
backgroundColor: {
|
|
10
|
-
control: { type: 'color' },
|
|
11
|
-
table: { defaultValue: { summary: 'transparent' } },
|
|
12
|
-
type: { name: 'string', required: false },
|
|
13
|
-
},
|
|
14
|
-
color: {
|
|
15
|
-
control: { type: 'color' },
|
|
16
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
args: {
|
|
21
|
-
backgroundColor: 'transparent',
|
|
22
|
-
color: 'initial',
|
|
23
|
-
},
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'fullscreen',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const Default = (props) => (
|
|
30
|
-
<Header3
|
|
31
|
-
src="https://placehold.jp/1280x1024.jpg"
|
|
32
|
-
title="Lorem ipsum dolor sit amet, consectetur adipisicing elit"
|
|
33
|
-
backgroundColor={props.backgroundColor}
|
|
34
|
-
color={props.color}
|
|
35
|
-
>
|
|
36
|
-
<p>
|
|
37
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
|
|
38
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
|
|
39
|
-
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
40
|
-
voluptate velit esse cill
|
|
41
|
-
</p>
|
|
42
|
-
</Header3>
|
|
43
|
-
);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Decorator,
|
|
5
|
-
Container,
|
|
6
|
-
Cover,
|
|
7
|
-
CoverContent,
|
|
8
|
-
Layers,
|
|
9
|
-
Stack,
|
|
10
|
-
Text,
|
|
11
|
-
} from '@inc2734/unitone-css';
|
|
12
|
-
|
|
13
|
-
export const Header4 = (props) => (
|
|
14
|
-
<Decorator backgroundColor={props.backgroundColor} color={props.color}>
|
|
15
|
-
<Layers cover>
|
|
16
|
-
{!!props.src && <img src={props.src} alt="" />}
|
|
17
|
-
<Cover>
|
|
18
|
-
<CoverContent></CoverContent>
|
|
19
|
-
<Container align="start" gutters={0} maxWidth="var(--unitone--measure)">
|
|
20
|
-
<Stack gap={2}>
|
|
21
|
-
{!!props.title && <h2 style={{ '--unitone--font-size': 4 }}>{props.title}</h2>}
|
|
22
|
-
{!!props.children && <Text>{props.children}</Text>}
|
|
23
|
-
</Stack>
|
|
24
|
-
</Container>
|
|
25
|
-
</Cover>
|
|
26
|
-
</Layers>
|
|
27
|
-
</Decorator>
|
|
28
|
-
);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Header4 } from '../Header4';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Patterns/Header/Header-4',
|
|
7
|
-
component: Header4,
|
|
8
|
-
argTypes: {
|
|
9
|
-
backgroundColor: {
|
|
10
|
-
control: { type: 'color' },
|
|
11
|
-
table: { defaultValue: { summary: 'transparent' } },
|
|
12
|
-
type: { name: 'string', required: false },
|
|
13
|
-
},
|
|
14
|
-
color: {
|
|
15
|
-
control: { type: 'color' },
|
|
16
|
-
table: { defaultValue: { summary: '#fff' } },
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
args: {
|
|
21
|
-
backgroundColor: 'transparent',
|
|
22
|
-
color: '#fff',
|
|
23
|
-
},
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'fullscreen',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const Default = (props) => (
|
|
30
|
-
<Header4
|
|
31
|
-
src="https://placehold.jp/1280x1024.jpg"
|
|
32
|
-
title="Lorem ipsum dolor sit amet, consectetur adipisicing elit"
|
|
33
|
-
backgroundColor={props.backgroundColor}
|
|
34
|
-
color={props.color}
|
|
35
|
-
>
|
|
36
|
-
<p>
|
|
37
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
|
|
38
|
-
labore et dolore magna aliqua.
|
|
39
|
-
</p>
|
|
40
|
-
</Header4>
|
|
41
|
-
);
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Decorator,
|
|
5
|
-
Container,
|
|
6
|
-
Cover,
|
|
7
|
-
CoverContent,
|
|
8
|
-
Layers,
|
|
9
|
-
Stack,
|
|
10
|
-
Text,
|
|
11
|
-
} from '@inc2734/unitone-css';
|
|
12
|
-
|
|
13
|
-
export const Header5 = (props) => (
|
|
14
|
-
<Decorator backgroundColor={props.backgroundColor} color={props.color}>
|
|
15
|
-
<Layers cover>
|
|
16
|
-
{!!props.src && (
|
|
17
|
-
<img src={props.src} alt="" style={{ width: 'var(--unitone--pg10)', left: 'auto' }} />
|
|
18
|
-
)}
|
|
19
|
-
<Cover>
|
|
20
|
-
<CoverContent>
|
|
21
|
-
<Container align="start" gutters={0} maxWidth="var(--unitone--measure)">
|
|
22
|
-
<Stack gap={2}>
|
|
23
|
-
{!!props.title && (
|
|
24
|
-
<Stack style={{ '--unitone--font-size': 5 }}>
|
|
25
|
-
<h2>{props.title}</h2>
|
|
26
|
-
</Stack>
|
|
27
|
-
)}
|
|
28
|
-
{!!props.children && <Text>{props.children}</Text>}
|
|
29
|
-
</Stack>
|
|
30
|
-
</Container>
|
|
31
|
-
</CoverContent>
|
|
32
|
-
</Cover>
|
|
33
|
-
</Layers>
|
|
34
|
-
</Decorator>
|
|
35
|
-
);
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Header5 } from '../Header5';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Patterns/Header/Header-5',
|
|
7
|
-
component: Header5,
|
|
8
|
-
argTypes: {
|
|
9
|
-
backgroundColor: {
|
|
10
|
-
control: { type: 'color' },
|
|
11
|
-
table: { defaultValue: { summary: 'transparent' } },
|
|
12
|
-
type: { name: 'string', required: false },
|
|
13
|
-
},
|
|
14
|
-
color: {
|
|
15
|
-
control: { type: 'color' },
|
|
16
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
args: {
|
|
21
|
-
backgroundColor: 'transparent',
|
|
22
|
-
color: 'initial',
|
|
23
|
-
},
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'fullscreen',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const Default = (props) => (
|
|
30
|
-
<Header5
|
|
31
|
-
src="https://placehold.jp/1280x1024.jpg"
|
|
32
|
-
title="Lorem ipsum dolor sit amet, consectetur adipisicing elit"
|
|
33
|
-
backgroundColor={props.backgroundColor}
|
|
34
|
-
color={props.color}
|
|
35
|
-
>
|
|
36
|
-
<p>
|
|
37
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
|
|
38
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
|
|
39
|
-
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
40
|
-
voluptate velit esse cill
|
|
41
|
-
</p>
|
|
42
|
-
</Header5>
|
|
43
|
-
);
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Decorator,
|
|
5
|
-
Center,
|
|
6
|
-
Container,
|
|
7
|
-
Cover,
|
|
8
|
-
CoverContent,
|
|
9
|
-
Layers,
|
|
10
|
-
Stack,
|
|
11
|
-
Text,
|
|
12
|
-
} from '@inc2734/unitone-css';
|
|
13
|
-
|
|
14
|
-
export const Header6 = (props) => (
|
|
15
|
-
<Decorator backgroundColor={props.backgroundColor} color={props.color}>
|
|
16
|
-
<Layers cover>
|
|
17
|
-
<Decorator padding={props.padding}>
|
|
18
|
-
<Decorator backgroundColor="transparent" borderColor={props.borderColor} borderWidth="1px">
|
|
19
|
-
<Cover minHeight={`calc(100vh - var(--unitone--s${props.padding}) * 2`}>
|
|
20
|
-
<CoverContent>
|
|
21
|
-
<Container gutters={0} maxWidth="var(--unitone--measure)">
|
|
22
|
-
<Stack gap={2}>
|
|
23
|
-
{!!props.title && (
|
|
24
|
-
<Center>
|
|
25
|
-
<h2 style={{ '--unitone--font-size': 5 }}>{props.title}</h2>
|
|
26
|
-
</Center>
|
|
27
|
-
)}
|
|
28
|
-
{!!props.children && <Text center>{props.children}</Text>}
|
|
29
|
-
</Stack>
|
|
30
|
-
</Container>
|
|
31
|
-
</CoverContent>
|
|
32
|
-
</Cover>
|
|
33
|
-
</Decorator>
|
|
34
|
-
</Decorator>
|
|
35
|
-
</Layers>
|
|
36
|
-
</Decorator>
|
|
37
|
-
);
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Header6 } from '../Header6';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Patterns/Header/Header-6',
|
|
7
|
-
component: Header6,
|
|
8
|
-
argTypes: {
|
|
9
|
-
backgroundColor: {
|
|
10
|
-
control: { type: 'color' },
|
|
11
|
-
table: { defaultValue: { summary: '#000' } },
|
|
12
|
-
type: { name: 'string', required: false },
|
|
13
|
-
},
|
|
14
|
-
borderColor: {
|
|
15
|
-
control: { type: 'color' },
|
|
16
|
-
table: { defaultValue: { summary: '#fff' } },
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
},
|
|
19
|
-
color: {
|
|
20
|
-
control: { type: 'color' },
|
|
21
|
-
table: { defaultValue: { summary: '#fff' } },
|
|
22
|
-
type: { name: 'string', required: false },
|
|
23
|
-
},
|
|
24
|
-
padding: {
|
|
25
|
-
control: { type: 'inline-radio' },
|
|
26
|
-
options: [-2, -1, 1, 2, 3],
|
|
27
|
-
table: { defaultValue: { summary: 'var(--unitone--s0)' } },
|
|
28
|
-
type: { name: 'number', required: false },
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
args: {
|
|
32
|
-
backgroundColor: '#000',
|
|
33
|
-
borderColor: '#fff',
|
|
34
|
-
color: '#fff',
|
|
35
|
-
padding: 1,
|
|
36
|
-
},
|
|
37
|
-
parameters: {
|
|
38
|
-
layout: 'fullscreen',
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const Default = (props) => (
|
|
43
|
-
<Header6
|
|
44
|
-
src="https://placehold.jp/1280x1024.jpg"
|
|
45
|
-
title="Lorem ipsum dolor"
|
|
46
|
-
backgroundColor={props.backgroundColor}
|
|
47
|
-
borderColor={props.borderColor}
|
|
48
|
-
color={props.color}
|
|
49
|
-
padding={props.padding}
|
|
50
|
-
>
|
|
51
|
-
<p>
|
|
52
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit Lorem ipsum dolor sit amet,
|
|
53
|
-
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
|
|
54
|
-
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
|
|
55
|
-
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill
|
|
56
|
-
</p>
|
|
57
|
-
</Header6>
|
|
58
|
-
);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Decorator,
|
|
5
|
-
Container,
|
|
6
|
-
Cover,
|
|
7
|
-
CoverContent,
|
|
8
|
-
Stack,
|
|
9
|
-
Text,
|
|
10
|
-
WithSidebar,
|
|
11
|
-
} from '@inc2734/unitone-css';
|
|
12
|
-
|
|
13
|
-
export const MediaText1 = (props) => (
|
|
14
|
-
<Decorator color={props.color}>
|
|
15
|
-
<WithSidebar
|
|
16
|
-
gap={2}
|
|
17
|
-
contentMinWidth="min(100%, var(--unitone--measure) / 2)"
|
|
18
|
-
sidebar="left"
|
|
19
|
-
sidebarWidth="50%"
|
|
20
|
-
alignItems="center"
|
|
21
|
-
revert
|
|
22
|
-
>
|
|
23
|
-
<Cover noPadding minHeight="0">
|
|
24
|
-
<CoverContent>
|
|
25
|
-
<Container gutters={0} maxWidth="var(--unitone--measure)">
|
|
26
|
-
<Stack gap={2}>
|
|
27
|
-
{!!props.title && (
|
|
28
|
-
<Stack style={{ '--unitone--font-size': 4 }}>
|
|
29
|
-
<h2>{props.title}</h2>
|
|
30
|
-
</Stack>
|
|
31
|
-
)}
|
|
32
|
-
<Text center>{props.children}</Text>
|
|
33
|
-
</Stack>
|
|
34
|
-
</Container>
|
|
35
|
-
</CoverContent>
|
|
36
|
-
</Cover>
|
|
37
|
-
{!!props.src && (
|
|
38
|
-
<div>
|
|
39
|
-
<img src={props.src} alt="" />
|
|
40
|
-
</div>
|
|
41
|
-
)}
|
|
42
|
-
</WithSidebar>
|
|
43
|
-
</Decorator>
|
|
44
|
-
);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { MediaText1 } from '../MediaText1';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Patterns/MediaText/MediaText-1',
|
|
7
|
-
component: MediaText1,
|
|
8
|
-
argTypes: {
|
|
9
|
-
color: {
|
|
10
|
-
control: { type: 'color' },
|
|
11
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
12
|
-
type: { name: 'string', required: false },
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
args: {
|
|
16
|
-
color: 'initial',
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const Default = (props) => (
|
|
21
|
-
<MediaText1
|
|
22
|
-
src="https://placehold.jp/1024x1280.jpg"
|
|
23
|
-
title="Lorem ipsum dolor sit amet, consectetur adipisicing elit"
|
|
24
|
-
backgroundColor={props.backgroundColor}
|
|
25
|
-
color={props.color}
|
|
26
|
-
>
|
|
27
|
-
<p>
|
|
28
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
|
|
29
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
|
|
30
|
-
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
31
|
-
voluptate velit esse cill
|
|
32
|
-
</p>
|
|
33
|
-
</MediaText1>
|
|
34
|
-
);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Decorator,
|
|
5
|
-
Container,
|
|
6
|
-
Cover,
|
|
7
|
-
CoverContent,
|
|
8
|
-
Stack,
|
|
9
|
-
WithSidebar,
|
|
10
|
-
} from '@inc2734/unitone-css';
|
|
11
|
-
|
|
12
|
-
export const MediaText2 = (props) => (
|
|
13
|
-
<Decorator color={props.color}>
|
|
14
|
-
<WithSidebar
|
|
15
|
-
gap={2}
|
|
16
|
-
contentMinWidth="min(100%, var(--unitone--measure) / 2)"
|
|
17
|
-
sidebar="right"
|
|
18
|
-
sidebarWidth="50%"
|
|
19
|
-
alignItems="center"
|
|
20
|
-
>
|
|
21
|
-
<Cover noPadding minHeight="0">
|
|
22
|
-
<CoverContent>
|
|
23
|
-
<Container gutters={0} maxWidth="var(--unitone--measure)">
|
|
24
|
-
<Stack gap={2}>
|
|
25
|
-
{!!props.title && (
|
|
26
|
-
<Stack style={{ '--unitone--font-size': 4 }}>
|
|
27
|
-
<h2>{props.title}</h2>
|
|
28
|
-
</Stack>
|
|
29
|
-
)}
|
|
30
|
-
<Stack>{props.children}</Stack>
|
|
31
|
-
</Stack>
|
|
32
|
-
</Container>
|
|
33
|
-
</CoverContent>
|
|
34
|
-
</Cover>
|
|
35
|
-
{!!props.src && (
|
|
36
|
-
<div>
|
|
37
|
-
<img src={props.src} alt="" />
|
|
38
|
-
</div>
|
|
39
|
-
)}
|
|
40
|
-
</WithSidebar>
|
|
41
|
-
</Decorator>
|
|
42
|
-
);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { MediaText2 } from '../MediaText2';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Patterns/MediaText/MediaText-2',
|
|
7
|
-
component: MediaText2,
|
|
8
|
-
argTypes: {
|
|
9
|
-
color: {
|
|
10
|
-
control: { type: 'color' },
|
|
11
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
12
|
-
type: { name: 'string', required: false },
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
args: {
|
|
16
|
-
color: 'initial',
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const Default = (props) => (
|
|
21
|
-
<MediaText2
|
|
22
|
-
src="https://placehold.jp/1024x1280.jpg"
|
|
23
|
-
title="Lorem ipsum dolor sit amet, consectetur adipisicing elit"
|
|
24
|
-
backgroundColor={props.backgroundColor}
|
|
25
|
-
color={props.color}
|
|
26
|
-
>
|
|
27
|
-
<p>
|
|
28
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
|
|
29
|
-
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
|
|
30
|
-
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
31
|
-
voluptate velit esse cill
|
|
32
|
-
</p>
|
|
33
|
-
</MediaText2>
|
|
34
|
-
);
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
<Meta title="1: Introduction" />
|
|
4
|
-
|
|
5
|
-
# unitone CSS
|
|
6
|
-
|
|
7
|
-
unitone CSS is a CSS framework. This framework was inspired by [EVERY LAYOUT](https://every-layout.dev/).
|
|
8
|
-
|
|
9
|
-
unitone CSS has the following features:
|
|
10
|
-
|
|
11
|
-
- Intrinsic web design
|
|
12
|
-
- Layout primitives
|
|
13
|
-
- Modular scales
|
|
14
|
-
- Fully CSS variables
|
|
15
|
-
|
|
16
|
-
## Intrinsic web design
|
|
17
|
-
|
|
18
|
-
Responsive web design, which is based on viewport width, causes problems with component portability.
|
|
19
|
-
|
|
20
|
-
By adopting "Intrinsic Web Design" based on content rather than viewport width, we can achieve true responsive web design that can be used on devices of all sizes.
|
|
21
|
-
|
|
22
|
-
## Layout primitives
|
|
23
|
-
|
|
24
|
-
Layout is achieved by combining components with a single responsibility, such as "provide vertical space between elements" or "place elements at equal intervals".
|
|
25
|
-
|
|
26
|
-
This allows for flexible layout and CSS size reduction.
|
|
27
|
-
|
|
28
|
-
## Modular scales
|
|
29
|
-
|
|
30
|
-
Adopting and following some uniform standard results in a harmonious and orderly design.
|
|
31
|
-
|
|
32
|
-
In unitone CSS, variations are provided based on the harmonic sequence for font size and the Fibonacci sequence for margins.
|
|
33
|
-
|
|
34
|
-
Also, if you follow the unitone CSS method of specifying font size, a balanced `line-height` will automatically be applied.
|
|
35
|
-
|
|
36
|
-
## Fully CSS variables
|
|
37
|
-
|
|
38
|
-
CSS variables are used everywhere, including each design tokens and component properties.
|
|
39
|
-
|
|
40
|
-
<hr />
|
|
41
|
-
|
|
42
|
-
## GitHub
|
|
43
|
-
|
|
44
|
-
https://github.com/inc2734/unitone CSS
|
|
45
|
-
|
|
46
|
-
## NPM
|
|
47
|
-
|
|
48
|
-
https://www.npmjs.com/package/@inc2734/unitone CSS
|
|
49
|
-
|
|
50
|
-
## Storybook
|
|
51
|
-
|
|
52
|
-
https://inc2734.github.io/unitone CSS
|
|
53
|
-
|
|
54
|
-
## Browser support
|
|
55
|
-
|
|
56
|
-
Modern browser only.
|
|
57
|
-
|
|
58
|
-
## License
|
|
59
|
-
|
|
60
|
-
MIT
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
<Meta title="2: Get started" />
|
|
4
|
-
|
|
5
|
-
# Get started
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```shell
|
|
10
|
-
$ npm install --save-dev @inc2734/unitone-css
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### Import CSS
|
|
14
|
-
|
|
15
|
-
#### Using Sass
|
|
16
|
-
|
|
17
|
-
```scss
|
|
18
|
-
@use 'PATH/TO/node_modules/@inc2734/unitone-css/src/app';
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
#### Using CSS
|
|
22
|
-
|
|
23
|
-
```html
|
|
24
|
-
<link rel="stylesheet" href="/node_modules/@inc2734/unitone-css/dist/app.css" />
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Import js
|
|
28
|
-
|
|
29
|
-
#### Using import
|
|
30
|
-
|
|
31
|
-
```js
|
|
32
|
-
import '@inc2734/unitone-css/app';
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
#### Using script
|
|
36
|
-
|
|
37
|
-
```html
|
|
38
|
-
<script src="/node_modules/@inc2734/unitone-css/dist/app.js"></script>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Using React components
|
|
42
|
-
|
|
43
|
-
```jsx
|
|
44
|
-
import { Decorator } from '@inc2734/unitone-css';
|
|
45
|
-
|
|
46
|
-
<Decorator padding={ 1 }>
|
|
47
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill</p>
|
|
48
|
-
</Decorator>
|
|
49
|
-
```
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
<Meta title="3: Global API" />
|
|
4
|
-
|
|
5
|
-
# Global API
|
|
6
|
-
|
|
7
|
-
## Font size
|
|
8
|
-
|
|
9
|
-
You can scale the font size with the CSS custom property `--unitone--font-size`. The minimum value is `-2` and the maximum value is `7`. If you scale the font size with this CSS custom property, the `line-height` will be automatically set to an appropriate value.
|
|
10
|
-
|
|
11
|
-
Variations on font size are available based on the harmonic sequence.
|
|
12
|
-
|
|
13
|
-
```html
|
|
14
|
-
<p style="--unitone--font-size: 2">
|
|
15
|
-
...
|
|
16
|
-
</p>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Line height
|
|
20
|
-
|
|
21
|
-
The half leading can be set. The default value is `0.4`.
|
|
22
|
-
|
|
23
|
-
```html
|
|
24
|
-
<p style="--unitone--half-leading: .4">
|
|
25
|
-
...
|
|
26
|
-
</p>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Fluid typography
|
|
30
|
-
|
|
31
|
-
You can using fluid typography. The `font-size` and the `line-height` change fluidly according to screen size.
|
|
32
|
-
|
|
33
|
-
```html
|
|
34
|
-
<p style="--unitone--font-size: 7" data-unitone-layout="-fluid-typography">
|
|
35
|
-
...
|
|
36
|
-
</p>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Margin / Gap
|
|
40
|
-
|
|
41
|
-
You can set the properly scaled margin and gap by using CSS custom properties. The minimum value is `--unitone--s-2` and the maximum value is `--unitone--s7`. `--unitone--s1` is the base value and `--unitone--s0` is `0`.
|
|
42
|
-
|
|
43
|
-
Variations on margin and gap are available based on the Fibonacci sequence.
|
|
44
|
-
|
|
45
|
-
```html
|
|
46
|
-
<div style="margin: var(--unitone--s2); gap: var(--unitone--s1)">
|
|
47
|
-
...
|
|
48
|
-
</div>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Padding
|
|
52
|
-
|
|
53
|
-
You can set the properly scaled padding by using CSS custom properties. The minimum value is `--unitone--p-2` and the maximum value is `--unitone--p7`. `--unitone--p1` is the base value and `--unitone--p0` is `0`.
|
|
54
|
-
|
|
55
|
-
Variations on padding are available based on the Fibonacci sequence.
|
|
56
|
-
|
|
57
|
-
```html
|
|
58
|
-
<div style="padding: var(--unitone--p2)">
|
|
59
|
-
...
|
|
60
|
-
</div>
|
|
61
|
-
```
|