@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,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
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# Responsive grid
|
|
2
|
-
|
|
3
|
-
Generates a simple grid.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
### HTML
|
|
8
|
-
|
|
9
|
-
```html
|
|
10
|
-
<div data-unitone-layout="responsive-grid">
|
|
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 { ResponsiveGrid } from '@inc2734/unitone-css';
|
|
21
|
-
|
|
22
|
-
<ResponsiveGrid>
|
|
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
|
-
</ResponsiveGrid>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Props
|
|
30
|
-
|
|
31
|
-
### Gap
|
|
32
|
-
|
|
33
|
-
Gap.
|
|
34
|
-
|
|
35
|
-
#### HTML
|
|
36
|
-
|
|
37
|
-
```html
|
|
38
|
-
<div data-unitone-layout="responsive-grid -gap:1">
|
|
39
|
-
...
|
|
40
|
-
</div>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
#### JSX
|
|
44
|
-
|
|
45
|
-
```jsx
|
|
46
|
-
import { ResponsiveGrid } from '@inc2734/unitone-css';
|
|
47
|
-
|
|
48
|
-
<ResponsiveGrid gap={1}>
|
|
49
|
-
...
|
|
50
|
-
</ResponsiveGrid>
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Auto repeat
|
|
54
|
-
|
|
55
|
-
auto-fill / auto-fit for grid items.
|
|
56
|
-
|
|
57
|
-
#### HTML
|
|
58
|
-
|
|
59
|
-
```html
|
|
60
|
-
<div data-unitone-layout="responsive-grid -auto-repeat:auto-fit">
|
|
61
|
-
...
|
|
62
|
-
</div>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
#### JSX
|
|
66
|
-
|
|
67
|
-
```jsx
|
|
68
|
-
import { ResponsiveGrid } from '@inc2734/unitone-css';
|
|
69
|
-
|
|
70
|
-
<ResponsiveGrid autoRepeat="auto-fit">
|
|
71
|
-
...
|
|
72
|
-
</ResponsiveGrid>
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Columns min width.
|
|
76
|
-
|
|
77
|
-
Min width of each columns.
|
|
78
|
-
|
|
79
|
-
#### HTML
|
|
80
|
-
|
|
81
|
-
```html
|
|
82
|
-
<div data-unitone-layout="responsive-grid" style="--unitone--column-min-width: 240px">
|
|
83
|
-
...
|
|
84
|
-
</div>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
#### JSX
|
|
88
|
-
|
|
89
|
-
```jsx
|
|
90
|
-
import { ResponsiveGrid } from '@inc2734/unitone-css';
|
|
91
|
-
|
|
92
|
-
<ResponsiveGrid minWidth="240px">
|
|
93
|
-
...
|
|
94
|
-
</ResponsiveGrid>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Divider
|
|
98
|
-
|
|
99
|
-
Using divider.
|
|
100
|
-
|
|
101
|
-
stripe / underline / bordered
|
|
102
|
-
|
|
103
|
-
#### HTML
|
|
104
|
-
|
|
105
|
-
```html
|
|
106
|
-
<div data-unitone-layout="responsive-grid -divider:stripe">
|
|
107
|
-
<div>
|
|
108
|
-
...
|
|
109
|
-
</div>
|
|
110
|
-
<div>
|
|
111
|
-
...
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
#### JSX
|
|
117
|
-
|
|
118
|
-
```jsx
|
|
119
|
-
import { ResponsiveGrid } from '@inc2734/unitone-css';
|
|
120
|
-
|
|
121
|
-
<ResponsiveGrid divider="stripe">
|
|
122
|
-
<div>
|
|
123
|
-
...
|
|
124
|
-
</div>
|
|
125
|
-
<div>
|
|
126
|
-
...
|
|
127
|
-
</div>
|
|
128
|
-
</ResponsiveGrid>
|
|
129
|
-
```
|
|
130
|
-
|