ehscan-react-components 0.1.51 → 0.1.53

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/README.md CHANGED
@@ -11,10 +11,14 @@ This library is ideal for dashboards, admin panels, internal tools, and feature-
11
11
  - [Drag And Drop](#drag-and-drop)
12
12
  - [AddBox](#addbox)
13
13
  - [Window](#window)
14
- - Button
15
- - textarea
16
- - TextAreaDropDown
17
- - TextElementStretch
14
+
15
+ - Input
16
+ - textarea
17
+ - TextAreaDropDown
18
+
19
+ - Text or Content Elements
20
+ - TextElementStretch
21
+ - FoldedElement
18
22
 
19
23
  ## Installation
20
24
 
@@ -323,6 +327,10 @@ const WindowWrapper = ({ windowOpen, setWindowOpen }) => {
323
327
  ----
324
328
  # Changelog
325
329
 
330
+
331
+ ## [0.1.53] - 2025-12-16
332
+ - Added FoldedElement
333
+
326
334
  ## [0.1.51] - 2025-12-16
327
335
  - Added TextElementStretch
328
336
 
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from "react";
2
+ type Props = {
3
+ folded: boolean;
4
+ children: ReactNode;
5
+ };
6
+ export declare const FoldedElement: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AnimatePresence, motion } from "framer-motion";
3
+ export const FoldedElement = ({ folded, children }) => {
4
+ return (_jsx(AnimatePresence, { initial: false, children: !folded && (_jsx(motion.div, { initial: { height: 0, opacity: 0 }, animate: { height: "auto", opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.3, ease: "easeInOut" }, style: { overflow: "hidden" }, children: children }, "content")) }));
5
+ };
@@ -1,4 +1,4 @@
1
- import './style/input.css';
1
+ import '../style/input.css';
2
2
  interface Props {
3
3
  id?: string;
4
4
  tabIndex?: number;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useLayoutEffect, useRef, useState, useCallback, useId } from "react";
3
- import './style/input.css';
3
+ import '../style/input.css';
4
4
  export const TextArea = ({ id, tabIndex, label, value, editable = true, required = false, onChange, placeholder, maxLength = 500, addClass }) => {
5
5
  const textareaRef = useRef(null);
6
6
  const [charCount, setCharCount] = useState(value.length);
@@ -1,4 +1,4 @@
1
- import './style/input-dropdown.css';
1
+ import '../style/input-dropdown.css';
2
2
  type Action = "add" | "remove";
3
3
  interface Props {
4
4
  id?: string;
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  import { useRef, useState, useId, useEffect } from "react";
12
12
  import { DropDown } from "../DropDown";
13
- import './style/input-dropdown.css';
13
+ import '../style/input-dropdown.css';
14
14
  export const TextAreaDropDown = ({ id, tabIndex, alwaysOpenDropDown, closeCommand, label, value, editable = true, required = false, dropdownValue, onChange, placeholder = 'select or create new entry', maxLength = 500, addClass, maxDropDownHeight = 200 }) => {
15
15
  const childRef = useRef(null);
16
16
  const textareaRef = useRef(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ehscan-react-components",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "components",
5
5
  "main": "dist/Components.js",
6
6
  "types": "dist/Components.d.ts",
@@ -31,5 +31,8 @@
31
31
  "glob": "8",
32
32
  "minimatch": "5",
33
33
  "typescript": "^5.6.3"
34
+ },
35
+ "dependencies": {
36
+ "framer-motion": "^12.23.26"
34
37
  }
35
38
  }