@kopexa/drawer 11.0.0 → 13.0.0

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.
@@ -13,7 +13,7 @@ import {
13
13
  DrawerTitle,
14
14
  DrawerTrigger,
15
15
  __export
16
- } from "./chunk-RYWBRHFV.mjs";
16
+ } from "./chunk-PI2WIR3H.mjs";
17
17
 
18
18
  // src/namespace.ts
19
19
  var namespace_exports = {};
@@ -86,8 +86,20 @@ var DrawerRoot = (props) => {
86
86
  }
87
87
  ) });
88
88
  };
89
- function DrawerTrigger({ ...props }) {
90
- return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
89
+ function DrawerTrigger({
90
+ asChild = false,
91
+ children,
92
+ ...props
93
+ }) {
94
+ return /* @__PURE__ */ jsx(
95
+ SheetPrimitive.Trigger,
96
+ {
97
+ "data-slot": "drawer-trigger",
98
+ render: asChild ? children : void 0,
99
+ ...props,
100
+ children: !asChild && children
101
+ }
102
+ );
91
103
  }
92
104
  function DrawerPortal({ ...props }) {
93
105
  return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
package/dist/drawer.d.mts CHANGED
@@ -16,8 +16,15 @@ type DrawerRootProps = Omit<ComponentProps<typeof Dialog.Root>, "onOpenChange">
16
16
  onOpenChange?: (open: boolean) => void;
17
17
  };
18
18
  declare const DrawerRoot: (props: DrawerRootProps) => react_jsx_runtime.JSX.Element;
19
- type DrawerTriggerProps = ComponentProps<typeof Dialog.Trigger>;
20
- declare function DrawerTrigger({ ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
19
+ type DrawerTriggerProps = ComponentProps<typeof Dialog.Trigger> & {
20
+ /**
21
+ * If true, the child element will be used as the trigger element.
22
+ * You should use render={} instead of asChild going forward.
23
+ * @deprecated please use render={}
24
+ */
25
+ asChild?: boolean;
26
+ };
27
+ declare function DrawerTrigger({ asChild, children, ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
21
28
  type DrawerPortalProps = ComponentProps<typeof Dialog.Portal>;
22
29
  declare function DrawerPortal({ ...props }: DrawerPortalProps): react_jsx_runtime.JSX.Element;
23
30
  type DrawerCloseProps = ComponentProps<typeof Dialog.Close>;
package/dist/drawer.d.ts CHANGED
@@ -16,8 +16,15 @@ type DrawerRootProps = Omit<ComponentProps<typeof Dialog.Root>, "onOpenChange">
16
16
  onOpenChange?: (open: boolean) => void;
17
17
  };
18
18
  declare const DrawerRoot: (props: DrawerRootProps) => react_jsx_runtime.JSX.Element;
19
- type DrawerTriggerProps = ComponentProps<typeof Dialog.Trigger>;
20
- declare function DrawerTrigger({ ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
19
+ type DrawerTriggerProps = ComponentProps<typeof Dialog.Trigger> & {
20
+ /**
21
+ * If true, the child element will be used as the trigger element.
22
+ * You should use render={} instead of asChild going forward.
23
+ * @deprecated please use render={}
24
+ */
25
+ asChild?: boolean;
26
+ };
27
+ declare function DrawerTrigger({ asChild, children, ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
21
28
  type DrawerPortalProps = ComponentProps<typeof Dialog.Portal>;
22
29
  declare function DrawerPortal({ ...props }: DrawerPortalProps): react_jsx_runtime.JSX.Element;
23
30
  type DrawerCloseProps = ComponentProps<typeof Dialog.Close>;
package/dist/drawer.js CHANGED
@@ -117,8 +117,20 @@ var DrawerRoot = (props) => {
117
117
  }
118
118
  ) });
119
119
  };
120
- function DrawerTrigger({ ...props }) {
121
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "drawer-trigger", ...props });
120
+ function DrawerTrigger({
121
+ asChild = false,
122
+ children,
123
+ ...props
124
+ }) {
125
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
+ import_dialog.Dialog.Trigger,
127
+ {
128
+ "data-slot": "drawer-trigger",
129
+ render: asChild ? children : void 0,
130
+ ...props,
131
+ children: !asChild && children
132
+ }
133
+ );
122
134
  }
123
135
  function DrawerPortal({ ...props }) {
124
136
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "drawer-portal", ...props });
package/dist/drawer.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  DrawerTitle,
15
15
  DrawerTrigger,
16
16
  useDrawerContext
17
- } from "./chunk-RYWBRHFV.mjs";
17
+ } from "./chunk-PI2WIR3H.mjs";
18
18
  export {
19
19
  DrawerBody,
20
20
  DrawerClose,
package/dist/index.js CHANGED
@@ -107,8 +107,20 @@ var DrawerRoot = (props) => {
107
107
  }
108
108
  ) });
109
109
  };
110
- function DrawerTrigger({ ...props }) {
111
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "drawer-trigger", ...props });
110
+ function DrawerTrigger({
111
+ asChild = false,
112
+ children,
113
+ ...props
114
+ }) {
115
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
+ import_dialog.Dialog.Trigger,
117
+ {
118
+ "data-slot": "drawer-trigger",
119
+ render: asChild ? children : void 0,
120
+ ...props,
121
+ children: !asChild && children
122
+ }
123
+ );
112
124
  }
113
125
  function DrawerPortal({ ...props }) {
114
126
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "drawer-portal", ...props });
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  namespace_exports
4
- } from "./chunk-UHRRDW6S.mjs";
4
+ } from "./chunk-4DCIRIDK.mjs";
5
5
  import {
6
6
  useDrawerContext
7
- } from "./chunk-RYWBRHFV.mjs";
7
+ } from "./chunk-PI2WIR3H.mjs";
8
8
  export {
9
9
  namespace_exports as Drawer,
10
10
  useDrawerContext
package/dist/namespace.js CHANGED
@@ -117,8 +117,20 @@ var DrawerRoot = (props) => {
117
117
  }
118
118
  ) });
119
119
  };
120
- function DrawerTrigger({ ...props }) {
121
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "drawer-trigger", ...props });
120
+ function DrawerTrigger({
121
+ asChild = false,
122
+ children,
123
+ ...props
124
+ }) {
125
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
+ import_dialog.Dialog.Trigger,
127
+ {
128
+ "data-slot": "drawer-trigger",
129
+ render: asChild ? children : void 0,
130
+ ...props,
131
+ children: !asChild && children
132
+ }
133
+ );
122
134
  }
123
135
  function DrawerPortal({ ...props }) {
124
136
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "drawer-portal", ...props });
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import "./chunk-UHRRDW6S.mjs";
2
+ import "./chunk-4DCIRIDK.mjs";
3
3
  import {
4
4
  DrawerBody,
5
5
  DrawerClose,
@@ -13,7 +13,7 @@ import {
13
13
  DrawerRoot,
14
14
  DrawerTitle,
15
15
  DrawerTrigger
16
- } from "./chunk-RYWBRHFV.mjs";
16
+ } from "./chunk-PI2WIR3H.mjs";
17
17
  export {
18
18
  DrawerBody as Body,
19
19
  DrawerClose as Close,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopexa/drawer",
3
- "version": "11.0.0",
3
+ "version": "13.0.0",
4
4
  "description": "A drawer for kopexa",
5
5
  "keywords": [
6
6
  "drawer"
@@ -27,15 +27,15 @@
27
27
  "peerDependencies": {
28
28
  "react": ">=19.0.0-rc.0",
29
29
  "react-dom": ">=19.0.0-rc.0",
30
- "@kopexa/theme": "2.0.0"
30
+ "@kopexa/theme": "13.0.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "@base-ui-components/react": "1.0.0-beta.3",
34
- "@kopexa/icons": "11.0.0",
35
- "@kopexa/motion-utils": "11.0.0",
36
- "@kopexa/react-utils": "3.0.0",
37
- "@kopexa/shared-utils": "2.0.0",
38
- "@kopexa/use-controllable-state": "2.0.0"
34
+ "@kopexa/icons": "13.0.0",
35
+ "@kopexa/motion-utils": "13.0.0",
36
+ "@kopexa/shared-utils": "13.0.0",
37
+ "@kopexa/use-controllable-state": "13.0.0",
38
+ "@kopexa/react-utils": "13.0.0"
39
39
  },
40
40
  "clean-package": "../../../clean-package.config.json",
41
41
  "module": "dist/index.mjs",