@bubo-squared/ui-framework 0.2.36 → 0.2.37
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/dist/index.cjs +14 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -498,12 +498,8 @@ var Accordion = React7.forwardRef(
|
|
|
498
498
|
bordered = false,
|
|
499
499
|
...rootProps
|
|
500
500
|
} = props;
|
|
501
|
-
const {
|
|
502
|
-
|
|
503
|
-
defaultValue,
|
|
504
|
-
onValueChange,
|
|
505
|
-
...restRootProps
|
|
506
|
-
} = rootProps;
|
|
501
|
+
const { value, defaultValue, onValueChange, ...restRootProps } = rootProps;
|
|
502
|
+
const [isDoneAnimating, setIsDoneAnimating] = React7.useState(defaultOpen);
|
|
507
503
|
const resolvedDefaultValue = value === void 0 && defaultValue === void 0 && defaultOpen ? "item" : defaultValue;
|
|
508
504
|
return /* @__PURE__ */ jsx9(
|
|
509
505
|
AccordionPrimitive.Root,
|
|
@@ -537,7 +533,18 @@ var Accordion = React7.forwardRef(
|
|
|
537
533
|
]
|
|
538
534
|
}
|
|
539
535
|
) }),
|
|
540
|
-
/* @__PURE__ */ jsx9(
|
|
536
|
+
/* @__PURE__ */ jsx9(
|
|
537
|
+
AccordionPrimitive.Content,
|
|
538
|
+
{
|
|
539
|
+
onAnimationStart: () => setIsDoneAnimating(false),
|
|
540
|
+
onAnimationEnd: () => setIsDoneAnimating(true),
|
|
541
|
+
className: cn(
|
|
542
|
+
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
543
|
+
!isDoneAnimating && "overflow-hidden"
|
|
544
|
+
),
|
|
545
|
+
children: /* @__PURE__ */ jsx9("div", { className: "pb-3", children })
|
|
546
|
+
}
|
|
547
|
+
)
|
|
541
548
|
]
|
|
542
549
|
}
|
|
543
550
|
)
|