@inc2734/unitone-css 0.46.5 → 0.47.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/dist/app.css +1 -1
- package/dist/app.js +1 -1
- package/dist/index.js +1 -0
- package/dist/library.js +1 -0
- package/dist/storybook.css +1 -1
- package/package.json +26 -17
- package/src/app.js +5 -132
- package/src/index.js +1 -0
- package/src/layout-primitives/both-sides/README.md +96 -7
- package/src/layout-primitives/both-sides/stories/index.stories.jsx +2 -5
- package/src/layout-primitives/center/README.md +85 -21
- package/src/layout-primitives/center/stories/index.stories.jsx +2 -2
- package/src/layout-primitives/cluster/README.md +87 -4
- package/src/layout-primitives/cluster/stories/index.stories.jsx +1 -1
- package/src/layout-primitives/container/README.md +73 -19
- package/src/layout-primitives/container/stories/index.stories.jsx +2 -2
- package/src/layout-primitives/cover/README.md +144 -18
- package/src/layout-primitives/cover/_cover.scss +24 -24
- package/src/layout-primitives/cover/index.jsx +63 -0
- package/src/layout-primitives/cover/stories/index.stories.jsx +20 -19
- package/src/layout-primitives/decorator/README.md +134 -12
- package/src/layout-primitives/decorator/stories/index.stories.jsx +2 -2
- package/src/layout-primitives/float/README.md +93 -2
- package/src/layout-primitives/float/stories/index.stories.jsx +3 -3
- package/src/layout-primitives/frame/README.md +53 -1
- package/src/layout-primitives/frame/stories/index.stories.jsx +1 -1
- package/src/layout-primitives/gutters/README.md +35 -11
- package/src/layout-primitives/gutters/stories/index.stories.jsx +4 -4
- package/src/layout-primitives/index.js +17 -0
- package/src/layout-primitives/layers/README.md +240 -4
- package/src/layout-primitives/layers/{Layers.jsx → index.jsx} +16 -1
- package/src/layout-primitives/layers/stories/index.stories.jsx +32 -2
- package/src/layout-primitives/reel/README.md +81 -28
- package/src/layout-primitives/reel/stories/index.stories.jsx +3 -3
- package/src/layout-primitives/responsive-grid/README.md +103 -8
- package/src/layout-primitives/responsive-grid/{ResponsiveGrid.jsx → index.jsx} +2 -1
- package/src/layout-primitives/responsive-grid/stories/index.stories.jsx +187 -26
- package/src/layout-primitives/stack/README.md +61 -2
- package/src/layout-primitives/stack/_stack.scss +2 -0
- package/src/layout-primitives/stack/stories/index.stories.jsx +3 -3
- package/src/layout-primitives/switcher/README.md +60 -4
- package/src/layout-primitives/switcher/stories/index.stories.jsx +2 -2
- package/src/layout-primitives/text/README.md +117 -2
- package/src/layout-primitives/text/stories/index.stories.jsx +13 -3
- package/src/layout-primitives/vertical-writing/README.md +96 -3
- package/src/layout-primitives/vertical-writing/stories/index.stories.jsx +2 -2
- package/src/layout-primitives/with-sidebar/README.md +136 -3
- package/src/layout-primitives/with-sidebar/stories/index.stories.jsx +4 -7
- package/src/library.js +132 -0
- package/src/patterns/features/features-1/Features1.jsx +9 -7
- package/src/patterns/features/features-2/Features2.jsx +1 -6
- package/src/patterns/header/header-1/Header1.jsx +10 -7
- package/src/patterns/header/header-2/Header2.jsx +1 -6
- package/src/patterns/header/header-3/Header3.jsx +1 -6
- package/src/patterns/header/header-4/Header4.jsx +9 -6
- package/src/patterns/header/header-5/Header5.jsx +9 -6
- package/src/patterns/header/header-6/Header6.jsx +10 -7
- package/src/patterns/media-text/media-text-1/MediaText1.jsx +9 -6
- package/src/patterns/media-text/media-text-2/MediaText2.jsx +8 -5
- package/src/stories/2.get-started.stories.mdx +28 -2
- package/src/layout-primitives/cover/Cover.jsx +0 -41
- /package/src/layout-primitives/both-sides/{BothSides.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/center/{Center.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/cluster/{Cluster.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/container/{Container.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/decorator/{Decorator.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/float/{Float.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/frame/{Frame.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/gutters/{Gutters.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/reel/{Reel.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/stack/{Stack.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/switcher/{Switcher.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/text/{Text.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/vertical-writing/{VerticalWriting.jsx → index.jsx} +0 -0
- /package/src/layout-primitives/with-sidebar/{WithSidebar.jsx → index.jsx} +0 -0
|
@@ -10,14 +10,40 @@ import { Meta } from '@storybook/addon-docs';
|
|
|
10
10
|
$ npm install --save-dev @inc2734/unitone-css
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Import CSS
|
|
14
|
+
|
|
15
|
+
#### Using Sass
|
|
14
16
|
|
|
15
17
|
```scss
|
|
16
18
|
@use 'PATH/TO/node_modules/@inc2734/unitone-css/src/app';
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
#### Using CSS
|
|
20
22
|
|
|
21
23
|
```html
|
|
22
24
|
<link rel="stylesheet" href="/node_modules/@inc2734/unitone-css/dist/app.css" />
|
|
23
25
|
```
|
|
26
|
+
|
|
27
|
+
### Import js
|
|
28
|
+
|
|
29
|
+
#### Using import
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import '@inc2734/unitone-css/app';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### Using script
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<script src="/node_modules/@inc2734/unitone-css/dist/app.js"></script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Using React components
|
|
42
|
+
|
|
43
|
+
```jsx
|
|
44
|
+
import { Decorator } from '@inc2734/unitone-css';
|
|
45
|
+
|
|
46
|
+
<Decorator padding={ 1 }>
|
|
47
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill</p>
|
|
48
|
+
</Decorator>
|
|
49
|
+
```
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export const Cover = ({ gap, minHeight, justifyContent, noPadding, style, ...props }) => {
|
|
4
|
-
style = {
|
|
5
|
-
...style,
|
|
6
|
-
'--unitone--min-height': !!minHeight ? minHeight : undefined,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
data-unitone-layout={[
|
|
12
|
-
'cover',
|
|
13
|
-
noPadding ? '-no-padding' : undefined,
|
|
14
|
-
'undefined' !== typeof gap ? `-gap:${gap}` : undefined,
|
|
15
|
-
'undefined' !== typeof justifyContent ? `-justify-content:${justifyContent}` : undefined,
|
|
16
|
-
]
|
|
17
|
-
.filter(Boolean)
|
|
18
|
-
.join(' ')}
|
|
19
|
-
style={style}
|
|
20
|
-
>
|
|
21
|
-
{props.children}
|
|
22
|
-
</div>
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const CoverContent = ({ position, tagName = 'div', ...props }) => {
|
|
27
|
-
const Tag = tagName;
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<Tag
|
|
31
|
-
data-unitone-layout={[
|
|
32
|
-
'cover__content',
|
|
33
|
-
'undefined' !== typeof position ? `-valign:${position}` : undefined,
|
|
34
|
-
]
|
|
35
|
-
.filter(Boolean)
|
|
36
|
-
.join(' ')}
|
|
37
|
-
>
|
|
38
|
-
{props.children}
|
|
39
|
-
</Tag>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|