@sarunyu/system-one 4.9.26 → 4.9.28
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 +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/src/components/bottom-sheet.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1534,11 +1534,20 @@ function BottomSheet({
|
|
|
1534
1534
|
className,
|
|
1535
1535
|
contentClassName
|
|
1536
1536
|
}) {
|
|
1537
|
-
|
|
1537
|
+
const [everOpened, setEverOpened] = React.useState(!!open);
|
|
1538
|
+
React.useEffect(() => {
|
|
1539
|
+
if (open) setEverOpened(true);
|
|
1540
|
+
}, [open]);
|
|
1541
|
+
const handleOpenChange = (next) => {
|
|
1542
|
+
if (next) setEverOpened(true);
|
|
1543
|
+
onOpenChange == null ? void 0 : onOpenChange(next);
|
|
1544
|
+
};
|
|
1545
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Drawer, { direction: "bottom", open, onOpenChange: handleOpenChange, children: [
|
|
1538
1546
|
trigger ? /* @__PURE__ */ jsxRuntime.jsx(DrawerTrigger, { asChild: true, children: trigger }) : null,
|
|
1539
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1547
|
+
everOpened && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1540
1548
|
DrawerContent,
|
|
1541
1549
|
{
|
|
1550
|
+
"aria-describedby": void 0,
|
|
1542
1551
|
className: cn(
|
|
1543
1552
|
"[&>div:first-child]:hidden rounded-t-[24px] border-t-0 px-4 pb-6 pt-2",
|
|
1544
1553
|
className
|