@thecb/components 11.2.7-beta.0 → 11.2.7-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "11.2.7-beta.0",
3
+ "version": "11.2.7-beta.1",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -100,7 +100,7 @@
100
100
  "@types/styled-components": "^5.1.34",
101
101
  "core-js": "^3.22.5",
102
102
  "formatted-input": "^1.0.0",
103
- "framer-motion": "^1.11.0",
103
+ "framer-motion": "12.4.7",
104
104
  "numeral": "^2.0.6",
105
105
  "polished": "^4.0.3",
106
106
  "ramda": "^0.27.0",
@@ -1,6 +1,5 @@
1
1
  import React, { useContext, forwardRef } from "react";
2
2
  import styled, { ThemeContext } from "styled-components";
3
- import { linear } from "@popmotion/easing";
4
3
  import Text from "../text";
5
4
  import { Box, Center, Motion } from "../layouts";
6
5
  import { fallbackValues } from "./ButtonWithAction.theme";
@@ -9,23 +8,7 @@ import SpinnerIcon from "../../../deprecated/spinner";
9
8
  import { noop } from "../../../util/general";
10
9
  import { createThemeValues } from "../../../util/themeUtils";
11
10
 
12
- const variants = {
13
- fixed: {
14
- rotate: "0deg"
15
- },
16
- rotate: {
17
- rotate: "360deg",
18
- transition: {
19
- rotate: {
20
- ease: linear,
21
- duration: 1000,
22
- loop: Infinity
23
- }
24
- }
25
- }
26
- };
27
-
28
- const SpinnerContainer = styled.div`
11
+ const SpinnerContainer = styled(Motion)`
29
12
  width: 100%;
30
13
  display: flex;
31
14
  flex-direction: row;
@@ -33,18 +16,9 @@ const SpinnerContainer = styled.div`
33
16
  justify-content: center;
34
17
  `;
35
18
 
36
- const SpinnerIconWrapper = styled(Motion)``;
37
-
38
19
  const Spinner = ({ color, isMobile }) => (
39
20
  <SpinnerContainer>
40
- <SpinnerIconWrapper
41
- padding="0"
42
- variants={variants}
43
- initial="fixed"
44
- animate="rotate"
45
- >
46
- <SpinnerIcon color={color} isMobile={isMobile} />
47
- </SpinnerIconWrapper>
21
+ <SpinnerIcon color={color} isMobile={isMobile} />
48
22
  </SpinnerContainer>
49
23
  );
50
24
 
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import styled from "styled-components";
3
- import { easeIn, easeOut } from "@popmotion/easing";
4
3
  import { Box, Motion } from "../../atoms/layouts";
5
4
  import { fallbackValues } from "./NavMenu.theme.js";
6
5
  import { themeComponent } from "../../../util/themeUtils";
@@ -11,11 +10,11 @@ const menuVariants = {
11
10
  right: "100vw",
12
11
  transition: {
13
12
  right: {
14
- ease: easeOut,
13
+ ease: "easeOut",
15
14
  duration: 500
16
15
  },
17
16
  left: {
18
- ease: easeOut,
17
+ ease: "easeOut",
19
18
  duration: 500
20
19
  }
21
20
  }
@@ -25,11 +24,11 @@ const menuVariants = {
25
24
  right: "0",
26
25
  transition: {
27
26
  left: {
28
- ease: easeIn,
27
+ ease: "easeIn",
29
28
  duration: 500
30
29
  },
31
30
  right: {
32
- ease: easeIn,
31
+ ease: "easeIn",
33
32
  duration: 500
34
33
  }
35
34
  }
@@ -1,23 +1,6 @@
1
1
  import React from "react";
2
2
  import styled from "styled-components";
3
3
  import { Motion } from "../../components/atoms/layouts";
4
- import { linear } from "@popmotion/easing";
5
-
6
- const rotateVariants = {
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
- };
21
4
 
22
5
  export const SpinnerContainer = styled.div`
23
6
  width: 100%;
@@ -35,10 +18,10 @@ export const SpinnerIconWrapper = styled(Motion)`
35
18
  const SpinnerIcon = ({ color, isMobile }) => (
36
19
  <SpinnerContainer>
37
20
  <SpinnerIconWrapper
38
- initial="fixed"
39
- animate="rotate"
21
+ initial={{ rotate: 0 }}
22
+ animate={{ rotate: 360 }}
23
+ transition={{ duration: 1, ease: "linear", repeat: Infinity }}
40
24
  isMobile={isMobile}
41
- variants={rotateVariants}
42
25
  >
43
26
  <svg
44
27
  viewBox={`0 0 24 24`}