@nkey-ui/collapse
Advanced tools
Comparing version 1.1.10 to 1.1.13
import * as react from 'react'; | ||
import { ComponentPropsWithoutRef } from 'react'; | ||
import { MergeTypes } from '@nkey-ui/shared-utils'; | ||
import { CollapseVariantProps } from '@nkey-ui/theme'; | ||
interface CollapseProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> { | ||
interface CollapseProps extends MergeTypes<ComponentPropsWithoutRef<'div'>, CollapseVariantProps, 'onChange'> { | ||
open: boolean; | ||
@@ -6,0 +8,0 @@ onChange?(open: boolean): void; |
@@ -32,3 +32,3 @@ "use client"; | ||
var timeout; | ||
var Collapse = (0, import_react.forwardRef)(function Collapse2({ children, open, onChange, className, classNames = {}, ...rest }, ref) { | ||
var Collapse = (0, import_react.forwardRef)(function Collapse2({ children, open, animation, onChange, className, classNames = {}, ...rest }, ref) { | ||
const [height, setHeight] = (0, import_react.useState)(0); | ||
@@ -48,3 +48,3 @@ const childrenRef = (0, import_react.useRef)(null); | ||
}, [open, onChange]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, className: (0, import_theme.collapse)({ className: classNames.wrapper }), style: { height }, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: childrenRef, className: classNames.content || className, children }) }); | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, className: (0, import_theme.collapse)({ animation, className: classNames.wrapper }), style: { height }, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: childrenRef, className: classNames.content || className, children }) }); | ||
}); | ||
@@ -51,0 +51,0 @@ Collapse.displayName = "NkeyUI.Collapse"; |
export { default as Collapse, CollapseProps } from './collapse.js'; | ||
import 'react'; | ||
import '@nkey-ui/shared-utils'; | ||
import '@nkey-ui/theme'; |
@@ -34,3 +34,3 @@ "use client"; | ||
var timeout; | ||
var Collapse = (0, import_react.forwardRef)(function Collapse2({ children, open, onChange, className, classNames = {}, ...rest }, ref) { | ||
var Collapse = (0, import_react.forwardRef)(function Collapse2({ children, open, animation, onChange, className, classNames = {}, ...rest }, ref) { | ||
const [height, setHeight] = (0, import_react.useState)(0); | ||
@@ -50,3 +50,3 @@ const childrenRef = (0, import_react.useRef)(null); | ||
}, [open, onChange]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, className: (0, import_theme.collapse)({ className: classNames.wrapper }), style: { height }, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: childrenRef, className: classNames.content || className, children }) }); | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, className: (0, import_theme.collapse)({ animation, className: classNames.wrapper }), style: { height }, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: childrenRef, className: classNames.content || className, children }) }); | ||
}); | ||
@@ -53,0 +53,0 @@ Collapse.displayName = "NkeyUI.Collapse"; |
{ | ||
"name": "@nkey-ui/collapse", | ||
"version": "1.1.10", | ||
"version": "1.1.13", | ||
"description": "A React component to collapse content with animations.", | ||
@@ -27,3 +27,4 @@ "keywords": [ | ||
"@nkey-ui/react-utils": "1.0.4", | ||
"@nkey-ui/theme": "1.0.39" | ||
"@nkey-ui/shared-utils": "1.0.12", | ||
"@nkey-ui/theme": "1.0.42" | ||
}, | ||
@@ -30,0 +31,0 @@ "clean-package": "../../../clean-package.config.json", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8229
168
4
+ Added@nkey-ui/shared-utils@1.0.12
+ Added@nkey-ui/theme@1.0.42(transitive)
- Removed@nkey-ui/theme@1.0.39(transitive)
Updated@nkey-ui/theme@1.0.42