@bizapps/ui 1.2.2 → 1.2.3

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/main.d.cts CHANGED
@@ -834,6 +834,7 @@ declare const ease: {
834
834
  readonly enter: readonly [0, 0, 0.2, 1];
835
835
  readonly exit: readonly [0.4, 0, 1, 1];
836
836
  readonly linear: readonly [0, 0, 1, 1];
837
+ readonly drawer: readonly [0.22, 1, 0.36, 1];
837
838
  };
838
839
  declare const spring: {
839
840
  readonly gentle: {
@@ -882,6 +883,14 @@ declare const transition: {
882
883
  readonly duration: 0.15;
883
884
  readonly ease: readonly [0.4, 0, 0.2, 1];
884
885
  };
886
+ readonly drawer: {
887
+ readonly duration: 0.3;
888
+ readonly ease: readonly [0.22, 1, 0.36, 1];
889
+ };
890
+ readonly drawerExit: {
891
+ readonly duration: 0.2;
892
+ readonly ease: readonly [0.4, 0, 1, 1];
893
+ };
885
894
  };
886
895
  declare const fadeIn: {
887
896
  readonly hidden: {
@@ -1006,6 +1015,7 @@ declare const animation: {
1006
1015
  readonly enter: readonly [0, 0, 0.2, 1];
1007
1016
  readonly exit: readonly [0.4, 0, 1, 1];
1008
1017
  readonly linear: readonly [0, 0, 1, 1];
1018
+ readonly drawer: readonly [0.22, 1, 0.36, 1];
1009
1019
  };
1010
1020
  readonly spring: {
1011
1021
  readonly gentle: {
@@ -1054,6 +1064,14 @@ declare const animation: {
1054
1064
  readonly duration: 0.15;
1055
1065
  readonly ease: readonly [0.4, 0, 0.2, 1];
1056
1066
  };
1067
+ readonly drawer: {
1068
+ readonly duration: 0.3;
1069
+ readonly ease: readonly [0.22, 1, 0.36, 1];
1070
+ };
1071
+ readonly drawerExit: {
1072
+ readonly duration: 0.2;
1073
+ readonly ease: readonly [0.4, 0, 1, 1];
1074
+ };
1057
1075
  };
1058
1076
  readonly variants: {
1059
1077
  readonly fadeIn: {
@@ -2027,7 +2045,7 @@ declare function SheetFooter({ className, ...props }: react.ComponentProps<'div'
2027
2045
  declare function SheetTitle({ className, ...props }: react.ComponentProps<typeof Dialog$1.Title>): react.JSX.Element;
2028
2046
  declare function SheetDescription({ className, ...props }: react.ComponentProps<typeof Dialog$1.Description>): react.JSX.Element;
2029
2047
 
2030
- declare function Drawer({ children, open, onOpenChange, ...props }: ComponentProps<typeof Dialog$1.Root>): react.JSX.Element;
2048
+ declare function Drawer({ children, open, onOpenChange, modal, ...props }: ComponentProps<typeof Dialog$1.Root>): react.JSX.Element;
2031
2049
  declare function DrawerTrigger({ ...props }: ComponentProps<typeof Dialog$1.Trigger>): react.JSX.Element;
2032
2050
  declare function DrawerClose({ ...props }: ComponentProps<typeof Dialog$1.Close>): react.JSX.Element;
2033
2051
  declare function DrawerPortal({ children, ...props }: ComponentProps<typeof Dialog$1.Portal>): react.JSX.Element;
package/dist/main.d.ts CHANGED
@@ -834,6 +834,7 @@ declare const ease: {
834
834
  readonly enter: readonly [0, 0, 0.2, 1];
835
835
  readonly exit: readonly [0.4, 0, 1, 1];
836
836
  readonly linear: readonly [0, 0, 1, 1];
837
+ readonly drawer: readonly [0.22, 1, 0.36, 1];
837
838
  };
838
839
  declare const spring: {
839
840
  readonly gentle: {
@@ -882,6 +883,14 @@ declare const transition: {
882
883
  readonly duration: 0.15;
883
884
  readonly ease: readonly [0.4, 0, 0.2, 1];
884
885
  };
886
+ readonly drawer: {
887
+ readonly duration: 0.3;
888
+ readonly ease: readonly [0.22, 1, 0.36, 1];
889
+ };
890
+ readonly drawerExit: {
891
+ readonly duration: 0.2;
892
+ readonly ease: readonly [0.4, 0, 1, 1];
893
+ };
885
894
  };
886
895
  declare const fadeIn: {
887
896
  readonly hidden: {
@@ -1006,6 +1015,7 @@ declare const animation: {
1006
1015
  readonly enter: readonly [0, 0, 0.2, 1];
1007
1016
  readonly exit: readonly [0.4, 0, 1, 1];
1008
1017
  readonly linear: readonly [0, 0, 1, 1];
1018
+ readonly drawer: readonly [0.22, 1, 0.36, 1];
1009
1019
  };
1010
1020
  readonly spring: {
1011
1021
  readonly gentle: {
@@ -1054,6 +1064,14 @@ declare const animation: {
1054
1064
  readonly duration: 0.15;
1055
1065
  readonly ease: readonly [0.4, 0, 0.2, 1];
1056
1066
  };
1067
+ readonly drawer: {
1068
+ readonly duration: 0.3;
1069
+ readonly ease: readonly [0.22, 1, 0.36, 1];
1070
+ };
1071
+ readonly drawerExit: {
1072
+ readonly duration: 0.2;
1073
+ readonly ease: readonly [0.4, 0, 1, 1];
1074
+ };
1057
1075
  };
1058
1076
  readonly variants: {
1059
1077
  readonly fadeIn: {
@@ -2027,7 +2045,7 @@ declare function SheetFooter({ className, ...props }: react.ComponentProps<'div'
2027
2045
  declare function SheetTitle({ className, ...props }: react.ComponentProps<typeof Dialog$1.Title>): react.JSX.Element;
2028
2046
  declare function SheetDescription({ className, ...props }: react.ComponentProps<typeof Dialog$1.Description>): react.JSX.Element;
2029
2047
 
2030
- declare function Drawer({ children, open, onOpenChange, ...props }: ComponentProps<typeof Dialog$1.Root>): react.JSX.Element;
2048
+ declare function Drawer({ children, open, onOpenChange, modal, ...props }: ComponentProps<typeof Dialog$1.Root>): react.JSX.Element;
2031
2049
  declare function DrawerTrigger({ ...props }: ComponentProps<typeof Dialog$1.Trigger>): react.JSX.Element;
2032
2050
  declare function DrawerClose({ ...props }: ComponentProps<typeof Dialog$1.Close>): react.JSX.Element;
2033
2051
  declare function DrawerPortal({ children, ...props }: ComponentProps<typeof Dialog$1.Portal>): react.JSX.Element;
package/dist/main.js CHANGED
@@ -1593,7 +1593,8 @@ var ease = {
1593
1593
  smooth: [0.4, 0, 0.2, 1],
1594
1594
  enter: [0, 0, 0.2, 1],
1595
1595
  exit: [0.4, 0, 1, 1],
1596
- linear: [0, 0, 1, 1]
1596
+ linear: [0, 0, 1, 1],
1597
+ drawer: [0.22, 1, 0.36, 1]
1597
1598
  };
1598
1599
  var spring = {
1599
1600
  gentle: { type: "spring", stiffness: 260, damping: 28 },
@@ -1637,6 +1638,15 @@ var transition = {
1637
1638
  card: {
1638
1639
  duration: duration.fast,
1639
1640
  ease: ease.smooth
1641
+ },
1642
+ // Drawer / slide panel — smooth enter, fast exit
1643
+ drawer: {
1644
+ duration: 0.3,
1645
+ ease: ease.drawer
1646
+ },
1647
+ drawerExit: {
1648
+ duration: 0.2,
1649
+ ease: ease.exit
1640
1650
  }
1641
1651
  };
1642
1652
  var fadeIn = {
@@ -8359,14 +8369,15 @@ function DataTableSearch({
8359
8369
  )
8360
8370
  ] });
8361
8371
  }
8362
- var DrawerContext = createContext(false);
8363
- function Drawer({ children, open, onOpenChange, ...props }) {
8372
+ var DrawerContext = createContext({ isOpen: false, modal: true });
8373
+ function Drawer({ children, open, onOpenChange, modal = true, ...props }) {
8364
8374
  const [internalOpen, setInternalOpen] = useState(props.defaultOpen ?? false);
8365
8375
  const isOpen = open !== void 0 ? open : internalOpen;
8366
- return /* @__PURE__ */ jsx(DrawerContext.Provider, { value: isOpen, children: /* @__PURE__ */ jsx(
8376
+ return /* @__PURE__ */ jsx(DrawerContext.Provider, { value: { isOpen, modal }, children: /* @__PURE__ */ jsx(
8367
8377
  Dialog$1.Root,
8368
8378
  {
8369
8379
  "data-slot": "drawer",
8380
+ modal,
8370
8381
  ...props,
8371
8382
  open: isOpen,
8372
8383
  onOpenChange: (v) => {
@@ -8384,7 +8395,7 @@ function DrawerClose({ ...props }) {
8384
8395
  return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "drawer-close", ...props });
8385
8396
  }
8386
8397
  function DrawerPortal({ children, ...props }) {
8387
- const isOpen = useContext(DrawerContext);
8398
+ const { isOpen } = useContext(DrawerContext);
8388
8399
  return /* @__PURE__ */ jsx(Dialog$1.Portal, { forceMount: true, ...props, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "sync", children: isOpen && children }) });
8389
8400
  }
8390
8401
  function DrawerOverlay({ className, ...props }) {
@@ -8422,8 +8433,9 @@ function DrawerContent({
8422
8433
  const xInitial = side === "right" ? "100%" : side === "left" ? "-100%" : 0;
8423
8434
  const yInitial = side === "bottom" ? "100%" : side === "top" ? "-100%" : 0;
8424
8435
  const dragRef = useRef(null);
8436
+ const { modal } = useContext(DrawerContext);
8425
8437
  return /* @__PURE__ */ jsxs(DrawerPortal, { children: [
8426
- /* @__PURE__ */ jsx(DrawerOverlay, {}),
8438
+ modal && /* @__PURE__ */ jsx(DrawerOverlay, {}),
8427
8439
  /* @__PURE__ */ jsx(
8428
8440
  Dialog$1.Content,
8429
8441
  {
@@ -8447,9 +8459,8 @@ function DrawerContent({
8447
8459
  {
8448
8460
  className: cn("flex flex-col", isHorizontal && "h-full"),
8449
8461
  initial: { x: xInitial, y: yInitial, opacity: 0 },
8450
- animate: { x: 0, y: 0, opacity: 1 },
8451
- exit: { x: xInitial, y: yInitial, opacity: 0 },
8452
- transition: transition.sidebar,
8462
+ animate: { x: 0, y: 0, opacity: 1, transition: transition.drawer },
8463
+ exit: { x: xInitial, y: yInitial, opacity: 0, transition: transition.drawerExit },
8453
8464
  children: [
8454
8465
  children,
8455
8466
  showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "drawer-close", asChild: true, children: /* @__PURE__ */ jsxs(