@chayns-components/core 5.0.0-beta.636 → 5.0.0-beta.637

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.
@@ -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 children: ReactNode;\n style?: CSSProperties;\n duration?: number;\n animate?: boolean | AnimationControls | TargetAndTransition | VariantLabels;\n exit?: TargetAndTransition | VariantLabels;\n initial?: boolean | VariantLabels;\n id: string;\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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,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","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,CA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Q,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 +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 children: ReactNode;\n style?: CSSProperties;\n duration?: number;\n animate?: boolean | AnimationControls | TargetAndTransition | VariantLabels;\n exit?: TargetAndTransition | VariantLabels;\n initial?: boolean | VariantLabels;\n id: string;\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;AAa1E,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","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,13 +1,37 @@
1
1
  import { type AnimationControls, type TargetAndTransition, type VariantLabels } from 'framer-motion';
2
2
  import { CSSProperties, FC, ReactNode } from 'react';
3
3
  export type ExpandableContentProps = {
4
+ /**
5
+ * The styles that should be animated.
6
+ */
7
+ animate?: boolean | AnimationControls | TargetAndTransition | VariantLabels;
8
+ /**
9
+ * The children that should be animated.
10
+ */
4
11
  children: ReactNode;
5
- style?: CSSProperties;
12
+ /**
13
+ * How long the animation last.
14
+ */
6
15
  duration?: number;
7
- animate?: boolean | AnimationControls | TargetAndTransition | VariantLabels;
16
+ /**
17
+ * the exit animation.
18
+ */
8
19
  exit?: TargetAndTransition | VariantLabels;
9
- initial?: boolean | VariantLabels;
20
+ /**
21
+ * the id of the element.
22
+ */
10
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.
34
+ */
11
35
  type?: 'just' | 'inertia' | 'tween' | 'spring' | 'keyframes';
12
36
  };
13
37
  declare const ExpandableContent: FC<ExpandableContentProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/core",
3
- "version": "5.0.0-beta.636",
3
+ "version": "5.0.0-beta.637",
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": "07eae11d45028dfd72e1f4e8b9e8eb013a2af91b"
88
+ "gitHead": "75d0800867ab02ad03be863f3cb6c430c7835403"
89
89
  }