@thecb/components 11.2.7-beta.1 → 11.2.8-beta.1
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 +11866 -12552
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14161 -14847
- package/dist/index.esm.js.map +1 -1
- package/package.json +4 -4
- package/src/components/atoms/button-with-action/ButtonWithAction.js +25 -3
- package/src/components/atoms/layouts/Motion.js +6 -25
- package/src/components/atoms/layouts/Motion.styled.js +0 -36
- package/src/components/atoms/toggle-switch/ToggleSwitch.js +15 -19
- package/src/components/molecules/hero-image/HeroImage.js +80 -51
- package/src/components/molecules/hero-image/HeroImage.stories.js +22 -1
- package/src/components/molecules/hero-image/HeroImage.styled.js +77 -24
- package/src/components/molecules/hero-image/HeroImage.theme.js +97 -3
- package/src/components/molecules/nav-menu/NavMenuMobile.js +12 -11
- package/src/deprecated/spinner/Spinner.js +20 -8
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/nav-footer/.DS_Store +0 -0
- package/src/components/molecules/.DS_Store +0 -0
- package/src/components/molecules/obligation/.DS_Store +0 -0
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
|
-
import
|
|
3
|
+
import posed from "react-pose";
|
|
4
|
+
import { easeIn, easeOut } from "@popmotion/easing";
|
|
5
|
+
import { Box } from "../../atoms/layouts";
|
|
4
6
|
import { fallbackValues } from "./NavMenu.theme.js";
|
|
5
7
|
import { themeComponent } from "../../../util/themeUtils";
|
|
6
8
|
|
|
7
|
-
const
|
|
9
|
+
const menu = posed.div({
|
|
8
10
|
invisible: {
|
|
9
11
|
left: "-100vw",
|
|
10
12
|
right: "100vw",
|
|
11
13
|
transition: {
|
|
12
14
|
right: {
|
|
13
|
-
ease:
|
|
15
|
+
ease: easeOut,
|
|
14
16
|
duration: 500
|
|
15
17
|
},
|
|
16
18
|
left: {
|
|
17
|
-
ease:
|
|
19
|
+
ease: easeOut,
|
|
18
20
|
duration: 500
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -24,18 +26,18 @@ const menuVariants = {
|
|
|
24
26
|
right: "0",
|
|
25
27
|
transition: {
|
|
26
28
|
left: {
|
|
27
|
-
ease:
|
|
29
|
+
ease: easeIn,
|
|
28
30
|
duration: 500
|
|
29
31
|
},
|
|
30
32
|
right: {
|
|
31
|
-
ease:
|
|
33
|
+
ease: easeIn,
|
|
32
34
|
duration: 500
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
|
-
};
|
|
38
|
+
});
|
|
37
39
|
|
|
38
|
-
const ImposterMenu = styled(
|
|
40
|
+
const ImposterMenu = styled(menu)`
|
|
39
41
|
position: fixed;
|
|
40
42
|
top: ${({ headerSize }) => headerSize};
|
|
41
43
|
`;
|
|
@@ -50,9 +52,8 @@ const NavMenuMobile = ({
|
|
|
50
52
|
return (
|
|
51
53
|
<ImposterMenu
|
|
52
54
|
id={id}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
animate={visible ? "visible" : "invisible"}
|
|
55
|
+
initialPose="invisible"
|
|
56
|
+
pose={visible ? "visible" : "invisible"}
|
|
56
57
|
headerSize={headerSize}
|
|
57
58
|
>
|
|
58
59
|
<Box
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
|
-
import
|
|
3
|
+
import posed from "react-pose";
|
|
4
|
+
import { linear } from "@popmotion/easing";
|
|
5
|
+
|
|
6
|
+
const rotate = posed.div({
|
|
7
|
+
fixed: {
|
|
8
|
+
rotate: "0deg"
|
|
9
|
+
},
|
|
10
|
+
rotate: {
|
|
11
|
+
rotate: "360deg",
|
|
12
|
+
transition: {
|
|
13
|
+
rotate: {
|
|
14
|
+
ease: linear,
|
|
15
|
+
duration: 1000,
|
|
16
|
+
loop: Infinity
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
4
21
|
|
|
5
22
|
export const SpinnerContainer = styled.div`
|
|
6
23
|
width: 100%;
|
|
@@ -10,19 +27,14 @@ export const SpinnerContainer = styled.div`
|
|
|
10
27
|
justify-content: center;
|
|
11
28
|
`;
|
|
12
29
|
|
|
13
|
-
export const SpinnerIconWrapper = styled(
|
|
30
|
+
export const SpinnerIconWrapper = styled(rotate)`
|
|
14
31
|
width: ${({ isMobile }) => (isMobile ? "18" : "21")}px;
|
|
15
32
|
height: ${({ isMobile }) => (isMobile ? "18" : "21")}px;
|
|
16
33
|
`;
|
|
17
34
|
|
|
18
35
|
const SpinnerIcon = ({ color, isMobile }) => (
|
|
19
36
|
<SpinnerContainer>
|
|
20
|
-
<SpinnerIconWrapper
|
|
21
|
-
initial={{ rotate: 0 }}
|
|
22
|
-
animate={{ rotate: 360 }}
|
|
23
|
-
transition={{ duration: 1, ease: "linear", repeat: Infinity }}
|
|
24
|
-
isMobile={isMobile}
|
|
25
|
-
>
|
|
37
|
+
<SpinnerIconWrapper initialPose="fixed" pose="rotate" isMobile={isMobile}>
|
|
26
38
|
<svg
|
|
27
39
|
viewBox={`0 0 24 24`}
|
|
28
40
|
height="100%"
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/components/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|