@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,307 +0,0 @@
|
|
|
1
|
-
# Layers
|
|
2
|
-
|
|
3
|
-
Elements on top of each other. Layers have a 12 x 7 (7 x 12 in portrait mode) grid, along which child layers can be shifted.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div data-unitone-layout="layers">
|
|
11
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
12
|
-
|
|
13
|
-
<div data-unitone-layout="decorator" style="--unitone--align-self:end">
|
|
14
|
-
Lorem ipsum dolor sit amet
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### JSX
|
|
20
|
-
|
|
21
|
-
```jsx
|
|
22
|
-
import { Layers, Decorator } from '@inc2734/unitone-css';
|
|
23
|
-
|
|
24
|
-
<Layers>
|
|
25
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
26
|
-
|
|
27
|
-
<Decorator style={{ '--unitone--align-self': 'end' }}>
|
|
28
|
-
Lorem ipsum dolor sit amet
|
|
29
|
-
</Decorator>
|
|
30
|
-
</Layers>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Props
|
|
34
|
-
|
|
35
|
-
### Gap
|
|
36
|
-
|
|
37
|
-
Gap.
|
|
38
|
-
|
|
39
|
-
#### HTML
|
|
40
|
-
|
|
41
|
-
```html
|
|
42
|
-
<div data-unitone-layout="layers -gap:1">
|
|
43
|
-
...
|
|
44
|
-
</div>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### JSX
|
|
48
|
-
|
|
49
|
-
```jsx
|
|
50
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
51
|
-
|
|
52
|
-
<Layers gap={1}>
|
|
53
|
-
...
|
|
54
|
-
</Layers>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Min height
|
|
58
|
-
|
|
59
|
-
Min height.
|
|
60
|
-
|
|
61
|
-
#### HTML
|
|
62
|
-
|
|
63
|
-
```html
|
|
64
|
-
<div data-unitone-layout="layers" style="--unitone--min-height: 500px">
|
|
65
|
-
...
|
|
66
|
-
</div>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
#### JSX
|
|
70
|
-
|
|
71
|
-
```jsx
|
|
72
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
73
|
-
|
|
74
|
-
<Layers minHeight="500px">
|
|
75
|
-
...
|
|
76
|
-
</Layers>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Columns
|
|
80
|
-
|
|
81
|
-
Number of columns.
|
|
82
|
-
|
|
83
|
-
#### HTML
|
|
84
|
-
|
|
85
|
-
```html
|
|
86
|
-
<div data-unitone-layout="layers" style="--unitone--columns: 20">
|
|
87
|
-
...
|
|
88
|
-
</div>
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
#### JSX
|
|
92
|
-
|
|
93
|
-
```jsx
|
|
94
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
95
|
-
|
|
96
|
-
<Layers columns="20">
|
|
97
|
-
...
|
|
98
|
-
</Layers>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Rows
|
|
102
|
-
|
|
103
|
-
Number of rows.
|
|
104
|
-
|
|
105
|
-
#### HTML
|
|
106
|
-
|
|
107
|
-
```html
|
|
108
|
-
<div data-unitone-layout="layers" style="--unitone--rows: 20">
|
|
109
|
-
...
|
|
110
|
-
</div>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
#### JSX
|
|
114
|
-
|
|
115
|
-
```jsx
|
|
116
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
117
|
-
|
|
118
|
-
<Layers rows="20">
|
|
119
|
-
...
|
|
120
|
-
</Layers>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Covered image
|
|
124
|
-
|
|
125
|
-
Background image/video is sized to maintain its aspect ratio while filling the element's entire content box. If the object's aspect ratio does not match the aspect ratio of its box, then the object will be clipped to fit.
|
|
126
|
-
|
|
127
|
-
#### HTML
|
|
128
|
-
|
|
129
|
-
```html
|
|
130
|
-
<div data-unitone-layout="layers -cover">
|
|
131
|
-
<img ...>
|
|
132
|
-
|
|
133
|
-
<div>
|
|
134
|
-
...
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
#### JSX
|
|
140
|
-
|
|
141
|
-
```jsx
|
|
142
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
143
|
-
|
|
144
|
-
<Layers cover>
|
|
145
|
-
<img ... />
|
|
146
|
-
|
|
147
|
-
<div>
|
|
148
|
-
...
|
|
149
|
-
</div>
|
|
150
|
-
</Layers>
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Filled image
|
|
154
|
-
|
|
155
|
-
The background image/video is enlarged according to the amount of content.
|
|
156
|
-
|
|
157
|
-
#### HTML
|
|
158
|
-
|
|
159
|
-
```html
|
|
160
|
-
<div data-unitone-layout="layers -fill">
|
|
161
|
-
<img ...>
|
|
162
|
-
|
|
163
|
-
<div>
|
|
164
|
-
...
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
#### JSX
|
|
170
|
-
|
|
171
|
-
```jsx
|
|
172
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
173
|
-
|
|
174
|
-
<Layers fill>
|
|
175
|
-
<img ... />
|
|
176
|
-
|
|
177
|
-
<div>
|
|
178
|
-
...
|
|
179
|
-
</div>
|
|
180
|
-
</Layers>
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### Blur image
|
|
184
|
-
|
|
185
|
-
Blur the background image/video.
|
|
186
|
-
|
|
187
|
-
#### HTML
|
|
188
|
-
|
|
189
|
-
```html
|
|
190
|
-
<div data-unitone-layout="layers -blur" style="--unitone--blur: 100px">
|
|
191
|
-
<img ...>
|
|
192
|
-
|
|
193
|
-
<div>
|
|
194
|
-
...
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
#### JSX
|
|
200
|
-
|
|
201
|
-
```jsx
|
|
202
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
203
|
-
|
|
204
|
-
<Layers blur style={{ '--unitone--blur': '100px' }}>
|
|
205
|
-
<img ... />
|
|
206
|
-
|
|
207
|
-
<div>
|
|
208
|
-
...
|
|
209
|
-
</div>
|
|
210
|
-
</Layers>
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Portrait grid
|
|
214
|
-
|
|
215
|
-
In portrait mode, swaps the height and width of the grid.
|
|
216
|
-
|
|
217
|
-
#### HTML
|
|
218
|
-
|
|
219
|
-
```html
|
|
220
|
-
<div data-unitone-layout="layers -portrait">
|
|
221
|
-
...
|
|
222
|
-
</div>
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
#### JSX
|
|
226
|
-
|
|
227
|
-
```jsx
|
|
228
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
229
|
-
|
|
230
|
-
<Layers portrait>
|
|
231
|
-
...
|
|
232
|
-
</Layers>
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### Mix blend mode
|
|
236
|
-
|
|
237
|
-
You can specify how the elements should look when stacked.
|
|
238
|
-
|
|
239
|
-
#### HTML
|
|
240
|
-
|
|
241
|
-
```html
|
|
242
|
-
<div data-unitone-layout="layers -portrait">
|
|
243
|
-
<img ... />
|
|
244
|
-
|
|
245
|
-
<div style="--unitone--mix-blend-mode: overlay">
|
|
246
|
-
...
|
|
247
|
-
</div>
|
|
248
|
-
</div>
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
#### JSX
|
|
252
|
-
|
|
253
|
-
```jsx
|
|
254
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
255
|
-
|
|
256
|
-
<Layers portrait>
|
|
257
|
-
<img ... />
|
|
258
|
-
|
|
259
|
-
<div style={{ '--unitone--mix-blend-mode': 'overlay' }}>
|
|
260
|
-
...
|
|
261
|
-
</div>
|
|
262
|
-
</Layers>
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### Items position
|
|
266
|
-
|
|
267
|
-
You can set the position of child elements with the associated properties of the CSS grid.
|
|
268
|
-
|
|
269
|
-
#### HTML
|
|
270
|
-
|
|
271
|
-
```html
|
|
272
|
-
<div data-unitone-layout="layers">
|
|
273
|
-
<img ...>
|
|
274
|
-
|
|
275
|
-
<div style="--unitone--alilgn-self: end; --unitone--justify-self: center">
|
|
276
|
-
...
|
|
277
|
-
</div>
|
|
278
|
-
</div>
|
|
279
|
-
|
|
280
|
-
<div data-unitone-layout="layers">
|
|
281
|
-
<img ...>
|
|
282
|
-
|
|
283
|
-
<div style="--unitone--grid-column: 1/-1; --unitone--grid-row: 1/-1">
|
|
284
|
-
...
|
|
285
|
-
</div>
|
|
286
|
-
</div>
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
```jsx
|
|
290
|
-
import { Layers } from '@inc2734/unitone-css';
|
|
291
|
-
|
|
292
|
-
<Layers>
|
|
293
|
-
<img ... />
|
|
294
|
-
|
|
295
|
-
<div style={{ '--unitone--alilgn-self': 'end', '--unitone--justify-self': 'center' }}>
|
|
296
|
-
...
|
|
297
|
-
</div>
|
|
298
|
-
</Layers>
|
|
299
|
-
|
|
300
|
-
<Layers>
|
|
301
|
-
<img ... />
|
|
302
|
-
|
|
303
|
-
<div style={{ '--unitone--grid-column': '1/-1', '--unitone--grid-row': '1/-1' }}>
|
|
304
|
-
...
|
|
305
|
-
</div>
|
|
306
|
-
</Layers>
|
|
307
|
-
```
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Layers } from '../';
|
|
5
|
-
import { Decorator } from '../../decorator';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Layout Primitives/Layers',
|
|
9
|
-
component: Layers,
|
|
10
|
-
parameters: {
|
|
11
|
-
notes: { readme },
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
cover: {
|
|
15
|
-
control: { type: 'inline-radio' },
|
|
16
|
-
description:
|
|
17
|
-
"Background image/video is sized to maintain its aspect ratio while filling the element's entire content box. If the object's aspect ratio does not match the aspect ratio of its box, then the object will be clipped to fit.",
|
|
18
|
-
options: [false, true],
|
|
19
|
-
table: { defaultValue: { summary: false } },
|
|
20
|
-
type: { name: 'boolean', required: false },
|
|
21
|
-
},
|
|
22
|
-
fill: {
|
|
23
|
-
control: { type: 'inline-radio' },
|
|
24
|
-
description: 'The background image/video is enlarged according to the amount of content.',
|
|
25
|
-
options: [false, true],
|
|
26
|
-
table: { defaultValue: { summary: false } },
|
|
27
|
-
type: { name: 'boolean', required: false },
|
|
28
|
-
},
|
|
29
|
-
blur: {
|
|
30
|
-
control: { type: 'inline-radio' },
|
|
31
|
-
description: 'Blur the background image/video.',
|
|
32
|
-
options: [false, true],
|
|
33
|
-
table: { defaultValue: { summary: false } },
|
|
34
|
-
type: { name: 'boolean', required: false },
|
|
35
|
-
},
|
|
36
|
-
portrait: {
|
|
37
|
-
control: { type: 'inline-radio' },
|
|
38
|
-
description: 'In portrait mode, swaps the height and width of the grid.',
|
|
39
|
-
options: [false, true],
|
|
40
|
-
table: { defaultValue: { summary: false } },
|
|
41
|
-
type: { name: 'boolean', required: false },
|
|
42
|
-
},
|
|
43
|
-
gap: {
|
|
44
|
-
control: { type: 'inline-radio' },
|
|
45
|
-
description:
|
|
46
|
-
'Gap. Set by CSS var `--unitone--gap` or `data-unitone-layout` attribute `-gap:x`.',
|
|
47
|
-
options: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7],
|
|
48
|
-
table: { defaultValue: { summary: 'min(3.33333%,var(--unitone--grid-gap))' } },
|
|
49
|
-
type: { name: 'number', required: false },
|
|
50
|
-
},
|
|
51
|
-
minHeight: {
|
|
52
|
-
control: { type: 'text' },
|
|
53
|
-
description: 'Min height. Set by CSS var `--unitone--min-height`.',
|
|
54
|
-
table: { defaultValue: { summary: '0' } },
|
|
55
|
-
type: { name: 'string', required: false },
|
|
56
|
-
},
|
|
57
|
-
columns: {
|
|
58
|
-
control: { type: 'text' },
|
|
59
|
-
description: 'Number of columns. Set by CSS var `--unitone--columns`.',
|
|
60
|
-
table: { defaultValue: { summary: 'var(--unitone--grid-columns)' } },
|
|
61
|
-
type: { name: 'number', required: false },
|
|
62
|
-
},
|
|
63
|
-
rows: {
|
|
64
|
-
control: { type: 'text' },
|
|
65
|
-
description: 'Number of rows. Set by CSS var `--unitone--columns`.',
|
|
66
|
-
table: { defaultValue: { summary: 'var(--unitone--grid-rows)' } },
|
|
67
|
-
type: { name: 'number', required: false },
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
args: {
|
|
71
|
-
cover: false,
|
|
72
|
-
fill: false,
|
|
73
|
-
blur: false,
|
|
74
|
-
portrait: true,
|
|
75
|
-
gap: 'min(3.33333%,var(--unitone--grid-gap))',
|
|
76
|
-
minHeight: '0',
|
|
77
|
-
columns: 'var(--unitone--grid-columns)',
|
|
78
|
-
rows: 'var(--unitone--grid-rows)',
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export const Default = (args) => {
|
|
83
|
-
return (
|
|
84
|
-
<Layers {...args}>
|
|
85
|
-
<img src="https://placehold.jp/600x400.jpg" alt="" />
|
|
86
|
-
<Decorator style={{ '--unitone--align-self': 'end' }} padding={1} position="relative">
|
|
87
|
-
Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
88
|
-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
89
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
|
|
90
|
-
irure dolor in reprehenderit in voluptate velit esse cillLorem ipsum dolor sit amet,
|
|
91
|
-
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
|
|
92
|
-
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
|
93
|
-
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
94
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
|
|
95
|
-
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
|
|
96
|
-
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
97
|
-
voluptate velit esse cillLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
98
|
-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
99
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
|
|
100
|
-
irure dolor in reprehenderit in voluptate velit esse cill
|
|
101
|
-
</Decorator>
|
|
102
|
-
</Layers>
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export const ExamplePicture = (args) => {
|
|
107
|
-
return (
|
|
108
|
-
<Layers {...args}>
|
|
109
|
-
<picture>
|
|
110
|
-
<img src="https://placehold.jp/600x400.jpg" alt="" />
|
|
111
|
-
</picture>
|
|
112
|
-
<Decorator style={{ '--unitone--align-self': 'end' }} padding={1} position="relative">
|
|
113
|
-
Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
114
|
-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
115
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
|
|
116
|
-
irure dolor in reprehenderit in voluptate velit esse cillLorem ipsum dolor sit amet,
|
|
117
|
-
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
|
|
118
|
-
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
|
119
|
-
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
120
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
|
|
121
|
-
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
|
|
122
|
-
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
123
|
-
voluptate velit esse cillLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
124
|
-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
125
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
|
|
126
|
-
irure dolor in reprehenderit in voluptate velit esse cill
|
|
127
|
-
</Decorator>
|
|
128
|
-
</Layers>
|
|
129
|
-
);
|
|
130
|
-
};
|
|
131
|
-
ExamplePicture.storyName = 'Example : picture';
|
|
132
|
-
|
|
133
|
-
export const ExampleFigure = (args) => {
|
|
134
|
-
return (
|
|
135
|
-
<Layers {...args}>
|
|
136
|
-
<figure>
|
|
137
|
-
<img src="https://placehold.jp/600x400.jpg" alt="" />
|
|
138
|
-
</figure>
|
|
139
|
-
<Decorator style={{ '--unitone--align-self': 'end' }} padding={1} position="relative">
|
|
140
|
-
Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
141
|
-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
142
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
|
|
143
|
-
irure dolor in reprehenderit in voluptate velit esse cillLorem ipsum dolor sit amet,
|
|
144
|
-
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
|
|
145
|
-
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
|
146
|
-
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
147
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
|
|
148
|
-
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
|
|
149
|
-
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
150
|
-
voluptate velit esse cillLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
151
|
-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
152
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
|
|
153
|
-
irure dolor in reprehenderit in voluptate velit esse cill
|
|
154
|
-
</Decorator>
|
|
155
|
-
</Layers>
|
|
156
|
-
);
|
|
157
|
-
};
|
|
158
|
-
ExampleFigure.storyName = 'Example : figure';
|
|
159
|
-
|
|
160
|
-
export const ExampleFigurePicture = (args) => {
|
|
161
|
-
return (
|
|
162
|
-
<Layers {...args}>
|
|
163
|
-
<figure>
|
|
164
|
-
<picture>
|
|
165
|
-
<img src="https://placehold.jp/600x400.jpg" alt="" />
|
|
166
|
-
</picture>
|
|
167
|
-
</figure>
|
|
168
|
-
<Decorator style={{ '--unitone--align-self': 'end' }} padding={1} position="relative">
|
|
169
|
-
Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
170
|
-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
171
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
|
|
172
|
-
irure dolor in reprehenderit in voluptate velit esse cillLorem ipsum dolor sit amet,
|
|
173
|
-
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
|
|
174
|
-
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
|
175
|
-
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
176
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
|
|
177
|
-
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
|
|
178
|
-
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
|
|
179
|
-
voluptate velit esse cillLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
180
|
-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
181
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
|
|
182
|
-
irure dolor in reprehenderit in voluptate velit esse cill
|
|
183
|
-
</Decorator>
|
|
184
|
-
</Layers>
|
|
185
|
-
);
|
|
186
|
-
};
|
|
187
|
-
ExampleFigurePicture.storyName = 'Example : figure > picture';
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# Reel
|
|
2
|
-
|
|
3
|
-
Displays child elements in a simple horizontal scroll.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div data-unitone-layout="reel">
|
|
11
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
12
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
13
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
14
|
-
</div>
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### JSX
|
|
18
|
-
|
|
19
|
-
```jsx
|
|
20
|
-
import { Reel } from '@inc2734/unitone-css';
|
|
21
|
-
|
|
22
|
-
<Reel>
|
|
23
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
24
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
25
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
26
|
-
</Reel>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Props
|
|
30
|
-
|
|
31
|
-
### No bar
|
|
32
|
-
|
|
33
|
-
Hide bar.
|
|
34
|
-
|
|
35
|
-
#### HTML
|
|
36
|
-
|
|
37
|
-
```html
|
|
38
|
-
<div data-unitone-layout="reel -no-bar">
|
|
39
|
-
...
|
|
40
|
-
</div>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
#### JSX
|
|
44
|
-
|
|
45
|
-
```jsx
|
|
46
|
-
import { Reel } from '@inc2734/unitone-css';
|
|
47
|
-
|
|
48
|
-
<Reel noBar>
|
|
49
|
-
...
|
|
50
|
-
</Reel>
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Gap
|
|
54
|
-
|
|
55
|
-
Gap.
|
|
56
|
-
|
|
57
|
-
#### HTML
|
|
58
|
-
|
|
59
|
-
```html
|
|
60
|
-
<div data-unitone-layout="reel -gap:1">
|
|
61
|
-
...
|
|
62
|
-
</div>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
#### JSX
|
|
66
|
-
|
|
67
|
-
```jsx
|
|
68
|
-
import { Reel } from '@inc2734/unitone-css';
|
|
69
|
-
|
|
70
|
-
<Reel gap={1}>
|
|
71
|
-
...
|
|
72
|
-
</Reel>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Height
|
|
76
|
-
|
|
77
|
-
Height.
|
|
78
|
-
|
|
79
|
-
#### HTML
|
|
80
|
-
|
|
81
|
-
```html
|
|
82
|
-
<div data-unitone-layout="reel" style="--unitone--height: 250px">
|
|
83
|
-
...
|
|
84
|
-
</div>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
#### JSX
|
|
88
|
-
|
|
89
|
-
```jsx
|
|
90
|
-
import { Reel } from '@inc2734/unitone-css';
|
|
91
|
-
|
|
92
|
-
<Reel height="250px">
|
|
93
|
-
...
|
|
94
|
-
</Reel>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Items width
|
|
98
|
-
|
|
99
|
-
#### HTML
|
|
100
|
-
|
|
101
|
-
```html
|
|
102
|
-
<div data-unitone-layout="reel" style="--unitone--item-width: 250px">
|
|
103
|
-
...
|
|
104
|
-
</div>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
#### JSX
|
|
108
|
-
|
|
109
|
-
```jsx
|
|
110
|
-
import { Reel } from '@inc2734/unitone-css';
|
|
111
|
-
|
|
112
|
-
<Reel itemWidth="250px">
|
|
113
|
-
...
|
|
114
|
-
</Reel>
|
|
115
|
-
```
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import readme from '../README.md';
|
|
3
|
-
|
|
4
|
-
import { Reel } from '../';
|
|
5
|
-
import { Decorator } from '../../decorator';
|
|
6
|
-
import { Stack } from '../../stack';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Layout Primitives/Reel',
|
|
10
|
-
component: Reel,
|
|
11
|
-
parameters: {
|
|
12
|
-
notes: { readme },
|
|
13
|
-
},
|
|
14
|
-
argTypes: {
|
|
15
|
-
gap: {
|
|
16
|
-
control: { type: 'inline-radio' },
|
|
17
|
-
description:
|
|
18
|
-
'Gap. Set by CSS var `--unitone--gap` or `data-unitone-layout` attribute `-gap:x`.',
|
|
19
|
-
options: [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7],
|
|
20
|
-
table: { defaultValue: { summary: 'var(--unitone--global--gap)' } },
|
|
21
|
-
type: { name: 'number', required: false },
|
|
22
|
-
},
|
|
23
|
-
height: {
|
|
24
|
-
control: { type: 'text' },
|
|
25
|
-
description: 'Height. Set by CSS var `--unitone--height`.',
|
|
26
|
-
table: { defaultValue: { summary: 'auto' } },
|
|
27
|
-
type: { name: 'string', required: false },
|
|
28
|
-
},
|
|
29
|
-
itemWidth: {
|
|
30
|
-
control: { type: 'text' },
|
|
31
|
-
description: 'Each items width. Set by CSS var `--unitone--item-width`.',
|
|
32
|
-
table: { defaultValue: { summary: 'calc(var(--unitone--measure) / 2)' } },
|
|
33
|
-
type: { name: 'string', required: false },
|
|
34
|
-
},
|
|
35
|
-
noBar: {
|
|
36
|
-
control: { type: 'inline-radio' },
|
|
37
|
-
description: 'Remove scrollbar.',
|
|
38
|
-
options: [false, true],
|
|
39
|
-
table: { defaultValue: { summary: 'false' } },
|
|
40
|
-
type: { name: 'boolean', required: false },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
args: {
|
|
44
|
-
gap: 2,
|
|
45
|
-
height: 'auto',
|
|
46
|
-
itemWidth: 'calc(var(--unitone--measure) / 2)',
|
|
47
|
-
noBar: false,
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const Default = (args) => {
|
|
52
|
-
return (
|
|
53
|
-
<Reel {...args}>
|
|
54
|
-
<Decorator backgroundColor="#eee" padding={1}>
|
|
55
|
-
<Stack>
|
|
56
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
57
|
-
<p>Lorem ipsum dolor sit amet</p>
|
|
58
|
-
</Stack>
|
|
59
|
-
</Decorator>
|
|
60
|
-
<Decorator backgroundColor="#eee" padding={1}>
|
|
61
|
-
<Stack>
|
|
62
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
63
|
-
<p>consectetur adipisicing elit</p>
|
|
64
|
-
</Stack>
|
|
65
|
-
</Decorator>
|
|
66
|
-
<Decorator backgroundColor="#eee" padding={1}>
|
|
67
|
-
<Stack>
|
|
68
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
69
|
-
<p>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>
|
|
70
|
-
</Stack>
|
|
71
|
-
</Decorator>
|
|
72
|
-
<Decorator backgroundColor="#eee" padding={1}>
|
|
73
|
-
<Stack>
|
|
74
|
-
<img src="https://placehold.jp/400x300.jpg" alt="" />
|
|
75
|
-
<p>Ut enim ad minim veniam</p>
|
|
76
|
-
</Stack>
|
|
77
|
-
</Decorator>
|
|
78
|
-
</Reel>
|
|
79
|
-
);
|
|
80
|
-
};
|