@inc2734/unitone-css 0.47.3 → 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/center/_center.scss +1 -6
- package/src/layout-primitives/center/index.jsx +1 -1
- package/src/layout-primitives/cover/_cover.scss +1 -0
- package/src/layout-primitives/float/_float.scss +4 -4
- package/src/layout-primitives/float/index.jsx +1 -1
- package/src/layout-primitives/layers/_layers.scss +21 -8
- package/src/layout-primitives/layers/index.jsx +4 -2
- package/src/layout-primitives/text/index.jsx +2 -1
- package/src/layout-primitives/vertical-writing/index.jsx +3 -1
- 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,139 +0,0 @@
|
|
|
1
|
-
# Text
|
|
2
|
-
|
|
3
|
-
Designed to display legible text.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div data-unitone-layout="text">
|
|
11
|
-
<p>Lorem 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>
|
|
12
|
-
<p>Lorem 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>
|
|
13
|
-
</div>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
### JSX
|
|
17
|
-
|
|
18
|
-
```jsx
|
|
19
|
-
import { Text } from '@inc2734/unitone-css';
|
|
20
|
-
|
|
21
|
-
<Text>
|
|
22
|
-
<p>Lorem 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>
|
|
23
|
-
<p>Lorem 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>
|
|
24
|
-
</Text>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Props
|
|
28
|
-
|
|
29
|
-
### Apply gap
|
|
30
|
-
|
|
31
|
-
Automatically apply appropriate gap.
|
|
32
|
-
|
|
33
|
-
#### HTML
|
|
34
|
-
|
|
35
|
-
```html
|
|
36
|
-
<div data-unitone-layout="text -gap -gap:1">
|
|
37
|
-
...
|
|
38
|
-
</div>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
#### JSX
|
|
42
|
-
|
|
43
|
-
```jsx
|
|
44
|
-
import { Text } from '@inc2734/unitone-css';
|
|
45
|
-
|
|
46
|
-
<Text applyGap gap={1}>
|
|
47
|
-
...
|
|
48
|
-
</Text>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Gutters
|
|
52
|
-
|
|
53
|
-
Gutters.
|
|
54
|
-
|
|
55
|
-
#### HTML
|
|
56
|
-
|
|
57
|
-
```html
|
|
58
|
-
<div data-unitone-layout="text -gutters:1">
|
|
59
|
-
...
|
|
60
|
-
</div>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
#### JSX
|
|
64
|
-
|
|
65
|
-
```jsx
|
|
66
|
-
import { Text } from '@inc2734/unitone-css';
|
|
67
|
-
|
|
68
|
-
<Text gutters={1}>
|
|
69
|
-
...
|
|
70
|
-
</Text>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Max width
|
|
74
|
-
|
|
75
|
-
Sets the maximum width of the child element.
|
|
76
|
-
|
|
77
|
-
#### HTML
|
|
78
|
-
|
|
79
|
-
```html
|
|
80
|
-
<div data-unitone-layout="text" style="--unitone--max-width: 500px">
|
|
81
|
-
...
|
|
82
|
-
</div>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
#### JSX
|
|
86
|
-
|
|
87
|
-
```jsx
|
|
88
|
-
import { Text } from '@inc2734/unitone-css';
|
|
89
|
-
|
|
90
|
-
<Text maxWidth="500px">
|
|
91
|
-
...
|
|
92
|
-
</Text>
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Centering children
|
|
96
|
-
|
|
97
|
-
Intrinsic centering of child elements.
|
|
98
|
-
|
|
99
|
-
#### HTML
|
|
100
|
-
|
|
101
|
-
```html
|
|
102
|
-
<div data-unitone-layout="text -center">
|
|
103
|
-
...
|
|
104
|
-
</div>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
#### JSX
|
|
108
|
-
|
|
109
|
-
```jsx
|
|
110
|
-
import { Text } from '@inc2734/unitone-css';
|
|
111
|
-
|
|
112
|
-
<Text center>
|
|
113
|
-
...
|
|
114
|
-
</Text>
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
#### Columns
|
|
118
|
-
|
|
119
|
-
Correctly columnarize the child elements.
|
|
120
|
-
|
|
121
|
-
`--unitone--max-width` specifies the ideal width of the column.
|
|
122
|
-
|
|
123
|
-
#### HTML
|
|
124
|
-
|
|
125
|
-
```html
|
|
126
|
-
<div data-unitone-layout="text -columns" --unitone--max-width="300px">
|
|
127
|
-
...
|
|
128
|
-
</div>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
#### JSX
|
|
132
|
-
|
|
133
|
-
```jsx
|
|
134
|
-
import { Text } from '@inc2734/unitone-css';
|
|
135
|
-
|
|
136
|
-
<Text columns maxWidth="300px">
|
|
137
|
-
...
|
|
138
|
-
</Text>
|
|
139
|
-
```
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Text } from '../';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Layout Primitives/Text',
|
|
8
|
-
component: Text,
|
|
9
|
-
parameters: {
|
|
10
|
-
notes: { readme },
|
|
11
|
-
},
|
|
12
|
-
argTypes: {
|
|
13
|
-
center: {
|
|
14
|
-
control: { type: 'inline-radio' },
|
|
15
|
-
description: 'Centering child elements. Set by `data-unitone-layout` attribute `-center`.',
|
|
16
|
-
options: [false, true],
|
|
17
|
-
table: { defaultValue: { summary: false } },
|
|
18
|
-
type: { name: 'boolean', required: false },
|
|
19
|
-
},
|
|
20
|
-
column: {
|
|
21
|
-
control: { type: 'inline-radio' },
|
|
22
|
-
description:
|
|
23
|
-
'Correctly columnarize the child elements. Set by `data-unitone-layout` attribute `-column`.',
|
|
24
|
-
options: [false, true],
|
|
25
|
-
table: { defaultValue: { summary: false } },
|
|
26
|
-
type: { name: 'boolean', required: false },
|
|
27
|
-
},
|
|
28
|
-
applyGap: {
|
|
29
|
-
control: { type: 'inline-radio' },
|
|
30
|
-
description:
|
|
31
|
-
'Automatically apply appropriate gap. Set by `data-unitone-layout` attribute `-gap`.',
|
|
32
|
-
options: [false, true],
|
|
33
|
-
table: { defaultValue: { summary: false } },
|
|
34
|
-
type: { name: 'boolean', required: false },
|
|
35
|
-
},
|
|
36
|
-
gap: {
|
|
37
|
-
control: { type: 'inline-radio' },
|
|
38
|
-
description:
|
|
39
|
-
'Gap. Set by CSS var `--unitone--gap` or `data-unitone-layout` attribute `-gap:x`.',
|
|
40
|
-
options: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7],
|
|
41
|
-
table: { defaultValue: { summary: 'var(--unitone--global--text-gap)' } },
|
|
42
|
-
type: { name: 'number', required: false },
|
|
43
|
-
},
|
|
44
|
-
gutters: {
|
|
45
|
-
control: { type: 'inline-radio' },
|
|
46
|
-
description:
|
|
47
|
-
'Gutters. Set by CSS var `--unitone--gutters` or `data-unitone-layout` attribute `-gutters:x`.',
|
|
48
|
-
options: [undefined, 0, 1, 2, 3, 4, 5, 6, 7, 'root'],
|
|
49
|
-
table: { defaultValue: { summary: '0' } },
|
|
50
|
-
type: { name: 'number', required: false },
|
|
51
|
-
},
|
|
52
|
-
maxWidth: {
|
|
53
|
-
control: { type: 'text' },
|
|
54
|
-
description: 'Max width. Set by CSS var `--unitone--max-width`.',
|
|
55
|
-
table: { defaultValue: { summary: 'var(--unitone--measure)' } },
|
|
56
|
-
type: { name: 'string', required: false },
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
args: {
|
|
60
|
-
center: false,
|
|
61
|
-
column: false,
|
|
62
|
-
applyGap: false,
|
|
63
|
-
gap: 1,
|
|
64
|
-
gutters: 0,
|
|
65
|
-
maxWidth: 'var(--unitone--measure)',
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const Content = (props) => {
|
|
70
|
-
const headingText =
|
|
71
|
-
'ja' === props.lang
|
|
72
|
-
? 'あともゴーシュ子たり何に向いていまし'
|
|
73
|
-
: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit';
|
|
74
|
-
|
|
75
|
-
const bodyText =
|
|
76
|
-
'ja' === props.lang
|
|
77
|
-
? 'あともゴーシュ子たり何に向いていまし。夜中は次がしばらくと落ちて狸から舞台のようで来でおかげをしからちょろちょろゴーシュを合わせていです。どうかまげて子をこどもに出でしです。それりんに狸がこってボック'
|
|
78
|
-
: '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';
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<>
|
|
82
|
-
<h1>{headingText}</h1>
|
|
83
|
-
<p>{bodyText}</p>
|
|
84
|
-
<p style={{ '--unitone--font-size': 2 }}>{bodyText}</p>
|
|
85
|
-
<p>{bodyText}</p>
|
|
86
|
-
<ul>
|
|
87
|
-
<li>{bodyText}</li>
|
|
88
|
-
<li>{bodyText}</li>
|
|
89
|
-
</ul>
|
|
90
|
-
|
|
91
|
-
<h2>{headingText}</h2>
|
|
92
|
-
<h3>{headingText}</h3>
|
|
93
|
-
<h4>{headingText}</h4>
|
|
94
|
-
<h5>{headingText}</h5>
|
|
95
|
-
<h6>{headingText}</h6>
|
|
96
|
-
<p>{bodyText}</p>
|
|
97
|
-
|
|
98
|
-
<h2>{headingText}</h2>
|
|
99
|
-
<p>{bodyText}</p>
|
|
100
|
-
<p>{bodyText}</p>
|
|
101
|
-
|
|
102
|
-
<h3>{headingText}</h3>
|
|
103
|
-
<p>{bodyText}</p>
|
|
104
|
-
<p>{bodyText}</p>
|
|
105
|
-
|
|
106
|
-
<h4>{headingText}</h4>
|
|
107
|
-
<p>{bodyText}</p>
|
|
108
|
-
<p>{bodyText}</p>
|
|
109
|
-
|
|
110
|
-
<h5>{headingText}</h5>
|
|
111
|
-
<p>{bodyText}</p>
|
|
112
|
-
<p>{bodyText}</p>
|
|
113
|
-
|
|
114
|
-
<h6>{headingText}</h6>
|
|
115
|
-
<p>{bodyText}</p>
|
|
116
|
-
<p>{bodyText}</p>
|
|
117
|
-
</>
|
|
118
|
-
);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const Default = (args) => {
|
|
122
|
-
return (
|
|
123
|
-
<Text {...args}>
|
|
124
|
-
<Content />
|
|
125
|
-
</Text>
|
|
126
|
-
);
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export const ExampleCenter = (args) => {
|
|
130
|
-
return (
|
|
131
|
-
<Text {...args}>
|
|
132
|
-
<Content />
|
|
133
|
-
</Text>
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
ExampleCenter.args = {
|
|
137
|
-
center: true,
|
|
138
|
-
};
|
|
139
|
-
ExampleCenter.storyName = 'Example : Center';
|
|
140
|
-
|
|
141
|
-
export const ExampleJa = (args) => {
|
|
142
|
-
return (
|
|
143
|
-
<Text {...args} style={{ '--unitone--half-leading': 0.4 }}>
|
|
144
|
-
<Content lang="ja" />
|
|
145
|
-
</Text>
|
|
146
|
-
);
|
|
147
|
-
};
|
|
148
|
-
ExampleJa.storyName = 'Example : Ja';
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# Vertical writing
|
|
2
|
-
|
|
3
|
-
Make the text vertically written.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div>
|
|
11
|
-
<div data-unitone-layout="vertical-writing">
|
|
12
|
-
<p>Lorem 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>
|
|
13
|
-
<p>Lorem 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>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### JSX
|
|
19
|
-
|
|
20
|
-
```jsx
|
|
21
|
-
import { VerticalWriting } from '@inc2734/unitone-css';
|
|
22
|
-
|
|
23
|
-
<div>
|
|
24
|
-
<VerticalWriting>
|
|
25
|
-
<p>Lorem 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>
|
|
26
|
-
<p>Lorem 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>
|
|
27
|
-
</VerticalWriting>
|
|
28
|
-
<div>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Props
|
|
32
|
-
|
|
33
|
-
### Rows height
|
|
34
|
-
|
|
35
|
-
Height of each rows.
|
|
36
|
-
|
|
37
|
-
#### HTML
|
|
38
|
-
|
|
39
|
-
```html
|
|
40
|
-
<div>
|
|
41
|
-
<div data-unitone-layout="vertical-writing" style="--unitone--max-height: 20rem">
|
|
42
|
-
...
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### JSX
|
|
48
|
-
|
|
49
|
-
```jsx
|
|
50
|
-
import { VerticalWriting } from '@inc2734/unitone-css';
|
|
51
|
-
|
|
52
|
-
<div>
|
|
53
|
-
<VerticalWriting maxHeight="20rem">
|
|
54
|
-
...
|
|
55
|
-
</VerticalWriting>
|
|
56
|
-
<div>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Gap
|
|
60
|
-
|
|
61
|
-
Gap.
|
|
62
|
-
|
|
63
|
-
#### HTML
|
|
64
|
-
|
|
65
|
-
```html
|
|
66
|
-
<div>
|
|
67
|
-
<div data-unitone-layout="vertical-writing gap:1">
|
|
68
|
-
...
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
#### JSX
|
|
74
|
-
|
|
75
|
-
```jsx
|
|
76
|
-
import { VerticalWriting } from '@inc2734/unitone-css';
|
|
77
|
-
|
|
78
|
-
<div>
|
|
79
|
-
<VerticalWriting gap={1}>
|
|
80
|
-
...
|
|
81
|
-
</VerticalWriting>
|
|
82
|
-
<div>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Text orientation
|
|
86
|
-
|
|
87
|
-
#### HTML
|
|
88
|
-
|
|
89
|
-
```html
|
|
90
|
-
<div>
|
|
91
|
-
<div data-unitone-layout="vertical-writing -text-orientation:mixed">
|
|
92
|
-
...
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
#### JSX
|
|
98
|
-
|
|
99
|
-
```jsx
|
|
100
|
-
import { VerticalWriting } from '@inc2734/unitone-css';
|
|
101
|
-
|
|
102
|
-
<div>
|
|
103
|
-
<VerticalWriting textOrientation="mixed">
|
|
104
|
-
...
|
|
105
|
-
</VerticalWriting>
|
|
106
|
-
<div>
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Switch
|
|
110
|
-
|
|
111
|
-
Switch writing mode when portrait.
|
|
112
|
-
|
|
113
|
-
#### HTML
|
|
114
|
-
|
|
115
|
-
```html
|
|
116
|
-
<div>
|
|
117
|
-
<div data-unitone-layout="vertical-writing -switch">
|
|
118
|
-
...
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
#### JSX
|
|
124
|
-
|
|
125
|
-
```jsx
|
|
126
|
-
import { VerticalWriting } from '@inc2734/unitone-css';
|
|
127
|
-
|
|
128
|
-
<div>
|
|
129
|
-
<VerticalWriting switch>
|
|
130
|
-
...
|
|
131
|
-
</VerticalWriting>
|
|
132
|
-
<div>
|
|
133
|
-
```
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { VerticalWriting } from '../';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Layout Primitives/VerticalWriting',
|
|
8
|
-
component: VerticalWriting,
|
|
9
|
-
parameters: {
|
|
10
|
-
notes: { readme },
|
|
11
|
-
},
|
|
12
|
-
argTypes: {
|
|
13
|
-
gap: {
|
|
14
|
-
control: { type: 'inline-radio' },
|
|
15
|
-
description:
|
|
16
|
-
'Gap. Set by CSS var `--unitone--gap` or `data-unitone-layout` attribute `-gap:x`.',
|
|
17
|
-
options: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7],
|
|
18
|
-
table: { defaultValue: { summary: 'var(--unitone--global--text-gap)' } },
|
|
19
|
-
type: { name: 'number', required: false },
|
|
20
|
-
},
|
|
21
|
-
maxHeight: {
|
|
22
|
-
control: { type: 'text' },
|
|
23
|
-
description: 'Max height of each rows. Set by CSS var `--unitone--max-height`.',
|
|
24
|
-
table: { defaultValue: { summary: 'calc(9 * var(--unitone--measure) / 16)' } },
|
|
25
|
-
type: { name: 'string', required: false },
|
|
26
|
-
},
|
|
27
|
-
textOrientation: {
|
|
28
|
-
control: { type: 'inline-radio' },
|
|
29
|
-
description:
|
|
30
|
-
'Text orientation. Set by `data-unitone-layout` attribute `-text-orientation:x`.',
|
|
31
|
-
options: ['mixed', 'upright', 'sideways'],
|
|
32
|
-
table: { defaultValue: { summary: '' } },
|
|
33
|
-
type: { name: 'string', required: false },
|
|
34
|
-
},
|
|
35
|
-
switchWritingMode: {
|
|
36
|
-
control: { type: 'inline-radio' },
|
|
37
|
-
description: 'When the orientation switches, the `writing-mode` also switches.',
|
|
38
|
-
options: [false, true],
|
|
39
|
-
table: { defaultValue: { summary: false } },
|
|
40
|
-
type: { name: 'boolean', required: false },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
args: {
|
|
44
|
-
gap: 1,
|
|
45
|
-
maxHeight: 'calc(9 * var(--unitone--measure) / 16)',
|
|
46
|
-
textOrientation: 'mixed',
|
|
47
|
-
switchWritingMode: false,
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const Content = (props) => {
|
|
52
|
-
const headingText = 'あともゴーシュ子たり何に向いていまし';
|
|
53
|
-
|
|
54
|
-
const bodyText =
|
|
55
|
-
'あともゴーシュ子たり何に向いていまし。夜中は次がしばらくと落ちて狸から舞台のようで来でおかげをしからちょろちょろゴーシュを合わせていです。どうかまげて子をこどもに出でしです。それりんに狸がこってボック';
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<>
|
|
59
|
-
<h1>{headingText}</h1>
|
|
60
|
-
<p>{bodyText}</p>
|
|
61
|
-
<p style={{ '--unitone--font-size': 2 }}>{bodyText}</p>
|
|
62
|
-
<p>{bodyText}</p>
|
|
63
|
-
<ul>
|
|
64
|
-
<li>{bodyText}</li>
|
|
65
|
-
<li>{bodyText}</li>
|
|
66
|
-
</ul>
|
|
67
|
-
|
|
68
|
-
<h2>{headingText}</h2>
|
|
69
|
-
<h3>{headingText}</h3>
|
|
70
|
-
<h4>{headingText}</h4>
|
|
71
|
-
<h5>{headingText}</h5>
|
|
72
|
-
<h6>{headingText}</h6>
|
|
73
|
-
<p>{bodyText}</p>
|
|
74
|
-
|
|
75
|
-
<h2>{headingText}</h2>
|
|
76
|
-
<p>{bodyText}</p>
|
|
77
|
-
<p>{bodyText}</p>
|
|
78
|
-
|
|
79
|
-
<h3>{headingText}</h3>
|
|
80
|
-
<p>{bodyText}</p>
|
|
81
|
-
<p>{bodyText}</p>
|
|
82
|
-
|
|
83
|
-
<h4>{headingText}</h4>
|
|
84
|
-
<p>{bodyText}</p>
|
|
85
|
-
<p>{bodyText}</p>
|
|
86
|
-
|
|
87
|
-
<h5>{headingText}</h5>
|
|
88
|
-
<p>{bodyText}</p>
|
|
89
|
-
<p>{bodyText}</p>
|
|
90
|
-
|
|
91
|
-
<h6>{headingText}</h6>
|
|
92
|
-
<p>{bodyText}</p>
|
|
93
|
-
<p>{bodyText}</p>
|
|
94
|
-
</>
|
|
95
|
-
);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export const Default = (args) => {
|
|
99
|
-
return (
|
|
100
|
-
<VerticalWriting {...args}>
|
|
101
|
-
<Content />
|
|
102
|
-
</VerticalWriting>
|
|
103
|
-
);
|
|
104
|
-
};
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
# With sidebar
|
|
2
|
-
|
|
3
|
-
Assemble the component with sidebars. If the configured width can no longer be maintained, a single column display will be used.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div data-unitone-layout="with-sidebar">
|
|
11
|
-
<p>Lorem ipsum dolor sit amet</p>
|
|
12
|
-
<ul>
|
|
13
|
-
<li>Lorem</li>
|
|
14
|
-
<li>ipsum</li>
|
|
15
|
-
<li>dolor</li>
|
|
16
|
-
</ul>
|
|
17
|
-
</div>
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### JSX
|
|
21
|
-
|
|
22
|
-
```jsx
|
|
23
|
-
import { WithSidebar } from '@inc2734/unitone-css';
|
|
24
|
-
|
|
25
|
-
<WithSidebar>
|
|
26
|
-
<p>Lorem ipsum dolor sit amet</p>
|
|
27
|
-
<ul>
|
|
28
|
-
<li>Lorem</li>
|
|
29
|
-
<li>ipsum</li>
|
|
30
|
-
<li>dolor</li>
|
|
31
|
-
</ul>
|
|
32
|
-
</WithSidebar>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Props
|
|
36
|
-
|
|
37
|
-
### Sidebar
|
|
38
|
-
|
|
39
|
-
Sets sidebar position. Default is `right`.
|
|
40
|
-
|
|
41
|
-
left / right
|
|
42
|
-
|
|
43
|
-
#### HTML
|
|
44
|
-
|
|
45
|
-
```html
|
|
46
|
-
<div data-unitone-layout="with-sidebar -sidebar:left">
|
|
47
|
-
...
|
|
48
|
-
</div>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
#### JSX
|
|
52
|
-
|
|
53
|
-
```jsx
|
|
54
|
-
import { WithSidebar } from '@inc2734/unitone-css';
|
|
55
|
-
|
|
56
|
-
<WithSidebar sidebar="left">
|
|
57
|
-
...
|
|
58
|
-
</WithSidebar>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Revert
|
|
62
|
-
|
|
63
|
-
The way child elements are displayed is reversed.
|
|
64
|
-
|
|
65
|
-
#### HTML
|
|
66
|
-
|
|
67
|
-
```html
|
|
68
|
-
<div data-unitone-layout="with-sidebar -revert">
|
|
69
|
-
...
|
|
70
|
-
</div>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
#### JSX
|
|
74
|
-
|
|
75
|
-
```jsx
|
|
76
|
-
import { WithSidebar } from '@inc2734/unitone-css';
|
|
77
|
-
|
|
78
|
-
<WithSidebar revert>
|
|
79
|
-
...
|
|
80
|
-
</WithSidebar>
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Content min width
|
|
84
|
-
|
|
85
|
-
Min width of the content.
|
|
86
|
-
|
|
87
|
-
#### HTML
|
|
88
|
-
|
|
89
|
-
```html
|
|
90
|
-
<div data-unitone-layout="with-sidebar" style="--unitone--content-min-width: 500px">
|
|
91
|
-
...
|
|
92
|
-
</div>
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
#### JSX
|
|
96
|
-
|
|
97
|
-
```jsx
|
|
98
|
-
import { WithSidebar } from '@inc2734/unitone-css';
|
|
99
|
-
|
|
100
|
-
<WithSidebar contentMinWidth="500px">
|
|
101
|
-
...
|
|
102
|
-
</WithSidebar>
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Sidebar width
|
|
106
|
-
|
|
107
|
-
Sidebar width.
|
|
108
|
-
|
|
109
|
-
#### HTML
|
|
110
|
-
|
|
111
|
-
```html
|
|
112
|
-
<div data-unitone-layout="with-sidebar" style="--unitone--sidebar-width: 300px">
|
|
113
|
-
...
|
|
114
|
-
</div>
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
#### JSX
|
|
118
|
-
|
|
119
|
-
```jsx
|
|
120
|
-
import { WithSidebar } from '@inc2734/unitone-css';
|
|
121
|
-
|
|
122
|
-
<WithSidebar sidebarWidth="300px">
|
|
123
|
-
...
|
|
124
|
-
</WithSidebar>
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Gap
|
|
128
|
-
|
|
129
|
-
Gap.
|
|
130
|
-
|
|
131
|
-
#### HTML
|
|
132
|
-
|
|
133
|
-
```html
|
|
134
|
-
<ul data-unitone-layout="with-slider -gap:1">
|
|
135
|
-
...
|
|
136
|
-
</ul>
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
#### JSX
|
|
140
|
-
|
|
141
|
-
```jsx
|
|
142
|
-
import { WithSidebar } from '@inc2734/unitone-css';
|
|
143
|
-
|
|
144
|
-
<WithSidebar gap={1}>
|
|
145
|
-
...
|
|
146
|
-
</WithSidebar>
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Align items
|
|
150
|
-
|
|
151
|
-
Alignment of the row direction.
|
|
152
|
-
|
|
153
|
-
#### HTML
|
|
154
|
-
|
|
155
|
-
```html
|
|
156
|
-
<ul data-unitone-layout="with-slider -align-items:center">
|
|
157
|
-
...
|
|
158
|
-
</ul>
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
#### JSX
|
|
162
|
-
|
|
163
|
-
```jsx
|
|
164
|
-
import { WithSidebar } from '@inc2734/unitone-css';
|
|
165
|
-
|
|
166
|
-
<WithSidebar alignItems="center">
|
|
167
|
-
...
|
|
168
|
-
</WithSidebar>
|
|
169
|
-
```
|