@sonardigital/carbon-ui 1.1.73 → 1.1.75
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 +2 -1
- package/src/components/index.ts +1 -0
- package/src/components/layout/accordions/Accordions.tsx +1 -1
- package/src/components/layout/scolling-cards/ScrollingCards.tsx +2 -2
- package/src/components/transitions/TransitionReveal.tsx +22 -0
- package/src/components/transitions/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonardigital/carbon-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.75",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"dayjs": "^1.11.18",
|
|
62
62
|
"eslint-plugin-react": "^7.34.3",
|
|
63
63
|
"eslint-plugin-storybook": "^0.8.0",
|
|
64
|
+
"framer-motion": "^12.38.0",
|
|
64
65
|
"husky": "^9.1.7",
|
|
65
66
|
"lint-staged": "^16.0.0",
|
|
66
67
|
"react": "^19.1.0",
|
package/src/components/index.ts
CHANGED
|
@@ -29,8 +29,8 @@ export function ScrollingCards({
|
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<Grid container spacing={2}>
|
|
32
|
-
{items?.map(contact => (
|
|
33
|
-
<Grid size={{ xs: 12, sm: 4 }}>
|
|
32
|
+
{items?.map((contact, i) => (
|
|
33
|
+
<Grid size={{ xs: 12, sm: 4 }} key={i}>
|
|
34
34
|
<Tooltip title={contact.tooltip} sx={{ width: '100%' }}>
|
|
35
35
|
<ButtonBase
|
|
36
36
|
sx={{
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HTMLMotionProps, motion } from 'framer-motion';
|
|
2
|
+
|
|
3
|
+
interface TransitionRevealProps extends HTMLMotionProps<'div'> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function TransitionReveal({
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}: TransitionRevealProps): React.ReactElement {
|
|
11
|
+
return (
|
|
12
|
+
<motion.div
|
|
13
|
+
initial={{ opacity: 0, y: 30 }}
|
|
14
|
+
whileInView={{ opacity: 1, y: 0 }}
|
|
15
|
+
viewport={{ once: true, margin: '-150px' }}
|
|
16
|
+
transition={{ duration: 0.5, ease: 'easeOut' }}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</motion.div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TransitionReveal';
|