@chayns-components/core 5.0.0-beta.639 → 5.0.0-beta.640

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.
@@ -11,28 +11,18 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
11
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
12
  const ExpandableContent = ({
13
13
  children,
14
- id,
15
- exit,
16
- type = 'tween',
17
- initial,
18
- animate,
19
- style,
20
- duration = 0.2
14
+ isOpen
21
15
  }) => (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_framerMotion.AnimatePresence, {
22
16
  initial: false
23
17
  }, /*#__PURE__*/_react.default.createElement(_ExpandableContent.StyledMotionExpandableContent, {
24
- animate: animate,
25
- initial: initial,
26
- exit: exit,
27
- transition: {
28
- duration,
29
- type
18
+ animate: {
19
+ height: isOpen ? 'auto' : '0px'
30
20
  },
31
- key: id,
32
- style: {
33
- ...style
21
+ transition: {
22
+ duration: 0.2,
23
+ type: 'tween'
34
24
  }
35
- }, children)), [animate, children, duration, exit, id, initial, style, type]);
25
+ }, children)), [children, isOpen]);
36
26
  ExpandableContent.displayName = 'ExpandableContent';
37
27
  var _default = exports.default = ExpandableContent;
38
28
  //# sourceMappingURL=ExpandableContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableContent.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_ExpandableContent","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ExpandableContent","children","id","exit","type","initial","animate","style","duration","useMemo","createElement","AnimatePresence","StyledMotionExpandableContent","transition","key","displayName","_default","exports"],"sources":["../../../../src/components/expandable-content/ExpandableContent.tsx"],"sourcesContent":["import {\n AnimatePresence,\n type AnimationControls,\n type TargetAndTransition,\n type VariantLabels,\n} from 'framer-motion';\nimport React, { CSSProperties, FC, ReactNode, useMemo } from 'react';\nimport { StyledMotionExpandableContent } from './ExpandableContent.styles';\n\nexport type ExpandableContentProps = {\n /**\n * The styles that should be animated.\n */\n animate?: boolean | AnimationControls | TargetAndTransition | VariantLabels;\n /**\n * The children that should be animated.\n */\n children: ReactNode;\n /**\n * How long the animation last.\n */\n duration?: number;\n /**\n * the exit animation.\n */\n exit?: TargetAndTransition | VariantLabels;\n /**\n * the id of the element.\n */\n id: string;\n /**\n * the initial animation.\n */\n initial?: boolean | VariantLabels;\n /**\n * The style of the wrapper.\n */\n style?: CSSProperties;\n /**\n * The type of the animation.\n */\n type?: 'just' | 'inertia' | 'tween' | 'spring' | 'keyframes';\n};\n\nconst ExpandableContent: FC<ExpandableContentProps> = ({\n children,\n id,\n exit,\n type = 'tween',\n initial,\n animate,\n style,\n duration = 0.2,\n}) =>\n useMemo(\n () => (\n <AnimatePresence initial={false}>\n <StyledMotionExpandableContent\n animate={animate}\n initial={initial}\n exit={exit}\n transition={{ duration, type }}\n key={id}\n style={{ ...style }}\n >\n {children}\n </StyledMotionExpandableContent>\n </AnimatePresence>\n ),\n [animate, children, duration, exit, id, initial, style, type],\n );\n\nExpandableContent.displayName = 'ExpandableContent';\n\nexport default ExpandableContent;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAMA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA2E,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAqC3E,MAAMW,iBAA6C,GAAGA,CAAC;EACnDC,QAAQ;EACRC,EAAE;EACFC,IAAI;EACJC,IAAI,GAAG,OAAO;EACdC,OAAO;EACPC,OAAO;EACPC,KAAK;EACLC,QAAQ,GAAG;AACf,CAAC,KACG,IAAAC,cAAO,EACH,mBACIhC,MAAA,CAAAS,OAAA,CAAAwB,aAAA,CAACnC,aAAA,CAAAoC,eAAe;EAACN,OAAO,EAAE;AAAM,gBAC5B5B,MAAA,CAAAS,OAAA,CAAAwB,aAAA,CAAC/B,kBAAA,CAAAiC,6BAA6B;EAC1BN,OAAO,EAAEA,OAAQ;EACjBD,OAAO,EAAEA,OAAQ;EACjBF,IAAI,EAAEA,IAAK;EACXU,UAAU,EAAE;IAAEL,QAAQ;IAAEJ;EAAK,CAAE;EAC/BU,GAAG,EAAEZ,EAAG;EACRK,KAAK,EAAE;IAAE,GAAGA;EAAM;AAAE,GAEnBN,QAC0B,CAClB,CACpB,EACD,CAACK,OAAO,EAAEL,QAAQ,EAAEO,QAAQ,EAAEL,IAAI,EAAED,EAAE,EAAEG,OAAO,EAAEE,KAAK,EAAEH,IAAI,CAChE,CAAC;AAELJ,iBAAiB,CAACe,WAAW,GAAG,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA/B,OAAA,GAErCc,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"ExpandableContent.js","names":["_framerMotion","require","_react","_interopRequireWildcard","_ExpandableContent","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ExpandableContent","children","isOpen","useMemo","createElement","AnimatePresence","initial","StyledMotionExpandableContent","animate","height","transition","duration","type","displayName","_default","exports"],"sources":["../../../../src/components/expandable-content/ExpandableContent.tsx"],"sourcesContent":["import { AnimatePresence } from 'framer-motion';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyledMotionExpandableContent } from './ExpandableContent.styles';\n\nexport type ExpandableContentProps = {\n /**\n * The children that should be animated.\n */\n children: ReactNode;\n /**\n * Whether the content is expanded.\n */\n isOpen: boolean;\n};\n\nconst ExpandableContent: FC<ExpandableContentProps> = ({ children, isOpen }) =>\n useMemo(\n () => (\n <AnimatePresence initial={false}>\n <StyledMotionExpandableContent\n animate={{ height: isOpen ? 'auto' : '0px' }}\n transition={{ duration: 0.2, type: 'tween' }}\n >\n {children}\n </StyledMotionExpandableContent>\n </AnimatePresence>\n ),\n [children, isOpen],\n );\n\nExpandableContent.displayName = 'ExpandableContent';\n\nexport default ExpandableContent;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA2E,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAa3E,MAAMW,iBAA6C,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAO,CAAC,KACvE,IAAAC,cAAO,EACH,mBACI1B,MAAA,CAAAS,OAAA,CAAAkB,aAAA,CAAC7B,aAAA,CAAA8B,eAAe;EAACC,OAAO,EAAE;AAAM,gBAC5B7B,MAAA,CAAAS,OAAA,CAAAkB,aAAA,CAACzB,kBAAA,CAAA4B,6BAA6B;EAC1BC,OAAO,EAAE;IAAEC,MAAM,EAAEP,MAAM,GAAG,MAAM,GAAG;EAAM,CAAE;EAC7CQ,UAAU,EAAE;IAAEC,QAAQ,EAAE,GAAG;IAAEC,IAAI,EAAE;EAAQ;AAAE,GAE5CX,QAC0B,CAClB,CACpB,EACD,CAACA,QAAQ,EAAEC,MAAM,CACrB,CAAC;AAELF,iBAAiB,CAACa,WAAW,GAAG,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAErCc,iBAAiB","ignoreList":[]}
@@ -7,5 +7,7 @@ exports.StyledMotionExpandableContent = void 0;
7
7
  var _framerMotion = require("framer-motion");
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- const StyledMotionExpandableContent = exports.StyledMotionExpandableContent = (0, _styledComponents.default)(_framerMotion.motion.div)``;
10
+ const StyledMotionExpandableContent = exports.StyledMotionExpandableContent = (0, _styledComponents.default)(_framerMotion.motion.div)`
11
+ overflow: hidden;
12
+ `;
11
13
  //# sourceMappingURL=ExpandableContent.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableContent.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","e","__esModule","default","StyledMotionExpandableContent","exports","styled","motion","div"],"sources":["../../../../src/components/expandable-content/ExpandableContent.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledMotionExpandableContent = styled(motion.div)``;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG,IAAAE,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAC,EAAE","ignoreList":[]}
1
+ {"version":3,"file":"ExpandableContent.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","e","__esModule","default","StyledMotionExpandableContent","exports","styled","motion","div"],"sources":["../../../../src/components/expandable-content/ExpandableContent.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledMotionExpandableContent = styled(motion.div)`\n overflow: hidden;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG,IAAAE,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAC;AAC/D;AACA,CAAC","ignoreList":[]}
@@ -4,29 +4,19 @@ import { StyledMotionExpandableContent } from './ExpandableContent.styles';
4
4
  const ExpandableContent = _ref => {
5
5
  let {
6
6
  children,
7
- id,
8
- exit,
9
- type = 'tween',
10
- initial,
11
- animate,
12
- style,
13
- duration = 0.2
7
+ isOpen
14
8
  } = _ref;
15
9
  return useMemo(() => /*#__PURE__*/React.createElement(AnimatePresence, {
16
10
  initial: false
17
11
  }, /*#__PURE__*/React.createElement(StyledMotionExpandableContent, {
18
- animate: animate,
19
- initial: initial,
20
- exit: exit,
21
- transition: {
22
- duration,
23
- type
12
+ animate: {
13
+ height: isOpen ? 'auto' : '0px'
24
14
  },
25
- key: id,
26
- style: {
27
- ...style
15
+ transition: {
16
+ duration: 0.2,
17
+ type: 'tween'
28
18
  }
29
- }, children)), [animate, children, duration, exit, id, initial, style, type]);
19
+ }, children)), [children, isOpen]);
30
20
  };
31
21
  ExpandableContent.displayName = 'ExpandableContent';
32
22
  export default ExpandableContent;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableContent.js","names":["AnimatePresence","React","useMemo","StyledMotionExpandableContent","ExpandableContent","_ref","children","id","exit","type","initial","animate","style","duration","createElement","transition","key","displayName"],"sources":["../../../../src/components/expandable-content/ExpandableContent.tsx"],"sourcesContent":["import {\n AnimatePresence,\n type AnimationControls,\n type TargetAndTransition,\n type VariantLabels,\n} from 'framer-motion';\nimport React, { CSSProperties, FC, ReactNode, useMemo } from 'react';\nimport { StyledMotionExpandableContent } from './ExpandableContent.styles';\n\nexport type ExpandableContentProps = {\n /**\n * The styles that should be animated.\n */\n animate?: boolean | AnimationControls | TargetAndTransition | VariantLabels;\n /**\n * The children that should be animated.\n */\n children: ReactNode;\n /**\n * How long the animation last.\n */\n duration?: number;\n /**\n * the exit animation.\n */\n exit?: TargetAndTransition | VariantLabels;\n /**\n * the id of the element.\n */\n id: string;\n /**\n * the initial animation.\n */\n initial?: boolean | VariantLabels;\n /**\n * The style of the wrapper.\n */\n style?: CSSProperties;\n /**\n * The type of the animation.\n */\n type?: 'just' | 'inertia' | 'tween' | 'spring' | 'keyframes';\n};\n\nconst ExpandableContent: FC<ExpandableContentProps> = ({\n children,\n id,\n exit,\n type = 'tween',\n initial,\n animate,\n style,\n duration = 0.2,\n}) =>\n useMemo(\n () => (\n <AnimatePresence initial={false}>\n <StyledMotionExpandableContent\n animate={animate}\n initial={initial}\n exit={exit}\n transition={{ duration, type }}\n key={id}\n style={{ ...style }}\n >\n {children}\n </StyledMotionExpandableContent>\n </AnimatePresence>\n ),\n [animate, children, duration, exit, id, initial, style, type],\n );\n\nExpandableContent.displayName = 'ExpandableContent';\n\nexport default ExpandableContent;\n"],"mappings":"AAAA,SACIA,eAAe,QAIZ,eAAe;AACtB,OAAOC,KAAK,IAAkCC,OAAO,QAAQ,OAAO;AACpE,SAASC,6BAA6B,QAAQ,4BAA4B;AAqC1E,MAAMC,iBAA6C,GAAGC,IAAA;EAAA,IAAC;IACnDC,QAAQ;IACRC,EAAE;IACFC,IAAI;IACJC,IAAI,GAAG,OAAO;IACdC,OAAO;IACPC,OAAO;IACPC,KAAK;IACLC,QAAQ,GAAG;EACf,CAAC,GAAAR,IAAA;EAAA,OACGH,OAAO,CACH,mBACID,KAAA,CAAAa,aAAA,CAACd,eAAe;IAACU,OAAO,EAAE;EAAM,gBAC5BT,KAAA,CAAAa,aAAA,CAACX,6BAA6B;IAC1BQ,OAAO,EAAEA,OAAQ;IACjBD,OAAO,EAAEA,OAAQ;IACjBF,IAAI,EAAEA,IAAK;IACXO,UAAU,EAAE;MAAEF,QAAQ;MAAEJ;IAAK,CAAE;IAC/BO,GAAG,EAAET,EAAG;IACRK,KAAK,EAAE;MAAE,GAAGA;IAAM;EAAE,GAEnBN,QAC0B,CAClB,CACpB,EACD,CAACK,OAAO,EAAEL,QAAQ,EAAEO,QAAQ,EAAEL,IAAI,EAAED,EAAE,EAAEG,OAAO,EAAEE,KAAK,EAAEH,IAAI,CAChE,CAAC;AAAA;AAELL,iBAAiB,CAACa,WAAW,GAAG,mBAAmB;AAEnD,eAAeb,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"ExpandableContent.js","names":["AnimatePresence","React","useMemo","StyledMotionExpandableContent","ExpandableContent","_ref","children","isOpen","createElement","initial","animate","height","transition","duration","type","displayName"],"sources":["../../../../src/components/expandable-content/ExpandableContent.tsx"],"sourcesContent":["import { AnimatePresence } from 'framer-motion';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyledMotionExpandableContent } from './ExpandableContent.styles';\n\nexport type ExpandableContentProps = {\n /**\n * The children that should be animated.\n */\n children: ReactNode;\n /**\n * Whether the content is expanded.\n */\n isOpen: boolean;\n};\n\nconst ExpandableContent: FC<ExpandableContentProps> = ({ children, isOpen }) =>\n useMemo(\n () => (\n <AnimatePresence initial={false}>\n <StyledMotionExpandableContent\n animate={{ height: isOpen ? 'auto' : '0px' }}\n transition={{ duration: 0.2, type: 'tween' }}\n >\n {children}\n </StyledMotionExpandableContent>\n </AnimatePresence>\n ),\n [children, isOpen],\n );\n\nExpandableContent.displayName = 'ExpandableContent';\n\nexport default ExpandableContent;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,eAAe;AAC/C,OAAOC,KAAK,IAAmBC,OAAO,QAAQ,OAAO;AACrD,SAASC,6BAA6B,QAAQ,4BAA4B;AAa1E,MAAMC,iBAA6C,GAAGC,IAAA;EAAA,IAAC;IAAEC,QAAQ;IAAEC;EAAO,CAAC,GAAAF,IAAA;EAAA,OACvEH,OAAO,CACH,mBACID,KAAA,CAAAO,aAAA,CAACR,eAAe;IAACS,OAAO,EAAE;EAAM,gBAC5BR,KAAA,CAAAO,aAAA,CAACL,6BAA6B;IAC1BO,OAAO,EAAE;MAAEC,MAAM,EAAEJ,MAAM,GAAG,MAAM,GAAG;IAAM,CAAE;IAC7CK,UAAU,EAAE;MAAEC,QAAQ,EAAE,GAAG;MAAEC,IAAI,EAAE;IAAQ;EAAE,GAE5CR,QAC0B,CAClB,CACpB,EACD,CAACA,QAAQ,EAAEC,MAAM,CACrB,CAAC;AAAA;AAELH,iBAAiB,CAACW,WAAW,GAAG,mBAAmB;AAEnD,eAAeX,iBAAiB","ignoreList":[]}
@@ -1,4 +1,6 @@
1
1
  import { motion } from 'framer-motion';
2
2
  import styled from 'styled-components';
3
- export const StyledMotionExpandableContent = styled(motion.div)``;
3
+ export const StyledMotionExpandableContent = styled(motion.div)`
4
+ overflow: hidden;
5
+ `;
4
6
  //# sourceMappingURL=ExpandableContent.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableContent.styles.js","names":["motion","styled","StyledMotionExpandableContent","div"],"sources":["../../../../src/components/expandable-content/ExpandableContent.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledMotionExpandableContent = styled(motion.div)``;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,eAAe;AACtC,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,6BAA6B,GAAGD,MAAM,CAACD,MAAM,CAACG,GAAG,CAAC,EAAE","ignoreList":[]}
1
+ {"version":3,"file":"ExpandableContent.styles.js","names":["motion","styled","StyledMotionExpandableContent","div"],"sources":["../../../../src/components/expandable-content/ExpandableContent.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledMotionExpandableContent = styled(motion.div)`\n overflow: hidden;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,eAAe;AACtC,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,6BAA6B,GAAGD,MAAM,CAACD,MAAM,CAACG,GAAG,CAAC;AAC/D;AACA,CAAC","ignoreList":[]}
@@ -1,38 +1,13 @@
1
- import { type AnimationControls, type TargetAndTransition, type VariantLabels } from 'framer-motion';
2
- import { CSSProperties, FC, ReactNode } from 'react';
1
+ import { FC, ReactNode } from 'react';
3
2
  export type ExpandableContentProps = {
4
- /**
5
- * The styles that should be animated.
6
- */
7
- animate?: boolean | AnimationControls | TargetAndTransition | VariantLabels;
8
3
  /**
9
4
  * The children that should be animated.
10
5
  */
11
6
  children: ReactNode;
12
7
  /**
13
- * How long the animation last.
14
- */
15
- duration?: number;
16
- /**
17
- * the exit animation.
18
- */
19
- exit?: TargetAndTransition | VariantLabels;
20
- /**
21
- * the id of the element.
22
- */
23
- id: string;
24
- /**
25
- * the initial animation.
26
- */
27
- initial?: boolean | VariantLabels;
28
- /**
29
- * The style of the wrapper.
30
- */
31
- style?: CSSProperties;
32
- /**
33
- * The type of the animation.
8
+ * Whether the content is expanded.
34
9
  */
35
- type?: 'just' | 'inertia' | 'tween' | 'spring' | 'keyframes';
10
+ isOpen: boolean;
36
11
  };
37
12
  declare const ExpandableContent: FC<ExpandableContentProps>;
38
13
  export default ExpandableContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.0.0-beta.639",
3
+ "version": "5.0.0-beta.640",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "3f882895023bac8f9b838c478c81eb4bd82110a4"
88
+ "gitHead": "b14a4a1db5fa3e0d2ffa5b8fa52dc3008a3321cc"
89
89
  }