@julseb-lib/react 0.0.91 → 0.0.92
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/index.cjs.js +436 -433
- package/dist/index.es.js +1061 -1058
- package/dist/index.umd.js +286 -283
- package/dist/lib/components/Aside/styles.tsx +28 -28
- package/dist/lib/components/Main/styles.tsx +2 -1
- package/dist/lib/components/Wrapper/styles.tsx +21 -19
- package/package.json +1 -1
|
@@ -4,42 +4,42 @@ import { setDefaultTheme, LAYOUTS, Mixins, SPACERS, MEDIA } from "../../"
|
|
|
4
4
|
import type { LibAsideSize } from "../../types"
|
|
5
5
|
|
|
6
6
|
const getAsideSize = (size: LibAsideSize) => {
|
|
7
|
-
|
|
7
|
+
if (typeof size === "number") return stringifyPx(size)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const sizesMap = new Map<LibAsideSize, LAYOUTS>([
|
|
10
|
+
["default", LAYOUTS.ASIDE_DEFAULT],
|
|
11
|
+
["small", LAYOUTS.ASIDE_SMALL],
|
|
12
|
+
])
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
return sizesMap.get(size)
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const StyledAside = styled.aside<{
|
|
18
|
-
|
|
18
|
+
$size?: LibAsideSize
|
|
19
19
|
}>`
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
position: relative;
|
|
21
|
+
width: 100%;
|
|
22
|
+
min-height: 100%;
|
|
23
|
+
max-width: ${({ $size }) => getAsideSize($size || "default")};
|
|
24
|
+
padding: ${SPACERS.XXL} 0;
|
|
25
|
+
${Mixins.Flexbox({
|
|
26
|
+
$flexDirection: "column",
|
|
27
|
+
$alignItems: "flex-start",
|
|
28
|
+
$gap: "l",
|
|
29
|
+
})}
|
|
30
|
+
${Mixins.StretchTags}
|
|
31
31
|
|
|
32
32
|
& > * {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media ${MEDIA.BREAKPOINT_TABLET_SMALL} {
|
|
37
|
+
width: 100%;
|
|
38
|
+
max-width: unset;
|
|
39
|
+
height: unset;
|
|
40
|
+
min-height: unset;
|
|
41
|
+
padding: ${SPACERS.L} 0;
|
|
42
|
+
}
|
|
43
43
|
`
|
|
44
44
|
|
|
45
45
|
setDefaultTheme([StyledAside])
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import styled from "styled-components"
|
|
2
2
|
import { stringifyPx } from "@julseb-lib/utils"
|
|
3
|
-
import { MEDIA, Mixins, setDefaultTheme } from "../../"
|
|
3
|
+
import { MEDIA, Mixins, setDefaultTheme, SPACERS } from "../../"
|
|
4
4
|
import type { LibAllColors, LibSpacers } from "../../types"
|
|
5
5
|
|
|
6
6
|
const StyledWrapper = styled.section<{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
$gap: LibSpacers
|
|
8
|
+
$backgroundColor: LibAllColors
|
|
9
|
+
$minHeight: string | number
|
|
10
10
|
}>`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
position: relative;
|
|
12
|
+
background-color: ${({ $backgroundColor, theme }) =>
|
|
13
|
+
Mixins.AllColors($backgroundColor, theme)};
|
|
14
|
+
min-height: ${({ $minHeight }) => stringifyPx($minHeight)};
|
|
15
|
+
padding: 0 ${SPACERS.XXL};
|
|
16
|
+
${({ $gap }) =>
|
|
17
|
+
Mixins.Flexbox({
|
|
18
|
+
$gap,
|
|
19
|
+
$justifyContent: "center",
|
|
20
|
+
})}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
@media ${MEDIA.BREAKPOINT_TABLET_SMALL} {
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: flex-start;
|
|
26
|
+
min-height: ${({ $minHeight }) => stringifyPx($minHeight)};
|
|
27
|
+
padding: ${SPACERS.L} ${SPACERS.M};
|
|
28
|
+
}
|
|
27
29
|
`
|
|
28
30
|
|
|
29
31
|
setDefaultTheme([StyledWrapper])
|