@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,198 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Decorator } from '../';
|
|
5
|
-
import { Stack } from '../../stack';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Layout Primitives/Decorator',
|
|
9
|
-
component: Decorator,
|
|
10
|
-
parameters: {
|
|
11
|
-
notes: { readme },
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
backgroundColor: {
|
|
15
|
-
control: { type: 'color' },
|
|
16
|
-
description: 'Background color. Set by CSS var `--unitone--background-color`.',
|
|
17
|
-
table: { defaultValue: { summary: 'transparent' } },
|
|
18
|
-
type: { name: 'string', required: false },
|
|
19
|
-
},
|
|
20
|
-
borderColor: {
|
|
21
|
-
control: { type: 'color' },
|
|
22
|
-
description: 'Border color. Set by CSS var `--unitone--border-color`.',
|
|
23
|
-
table: { defaultValue: { summary: 'transparent' } },
|
|
24
|
-
type: { name: 'string', required: false },
|
|
25
|
-
},
|
|
26
|
-
borderRadius: {
|
|
27
|
-
control: { type: 'text' },
|
|
28
|
-
description: 'Border radius. Set by CSS var `--unitone--border-radius`.',
|
|
29
|
-
table: { defaultValue: { summary: '0' } },
|
|
30
|
-
type: { name: 'string', required: false },
|
|
31
|
-
},
|
|
32
|
-
borderWidth: {
|
|
33
|
-
control: { type: 'text' },
|
|
34
|
-
description: 'Border width. Set by CSS var `--unitone--border-width`.',
|
|
35
|
-
table: { defaultValue: { summary: '0' } },
|
|
36
|
-
type: { name: 'string', required: false },
|
|
37
|
-
},
|
|
38
|
-
color: {
|
|
39
|
-
control: { type: 'color' },
|
|
40
|
-
description: 'Text color. Set by CSS var `--unitone--color`.',
|
|
41
|
-
table: { defaultValue: { summary: 'inherit' } },
|
|
42
|
-
type: { name: 'string', required: false },
|
|
43
|
-
},
|
|
44
|
-
padding: {
|
|
45
|
-
control: { type: 'inline-radio' },
|
|
46
|
-
description:
|
|
47
|
-
'Padding. Set by CSS var `--unitone--padding` or `data-unitone-layout` attribute `-padding:x`.',
|
|
48
|
-
options: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7],
|
|
49
|
-
table: { defaultValue: { summary: '0px' } },
|
|
50
|
-
type: { name: 'number', required: false },
|
|
51
|
-
},
|
|
52
|
-
shadow: {
|
|
53
|
-
control: { type: 'inline-radio' },
|
|
54
|
-
description: 'With `box-shadow`.',
|
|
55
|
-
options: [false, true],
|
|
56
|
-
table: { defaultValue: { summary: false } },
|
|
57
|
-
type: { name: 'boolean', required: false },
|
|
58
|
-
},
|
|
59
|
-
position: {
|
|
60
|
-
control: { type: 'inline-radio' },
|
|
61
|
-
description: 'The position value.',
|
|
62
|
-
options: ['static', 'relative', 'absolute', 'sticky', 'fixed'],
|
|
63
|
-
table: { defaultValue: { summary: 'static' } },
|
|
64
|
-
type: { name: 'string', required: false },
|
|
65
|
-
},
|
|
66
|
-
top: {
|
|
67
|
-
control: { type: 'text' },
|
|
68
|
-
description: 'Offset top.',
|
|
69
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
70
|
-
type: { name: 'string', required: false },
|
|
71
|
-
},
|
|
72
|
-
right: {
|
|
73
|
-
control: { type: 'text' },
|
|
74
|
-
description: 'Offset right.',
|
|
75
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
76
|
-
type: { name: 'string', required: false },
|
|
77
|
-
},
|
|
78
|
-
bottom: {
|
|
79
|
-
control: { type: 'text' },
|
|
80
|
-
description: 'Offset bottom.',
|
|
81
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
82
|
-
type: { name: 'string', required: false },
|
|
83
|
-
},
|
|
84
|
-
left: {
|
|
85
|
-
control: { type: 'text' },
|
|
86
|
-
description: 'Offset left.',
|
|
87
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
88
|
-
type: { name: 'string', required: false },
|
|
89
|
-
},
|
|
90
|
-
zIndex: {
|
|
91
|
-
control: { type: 'text' },
|
|
92
|
-
description: 'z-index.',
|
|
93
|
-
table: { defaultValue: { summary: 'initial' } },
|
|
94
|
-
type: { name: 'string', required: false },
|
|
95
|
-
},
|
|
96
|
-
overflow: {
|
|
97
|
-
control: { type: 'inline-radio' },
|
|
98
|
-
description: 'The overflow value.',
|
|
99
|
-
options: ['visible', 'hidden', 'scroll'],
|
|
100
|
-
table: { defaultValue: { summary: 'visible' } },
|
|
101
|
-
type: { name: 'string', required: false },
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
args: {
|
|
105
|
-
backgroundColor: 'transarent',
|
|
106
|
-
borderColor: 'transparent',
|
|
107
|
-
borderRadius: '0px',
|
|
108
|
-
borderWidth: '0px',
|
|
109
|
-
color: 'initial',
|
|
110
|
-
padding: 0,
|
|
111
|
-
shadow: false,
|
|
112
|
-
position: 'static',
|
|
113
|
-
top: 'initial',
|
|
114
|
-
right: 'initial',
|
|
115
|
-
bottom: 'initial',
|
|
116
|
-
left: 'initial',
|
|
117
|
-
zIndex: 'initial',
|
|
118
|
-
overflow: 'visible',
|
|
119
|
-
},
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
const content =
|
|
123
|
-
'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';
|
|
124
|
-
|
|
125
|
-
export const Default = (args) => {
|
|
126
|
-
return (
|
|
127
|
-
<Decorator {...args}>
|
|
128
|
-
<p>{content}</p>
|
|
129
|
-
</Decorator>
|
|
130
|
-
);
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export const ExampleShadow = (args) => {
|
|
134
|
-
return (
|
|
135
|
-
<Decorator {...args}>
|
|
136
|
-
<p>{content}</p>
|
|
137
|
-
</Decorator>
|
|
138
|
-
);
|
|
139
|
-
};
|
|
140
|
-
ExampleShadow.storyName = 'Example : Shadow';
|
|
141
|
-
ExampleShadow.argTypes = {
|
|
142
|
-
shadow: { table: { disable: true } },
|
|
143
|
-
};
|
|
144
|
-
ExampleShadow.args = {
|
|
145
|
-
padding: 1,
|
|
146
|
-
shadow: true,
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export const ExampleCombobox = (args) => {
|
|
150
|
-
return (
|
|
151
|
-
<Decorator borderWidth={args.borderWidth} borderColor={args.backgroundColor}>
|
|
152
|
-
<Decorator
|
|
153
|
-
padding={args.padding}
|
|
154
|
-
backgroundColor={args.backgroundColor}
|
|
155
|
-
color="var(--unitone--color--white)"
|
|
156
|
-
>
|
|
157
|
-
Combo Box
|
|
158
|
-
</Decorator>
|
|
159
|
-
<Decorator padding={args.padding}>
|
|
160
|
-
<p>{content}</p>
|
|
161
|
-
</Decorator>
|
|
162
|
-
</Decorator>
|
|
163
|
-
);
|
|
164
|
-
};
|
|
165
|
-
ExampleCombobox.storyName = 'Example : Combobox';
|
|
166
|
-
ExampleCombobox.argTypes = {
|
|
167
|
-
color: { table: { disable: true } },
|
|
168
|
-
borderColor: { table: { disable: true } },
|
|
169
|
-
};
|
|
170
|
-
ExampleCombobox.args = {
|
|
171
|
-
padding: -1,
|
|
172
|
-
backgroundColor: '#000',
|
|
173
|
-
borderWidth: '1px',
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export const ExamplePosition = (args) => {
|
|
177
|
-
return (
|
|
178
|
-
<Decorator position="relative">
|
|
179
|
-
<Stack>
|
|
180
|
-
<Decorator backgroundColor="#000" color="#fff" padding={1}>
|
|
181
|
-
{content}
|
|
182
|
-
</Decorator>
|
|
183
|
-
<Decorator {...args}>{content}</Decorator>
|
|
184
|
-
<Decorator backgroundColor="#000" color="#fff" padding={1}>
|
|
185
|
-
{content}
|
|
186
|
-
</Decorator>
|
|
187
|
-
</Stack>
|
|
188
|
-
</Decorator>
|
|
189
|
-
);
|
|
190
|
-
};
|
|
191
|
-
ExamplePosition.storyName = 'Example : Position';
|
|
192
|
-
ExamplePosition.args = {
|
|
193
|
-
padding: -1,
|
|
194
|
-
borderWidth: '1px',
|
|
195
|
-
backgroundColor: 'rgba(255, 0, 0, .7)',
|
|
196
|
-
position: 'absolute',
|
|
197
|
-
top: '100px',
|
|
198
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# Float
|
|
2
|
-
|
|
3
|
-
## Usage
|
|
4
|
-
|
|
5
|
-
### HTML
|
|
6
|
-
|
|
7
|
-
```html
|
|
8
|
-
<div data-unitone-layout="float">
|
|
9
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
10
|
-
</div>
|
|
11
|
-
<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>
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### JSX
|
|
15
|
-
|
|
16
|
-
```jsx
|
|
17
|
-
import { Float } from '@inc2734/unitone-css';
|
|
18
|
-
|
|
19
|
-
<Float>
|
|
20
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
21
|
-
</Float>
|
|
22
|
-
<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>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
### Position
|
|
28
|
-
|
|
29
|
-
Change floating position.
|
|
30
|
-
|
|
31
|
-
left / right
|
|
32
|
-
|
|
33
|
-
#### HTML
|
|
34
|
-
|
|
35
|
-
```html
|
|
36
|
-
<div data-unitone-layout="float -right">
|
|
37
|
-
...
|
|
38
|
-
</div>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
#### JSX
|
|
42
|
-
|
|
43
|
-
```jsx
|
|
44
|
-
import { Float } from '@inc2734/unitone-css';
|
|
45
|
-
|
|
46
|
-
<Float position="right">
|
|
47
|
-
...
|
|
48
|
-
</Float>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Gap
|
|
52
|
-
|
|
53
|
-
Gap.
|
|
54
|
-
|
|
55
|
-
#### HTML
|
|
56
|
-
|
|
57
|
-
```html
|
|
58
|
-
<div data-unitone-layout="float -gap:1">
|
|
59
|
-
...
|
|
60
|
-
</div>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
#### JSX
|
|
64
|
-
|
|
65
|
-
```jsx
|
|
66
|
-
import { Float } from '@inc2734/unitone-css';
|
|
67
|
-
|
|
68
|
-
<Float gap={1}>
|
|
69
|
-
...
|
|
70
|
-
</Float>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Min width
|
|
74
|
-
|
|
75
|
-
Min width of the floating item.
|
|
76
|
-
|
|
77
|
-
#### HTML
|
|
78
|
-
|
|
79
|
-
```html
|
|
80
|
-
<div data-unitone-layout="float" style="--unitone--min-width: 500px">
|
|
81
|
-
...
|
|
82
|
-
</div>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
#### JSX
|
|
86
|
-
|
|
87
|
-
```jsx
|
|
88
|
-
import { Float } from '@inc2734/unitone-css';
|
|
89
|
-
|
|
90
|
-
<Float minWidth="500px">
|
|
91
|
-
...
|
|
92
|
-
</Float>
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Min measure.
|
|
96
|
-
|
|
97
|
-
Min width of the item following the floating item.
|
|
98
|
-
|
|
99
|
-
#### HTML
|
|
100
|
-
|
|
101
|
-
```html
|
|
102
|
-
<div data-unitone-layout="float" style="--unitone--min-measure: 500px">
|
|
103
|
-
...
|
|
104
|
-
</div>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
#### JSX
|
|
108
|
-
|
|
109
|
-
```jsx
|
|
110
|
-
import { Float } from '@inc2734/unitone-css';
|
|
111
|
-
|
|
112
|
-
<Float minMeasure="500px">
|
|
113
|
-
...
|
|
114
|
-
</Float>
|
|
115
|
-
```
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Float } from '../';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Layout Primitives/Float',
|
|
8
|
-
component: Float,
|
|
9
|
-
parameters: {
|
|
10
|
-
notes: { readme },
|
|
11
|
-
},
|
|
12
|
-
argTypes: {
|
|
13
|
-
gap: {
|
|
14
|
-
control: { type: 'inline-radio' },
|
|
15
|
-
description:
|
|
16
|
-
'Gap between items. 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--gap)' } },
|
|
19
|
-
type: { name: 'number', required: false },
|
|
20
|
-
},
|
|
21
|
-
minMeasure: {
|
|
22
|
-
control: { type: 'text' },
|
|
23
|
-
description:
|
|
24
|
-
'Min width of the item following the floating item. Set by CSS var `--unitone--min-measure`.',
|
|
25
|
-
table: { defaultValue: { summary: 'calc(var(--unitone--measure) / 2)' } },
|
|
26
|
-
type: { name: 'string', required: false },
|
|
27
|
-
},
|
|
28
|
-
minWidth: {
|
|
29
|
-
control: { type: 'text' },
|
|
30
|
-
description: 'Min width of the floating item. Set by CSS var `--unitone--min-width`.',
|
|
31
|
-
table: { defaultValue: { summary: 'calc(var(--unitone--measure) / 2)' } },
|
|
32
|
-
type: { name: 'string', required: false },
|
|
33
|
-
},
|
|
34
|
-
position: {
|
|
35
|
-
control: { type: 'inline-radio' },
|
|
36
|
-
description:
|
|
37
|
-
'The floating item position. Set by `data-unitone-layout` attribute `-right` or `-left`.',
|
|
38
|
-
options: ['left', 'right'],
|
|
39
|
-
table: { defaultValue: { summary: 'left' } },
|
|
40
|
-
type: { name: 'string', required: false },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
args: {
|
|
44
|
-
gap: 2,
|
|
45
|
-
minMeasure: 'calc(var(--unitone--measure) / 2)',
|
|
46
|
-
minWidth: 'calc(var(--unitone--measure) / 2)',
|
|
47
|
-
position: 'left',
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const content =
|
|
52
|
-
'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';
|
|
53
|
-
|
|
54
|
-
export const Default = (args) => {
|
|
55
|
-
return (
|
|
56
|
-
<>
|
|
57
|
-
<Float {...args}>
|
|
58
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
59
|
-
</Float>
|
|
60
|
-
<p>{content}</p>
|
|
61
|
-
</>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const ExampleRight = (args) => {
|
|
66
|
-
return (
|
|
67
|
-
<>
|
|
68
|
-
<Float {...args}>
|
|
69
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
70
|
-
</Float>
|
|
71
|
-
<p>{content}</p>
|
|
72
|
-
</>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
ExampleRight.storyName = 'Example : Right';
|
|
76
|
-
ExampleRight.args = {
|
|
77
|
-
position: 'right',
|
|
78
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Frame
|
|
2
|
-
|
|
3
|
-
## Usage
|
|
4
|
-
|
|
5
|
-
### HTML
|
|
6
|
-
|
|
7
|
-
```html
|
|
8
|
-
<div data-unitone-layout="frame">
|
|
9
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
10
|
-
</div>
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### JSX
|
|
14
|
-
|
|
15
|
-
```jsx
|
|
16
|
-
import { Frame } from '@inc2734/unitone-css';
|
|
17
|
-
|
|
18
|
-
<Frame>
|
|
19
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
20
|
-
</Frame>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Props
|
|
24
|
-
|
|
25
|
-
### Ratio
|
|
26
|
-
|
|
27
|
-
Aspect ratio.
|
|
28
|
-
|
|
29
|
-
#### HTML
|
|
30
|
-
|
|
31
|
-
```html
|
|
32
|
-
<div data-unitone-layout="frame" style="--unitone--aspect-ratio: 16/9">
|
|
33
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
34
|
-
</div>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
#### JSX
|
|
38
|
-
|
|
39
|
-
```jsx
|
|
40
|
-
import { Frame } from '@inc2734/unitone-css';
|
|
41
|
-
|
|
42
|
-
<Frame aspectRatio="16/9">
|
|
43
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
44
|
-
</Frame>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Switch
|
|
48
|
-
|
|
49
|
-
Switch aspect ratio when portrait.
|
|
50
|
-
|
|
51
|
-
#### HTML
|
|
52
|
-
|
|
53
|
-
```html
|
|
54
|
-
<div data-unitone-layout="frame -switch">
|
|
55
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
56
|
-
</div>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
#### JSX
|
|
60
|
-
|
|
61
|
-
```jsx
|
|
62
|
-
import { Frame } from '@inc2734/unitone-css';
|
|
63
|
-
|
|
64
|
-
<Frame switch>
|
|
65
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
66
|
-
</Frame>
|
|
67
|
-
```
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Frame } from '../';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Layout Primitives/Frame',
|
|
8
|
-
component: Frame,
|
|
9
|
-
parameters: {
|
|
10
|
-
notes: { readme },
|
|
11
|
-
},
|
|
12
|
-
argTypes: {
|
|
13
|
-
ratio: {
|
|
14
|
-
control: { type: 'text' },
|
|
15
|
-
description: 'Aspect ratio. Set by CSS var `--unitone--ratio`.',
|
|
16
|
-
table: { defaultValue: { summary: '16/9' } },
|
|
17
|
-
type: { name: 'string', required: false },
|
|
18
|
-
},
|
|
19
|
-
switchRatio: {
|
|
20
|
-
control: { type: 'inline-radio' },
|
|
21
|
-
description: 'When the orientation switches, the `--unitone--ratio` also switches.',
|
|
22
|
-
options: [false, true],
|
|
23
|
-
table: { defaultValue: { summary: false } },
|
|
24
|
-
type: { name: 'boolean', required: false },
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
args: {
|
|
28
|
-
ratio: '16/9',
|
|
29
|
-
switchRatio: false,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const Default = (args) => {
|
|
34
|
-
return (
|
|
35
|
-
<Frame {...args}>
|
|
36
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
37
|
-
</Frame>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const Switch = (args) => {
|
|
42
|
-
return (
|
|
43
|
-
<Frame {...args}>
|
|
44
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
45
|
-
</Frame>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
Switch.args = {
|
|
49
|
-
switchRatio: true,
|
|
50
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Gutters
|
|
2
|
-
|
|
3
|
-
Separate content with top and bottom padding.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div data-unitone-layout="gutters">
|
|
11
|
-
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
|
|
12
|
-
</div>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### JSX
|
|
16
|
-
|
|
17
|
-
```jsx
|
|
18
|
-
import { Gutters } from '@inc2734/unitone-css';
|
|
19
|
-
|
|
20
|
-
<Gutters>
|
|
21
|
-
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
|
|
22
|
-
</Gutters>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
### Padding
|
|
28
|
-
|
|
29
|
-
Top and bottom padding.
|
|
30
|
-
|
|
31
|
-
#### HTML
|
|
32
|
-
|
|
33
|
-
```html
|
|
34
|
-
<div data-unitone-layout="section -padding:1">
|
|
35
|
-
...
|
|
36
|
-
</div>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
#### JSX
|
|
40
|
-
|
|
41
|
-
```jsx
|
|
42
|
-
import { Gutters } from '@inc2734/unitone-css';
|
|
43
|
-
|
|
44
|
-
<Gutters padding={1}>
|
|
45
|
-
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
|
|
46
|
-
</Gutters>
|
|
47
|
-
```
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Gutters } from '../';
|
|
5
|
-
import { Center } from '../../center';
|
|
6
|
-
import { Container } from '../../container';
|
|
7
|
-
import { Stack } from '../../stack';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Layout Primitives/Gutters',
|
|
11
|
-
component: Gutters,
|
|
12
|
-
parameters: {
|
|
13
|
-
notes: { readme },
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
padding: {
|
|
17
|
-
control: { type: 'inline-radio' },
|
|
18
|
-
description:
|
|
19
|
-
'Top and bottom padding. Set by CSS var `--unitone--padding` or `data-unitone-layout` attribute `-padding:x`.',
|
|
20
|
-
options: [1, 2, 3, 4, 5, 6, 7],
|
|
21
|
-
table: { defaultValue: { summary: 'var(--unitone--s4)' } },
|
|
22
|
-
type: { name: 'number', required: false },
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
args: {
|
|
26
|
-
padding: 4,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Default = (args) => {
|
|
31
|
-
return (
|
|
32
|
-
<Gutters {...args}>
|
|
33
|
-
<Container>
|
|
34
|
-
<Stack gap={3}>
|
|
35
|
-
<Center>
|
|
36
|
-
<h2 style={{ '--unitone--font-size': 2 }}>Lorem ipsum dolor sit amet</h2>
|
|
37
|
-
</Center>
|
|
38
|
-
<p>
|
|
39
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
|
|
40
|
-
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
|
|
41
|
-
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
42
|
-
dolor in reprehenderit in voluptate velit esse cill
|
|
43
|
-
</p>
|
|
44
|
-
</Stack>
|
|
45
|
-
</Container>
|
|
46
|
-
</Gutters>
|
|
47
|
-
);
|
|
48
|
-
};
|