@kopexa/drawer 10.0.9 → 11.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.
- package/dist/{chunk-ZHAZ2QI3.mjs → chunk-RYWBRHFV.mjs} +20 -21
- package/dist/{chunk-QUOFOYOZ.mjs → chunk-UHRRDW6S.mjs} +1 -1
- package/dist/drawer.d.mts +12 -10
- package/dist/drawer.d.ts +12 -10
- package/dist/drawer.js +20 -31
- package/dist/drawer.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -31
- package/dist/index.mjs +2 -2
- package/dist/namespace.d.mts +1 -1
- package/dist/namespace.d.ts +1 -1
- package/dist/namespace.js +20 -31
- package/dist/namespace.mjs +2 -2
- package/package.json +8 -8
|
@@ -6,10 +6,11 @@ var __export = (target, all) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// src/drawer.tsx
|
|
9
|
+
import { Dialog as SheetPrimitive } from "@base-ui-components/react/dialog";
|
|
9
10
|
import { CloseIcon } from "@kopexa/icons";
|
|
10
11
|
import { createContext } from "@kopexa/react-utils";
|
|
12
|
+
import { cn } from "@kopexa/shared-utils";
|
|
11
13
|
import { drawer } from "@kopexa/theme";
|
|
12
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
13
14
|
|
|
14
15
|
// ../../hooks/use-callback-ref/src/index.ts
|
|
15
16
|
import { useCallback, useInsertionEffect, useRef } from "react";
|
|
@@ -76,7 +77,7 @@ var DrawerRoot = (props) => {
|
|
|
76
77
|
});
|
|
77
78
|
const styles = drawer({ size, radius, placement });
|
|
78
79
|
return /* @__PURE__ */ jsx(DrawerProvider, { value: { styles, open, placement }, children: /* @__PURE__ */ jsx(
|
|
79
|
-
|
|
80
|
+
SheetPrimitive.Root,
|
|
80
81
|
{
|
|
81
82
|
"data-slot": "dialog",
|
|
82
83
|
open,
|
|
@@ -86,23 +87,21 @@ var DrawerRoot = (props) => {
|
|
|
86
87
|
) });
|
|
87
88
|
};
|
|
88
89
|
function DrawerTrigger({ ...props }) {
|
|
89
|
-
return /* @__PURE__ */ jsx(
|
|
90
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
90
91
|
}
|
|
91
92
|
function DrawerPortal({ ...props }) {
|
|
92
|
-
return /* @__PURE__ */ jsx(
|
|
93
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
|
|
93
94
|
}
|
|
94
95
|
function DrawerClose({ ...props }) {
|
|
95
|
-
return /* @__PURE__ */ jsx(
|
|
96
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "drawer-close", ...props });
|
|
96
97
|
}
|
|
97
98
|
function DrawerOverlay({ className, ...props }) {
|
|
98
99
|
const { styles } = useDrawerContext();
|
|
99
100
|
return /* @__PURE__ */ jsx(
|
|
100
|
-
|
|
101
|
+
SheetPrimitive.Backdrop,
|
|
101
102
|
{
|
|
102
103
|
"data-slot": "drawer-overlay",
|
|
103
|
-
className: styles.overlay(
|
|
104
|
-
className
|
|
105
|
-
}),
|
|
104
|
+
className: cn(styles.overlay(), className),
|
|
106
105
|
...props
|
|
107
106
|
}
|
|
108
107
|
);
|
|
@@ -113,15 +112,15 @@ var DrawerContent = (props) => {
|
|
|
113
112
|
return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
114
113
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
115
114
|
/* @__PURE__ */ jsxs(
|
|
116
|
-
|
|
115
|
+
SheetPrimitive.Popup,
|
|
117
116
|
{
|
|
118
117
|
"data-slot": "drawer-content",
|
|
119
|
-
className: styles.content(
|
|
118
|
+
className: cn(styles.content(), className),
|
|
120
119
|
...rest,
|
|
121
120
|
children: [
|
|
122
121
|
children,
|
|
123
122
|
showCloseButton && /* @__PURE__ */ jsxs(
|
|
124
|
-
|
|
123
|
+
SheetPrimitive.Close,
|
|
125
124
|
{
|
|
126
125
|
"data-slot": "dialog-close",
|
|
127
126
|
className: styles.close(),
|
|
@@ -142,7 +141,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
142
141
|
"div",
|
|
143
142
|
{
|
|
144
143
|
"data-slot": "drawer-header",
|
|
145
|
-
className: styles.header(
|
|
144
|
+
className: cn(styles.header(), className),
|
|
146
145
|
...props
|
|
147
146
|
}
|
|
148
147
|
);
|
|
@@ -153,7 +152,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
153
152
|
"div",
|
|
154
153
|
{
|
|
155
154
|
"data-slot": "drawer-footer",
|
|
156
|
-
className: styles.footer(
|
|
155
|
+
className: cn(styles.footer(), className),
|
|
157
156
|
...props
|
|
158
157
|
}
|
|
159
158
|
);
|
|
@@ -164,7 +163,7 @@ function DrawerBody({ className, ...props }) {
|
|
|
164
163
|
"div",
|
|
165
164
|
{
|
|
166
165
|
"data-slot": "drawer-body",
|
|
167
|
-
className: styles.body(
|
|
166
|
+
className: cn(styles.body(), className),
|
|
168
167
|
...props
|
|
169
168
|
}
|
|
170
169
|
);
|
|
@@ -172,10 +171,10 @@ function DrawerBody({ className, ...props }) {
|
|
|
172
171
|
function DrawerTitle({ className, ...props }) {
|
|
173
172
|
const { styles } = useDrawerContext();
|
|
174
173
|
return /* @__PURE__ */ jsx(
|
|
175
|
-
|
|
174
|
+
SheetPrimitive.Title,
|
|
176
175
|
{
|
|
177
176
|
"data-slot": "drawer-title",
|
|
178
|
-
className: styles.title(
|
|
177
|
+
className: cn(styles.title(), className),
|
|
179
178
|
...props
|
|
180
179
|
}
|
|
181
180
|
);
|
|
@@ -186,10 +185,10 @@ function DrawerDescription({
|
|
|
186
185
|
}) {
|
|
187
186
|
const { styles } = useDrawerContext();
|
|
188
187
|
return /* @__PURE__ */ jsx(
|
|
189
|
-
|
|
188
|
+
SheetPrimitive.Description,
|
|
190
189
|
{
|
|
191
190
|
"data-slot": "drawer-description",
|
|
192
|
-
className: styles.description(
|
|
191
|
+
className: cn(styles.description(), className),
|
|
193
192
|
...props
|
|
194
193
|
}
|
|
195
194
|
);
|
|
@@ -200,10 +199,10 @@ function DrawerCloseTrigger({
|
|
|
200
199
|
}) {
|
|
201
200
|
const { styles } = useDrawerContext();
|
|
202
201
|
return /* @__PURE__ */ jsx(
|
|
203
|
-
|
|
202
|
+
SheetPrimitive.Close,
|
|
204
203
|
{
|
|
205
204
|
"data-slot": "drawer-close-trigger",
|
|
206
|
-
className: styles.closeTrigger(
|
|
205
|
+
className: cn(styles.closeTrigger(), className),
|
|
207
206
|
...props
|
|
208
207
|
}
|
|
209
208
|
);
|
package/dist/drawer.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ComponentProps } from 'react';
|
|
4
|
+
import { Dialog } from '@base-ui-components/react/dialog';
|
|
4
5
|
import { drawer, DrawerVariantProps } from '@kopexa/theme';
|
|
5
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
6
|
|
|
7
7
|
type DrawerContextValue = {
|
|
8
8
|
styles: ReturnType<typeof drawer>;
|
|
@@ -12,17 +12,19 @@ type DrawerContextValue = {
|
|
|
12
12
|
declare const DrawerProvider: react.Provider<DrawerContextValue>;
|
|
13
13
|
declare const useDrawerContext: () => DrawerContextValue;
|
|
14
14
|
|
|
15
|
-
type DrawerRootProps = ComponentProps<typeof
|
|
15
|
+
type DrawerRootProps = Omit<ComponentProps<typeof Dialog.Root>, "onOpenChange"> & DrawerVariantProps & {
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
};
|
|
16
18
|
declare const DrawerRoot: (props: DrawerRootProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
-
type DrawerTriggerProps = ComponentProps<typeof
|
|
19
|
+
type DrawerTriggerProps = ComponentProps<typeof Dialog.Trigger>;
|
|
18
20
|
declare function DrawerTrigger({ ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
|
|
19
|
-
type DrawerPortalProps = ComponentProps<typeof
|
|
21
|
+
type DrawerPortalProps = ComponentProps<typeof Dialog.Portal>;
|
|
20
22
|
declare function DrawerPortal({ ...props }: DrawerPortalProps): react_jsx_runtime.JSX.Element;
|
|
21
|
-
type DrawerCloseProps = ComponentProps<typeof
|
|
23
|
+
type DrawerCloseProps = ComponentProps<typeof Dialog.Close>;
|
|
22
24
|
declare function DrawerClose({ ...props }: DrawerCloseProps): react_jsx_runtime.JSX.Element;
|
|
23
|
-
type DrawerOverlayProps = ComponentProps<typeof
|
|
25
|
+
type DrawerOverlayProps = ComponentProps<typeof Dialog.Backdrop>;
|
|
24
26
|
declare function DrawerOverlay({ className, ...props }: DrawerOverlayProps): react_jsx_runtime.JSX.Element;
|
|
25
|
-
type DrawerContentProps = ComponentProps<typeof
|
|
27
|
+
type DrawerContentProps = ComponentProps<typeof Dialog.Popup> & {
|
|
26
28
|
showCloseButton?: boolean;
|
|
27
29
|
};
|
|
28
30
|
declare const DrawerContent: (props: DrawerContentProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -32,11 +34,11 @@ type DrawerFooterProps = ComponentProps<"div">;
|
|
|
32
34
|
declare function DrawerFooter({ className, ...props }: DrawerFooterProps): react_jsx_runtime.JSX.Element;
|
|
33
35
|
type DrawerBodyProps = ComponentProps<"div">;
|
|
34
36
|
declare function DrawerBody({ className, ...props }: DrawerBodyProps): react_jsx_runtime.JSX.Element;
|
|
35
|
-
type DrawerTitleProps = ComponentProps<typeof
|
|
37
|
+
type DrawerTitleProps = ComponentProps<typeof Dialog.Title>;
|
|
36
38
|
declare function DrawerTitle({ className, ...props }: DrawerTitleProps): react_jsx_runtime.JSX.Element;
|
|
37
|
-
type DrawerDescriptionProps = ComponentProps<typeof
|
|
39
|
+
type DrawerDescriptionProps = ComponentProps<typeof Dialog.Description>;
|
|
38
40
|
declare function DrawerDescription({ className, ...props }: DrawerDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
39
|
-
type DrawerCloseTriggerProps = ComponentProps<typeof
|
|
41
|
+
type DrawerCloseTriggerProps = ComponentProps<typeof Dialog.Close>;
|
|
40
42
|
declare function DrawerCloseTrigger({ className, ...props }: DrawerCloseTriggerProps): react_jsx_runtime.JSX.Element;
|
|
41
43
|
|
|
42
44
|
export { DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerCloseTrigger, type DrawerCloseTriggerProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerOverlay, type DrawerOverlayProps, DrawerPortal, type DrawerPortalProps, DrawerProvider, DrawerRoot, type DrawerRootProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, useDrawerContext };
|
package/dist/drawer.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ComponentProps } from 'react';
|
|
4
|
+
import { Dialog } from '@base-ui-components/react/dialog';
|
|
4
5
|
import { drawer, DrawerVariantProps } from '@kopexa/theme';
|
|
5
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
6
|
|
|
7
7
|
type DrawerContextValue = {
|
|
8
8
|
styles: ReturnType<typeof drawer>;
|
|
@@ -12,17 +12,19 @@ type DrawerContextValue = {
|
|
|
12
12
|
declare const DrawerProvider: react.Provider<DrawerContextValue>;
|
|
13
13
|
declare const useDrawerContext: () => DrawerContextValue;
|
|
14
14
|
|
|
15
|
-
type DrawerRootProps = ComponentProps<typeof
|
|
15
|
+
type DrawerRootProps = Omit<ComponentProps<typeof Dialog.Root>, "onOpenChange"> & DrawerVariantProps & {
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
};
|
|
16
18
|
declare const DrawerRoot: (props: DrawerRootProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
-
type DrawerTriggerProps = ComponentProps<typeof
|
|
19
|
+
type DrawerTriggerProps = ComponentProps<typeof Dialog.Trigger>;
|
|
18
20
|
declare function DrawerTrigger({ ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
|
|
19
|
-
type DrawerPortalProps = ComponentProps<typeof
|
|
21
|
+
type DrawerPortalProps = ComponentProps<typeof Dialog.Portal>;
|
|
20
22
|
declare function DrawerPortal({ ...props }: DrawerPortalProps): react_jsx_runtime.JSX.Element;
|
|
21
|
-
type DrawerCloseProps = ComponentProps<typeof
|
|
23
|
+
type DrawerCloseProps = ComponentProps<typeof Dialog.Close>;
|
|
22
24
|
declare function DrawerClose({ ...props }: DrawerCloseProps): react_jsx_runtime.JSX.Element;
|
|
23
|
-
type DrawerOverlayProps = ComponentProps<typeof
|
|
25
|
+
type DrawerOverlayProps = ComponentProps<typeof Dialog.Backdrop>;
|
|
24
26
|
declare function DrawerOverlay({ className, ...props }: DrawerOverlayProps): react_jsx_runtime.JSX.Element;
|
|
25
|
-
type DrawerContentProps = ComponentProps<typeof
|
|
27
|
+
type DrawerContentProps = ComponentProps<typeof Dialog.Popup> & {
|
|
26
28
|
showCloseButton?: boolean;
|
|
27
29
|
};
|
|
28
30
|
declare const DrawerContent: (props: DrawerContentProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -32,11 +34,11 @@ type DrawerFooterProps = ComponentProps<"div">;
|
|
|
32
34
|
declare function DrawerFooter({ className, ...props }: DrawerFooterProps): react_jsx_runtime.JSX.Element;
|
|
33
35
|
type DrawerBodyProps = ComponentProps<"div">;
|
|
34
36
|
declare function DrawerBody({ className, ...props }: DrawerBodyProps): react_jsx_runtime.JSX.Element;
|
|
35
|
-
type DrawerTitleProps = ComponentProps<typeof
|
|
37
|
+
type DrawerTitleProps = ComponentProps<typeof Dialog.Title>;
|
|
36
38
|
declare function DrawerTitle({ className, ...props }: DrawerTitleProps): react_jsx_runtime.JSX.Element;
|
|
37
|
-
type DrawerDescriptionProps = ComponentProps<typeof
|
|
39
|
+
type DrawerDescriptionProps = ComponentProps<typeof Dialog.Description>;
|
|
38
40
|
declare function DrawerDescription({ className, ...props }: DrawerDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
39
|
-
type DrawerCloseTriggerProps = ComponentProps<typeof
|
|
41
|
+
type DrawerCloseTriggerProps = ComponentProps<typeof Dialog.Close>;
|
|
40
42
|
declare function DrawerCloseTrigger({ className, ...props }: DrawerCloseTriggerProps): react_jsx_runtime.JSX.Element;
|
|
41
43
|
|
|
42
44
|
export { DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerCloseTrigger, type DrawerCloseTriggerProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerOverlay, type DrawerOverlayProps, DrawerPortal, type DrawerPortalProps, DrawerProvider, DrawerRoot, type DrawerRootProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, useDrawerContext };
|
package/dist/drawer.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all)
|
|
@@ -18,14 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
16
|
}
|
|
19
17
|
return to;
|
|
20
18
|
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
20
|
|
|
31
21
|
// src/drawer.tsx
|
|
@@ -47,10 +37,11 @@ __export(drawer_exports, {
|
|
|
47
37
|
useDrawerContext: () => useDrawerContext
|
|
48
38
|
});
|
|
49
39
|
module.exports = __toCommonJS(drawer_exports);
|
|
40
|
+
var import_dialog = require("@base-ui-components/react/dialog");
|
|
50
41
|
var import_icons = require("@kopexa/icons");
|
|
51
42
|
var import_react_utils = require("@kopexa/react-utils");
|
|
43
|
+
var import_shared_utils = require("@kopexa/shared-utils");
|
|
52
44
|
var import_theme = require("@kopexa/theme");
|
|
53
|
-
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
54
45
|
|
|
55
46
|
// ../../hooks/use-callback-ref/src/index.ts
|
|
56
47
|
var import_react = require("react");
|
|
@@ -117,7 +108,7 @@ var DrawerRoot = (props) => {
|
|
|
117
108
|
});
|
|
118
109
|
const styles = (0, import_theme.drawer)({ size, radius, placement });
|
|
119
110
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerProvider, { value: { styles, open, placement }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
|
-
|
|
111
|
+
import_dialog.Dialog.Root,
|
|
121
112
|
{
|
|
122
113
|
"data-slot": "dialog",
|
|
123
114
|
open,
|
|
@@ -127,23 +118,21 @@ var DrawerRoot = (props) => {
|
|
|
127
118
|
) });
|
|
128
119
|
};
|
|
129
120
|
function DrawerTrigger({ ...props }) {
|
|
130
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
131
122
|
}
|
|
132
123
|
function DrawerPortal({ ...props }) {
|
|
133
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "drawer-portal", ...props });
|
|
134
125
|
}
|
|
135
126
|
function DrawerClose({ ...props }) {
|
|
136
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Close, { "data-slot": "drawer-close", ...props });
|
|
137
128
|
}
|
|
138
129
|
function DrawerOverlay({ className, ...props }) {
|
|
139
130
|
const { styles } = useDrawerContext();
|
|
140
131
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
|
-
|
|
132
|
+
import_dialog.Dialog.Backdrop,
|
|
142
133
|
{
|
|
143
134
|
"data-slot": "drawer-overlay",
|
|
144
|
-
className: styles.overlay(
|
|
145
|
-
className
|
|
146
|
-
}),
|
|
135
|
+
className: (0, import_shared_utils.cn)(styles.overlay(), className),
|
|
147
136
|
...props
|
|
148
137
|
}
|
|
149
138
|
);
|
|
@@ -154,15 +143,15 @@ var DrawerContent = (props) => {
|
|
|
154
143
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
155
144
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}),
|
|
156
145
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
157
|
-
|
|
146
|
+
import_dialog.Dialog.Popup,
|
|
158
147
|
{
|
|
159
148
|
"data-slot": "drawer-content",
|
|
160
|
-
className: styles.content(
|
|
149
|
+
className: (0, import_shared_utils.cn)(styles.content(), className),
|
|
161
150
|
...rest,
|
|
162
151
|
children: [
|
|
163
152
|
children,
|
|
164
153
|
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
165
|
-
|
|
154
|
+
import_dialog.Dialog.Close,
|
|
166
155
|
{
|
|
167
156
|
"data-slot": "dialog-close",
|
|
168
157
|
className: styles.close(),
|
|
@@ -183,7 +172,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
183
172
|
"div",
|
|
184
173
|
{
|
|
185
174
|
"data-slot": "drawer-header",
|
|
186
|
-
className: styles.header(
|
|
175
|
+
className: (0, import_shared_utils.cn)(styles.header(), className),
|
|
187
176
|
...props
|
|
188
177
|
}
|
|
189
178
|
);
|
|
@@ -194,7 +183,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
194
183
|
"div",
|
|
195
184
|
{
|
|
196
185
|
"data-slot": "drawer-footer",
|
|
197
|
-
className: styles.footer(
|
|
186
|
+
className: (0, import_shared_utils.cn)(styles.footer(), className),
|
|
198
187
|
...props
|
|
199
188
|
}
|
|
200
189
|
);
|
|
@@ -205,7 +194,7 @@ function DrawerBody({ className, ...props }) {
|
|
|
205
194
|
"div",
|
|
206
195
|
{
|
|
207
196
|
"data-slot": "drawer-body",
|
|
208
|
-
className: styles.body(
|
|
197
|
+
className: (0, import_shared_utils.cn)(styles.body(), className),
|
|
209
198
|
...props
|
|
210
199
|
}
|
|
211
200
|
);
|
|
@@ -213,10 +202,10 @@ function DrawerBody({ className, ...props }) {
|
|
|
213
202
|
function DrawerTitle({ className, ...props }) {
|
|
214
203
|
const { styles } = useDrawerContext();
|
|
215
204
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
216
|
-
|
|
205
|
+
import_dialog.Dialog.Title,
|
|
217
206
|
{
|
|
218
207
|
"data-slot": "drawer-title",
|
|
219
|
-
className: styles.title(
|
|
208
|
+
className: (0, import_shared_utils.cn)(styles.title(), className),
|
|
220
209
|
...props
|
|
221
210
|
}
|
|
222
211
|
);
|
|
@@ -227,10 +216,10 @@ function DrawerDescription({
|
|
|
227
216
|
}) {
|
|
228
217
|
const { styles } = useDrawerContext();
|
|
229
218
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
230
|
-
|
|
219
|
+
import_dialog.Dialog.Description,
|
|
231
220
|
{
|
|
232
221
|
"data-slot": "drawer-description",
|
|
233
|
-
className: styles.description(
|
|
222
|
+
className: (0, import_shared_utils.cn)(styles.description(), className),
|
|
234
223
|
...props
|
|
235
224
|
}
|
|
236
225
|
);
|
|
@@ -241,10 +230,10 @@ function DrawerCloseTrigger({
|
|
|
241
230
|
}) {
|
|
242
231
|
const { styles } = useDrawerContext();
|
|
243
232
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
244
|
-
|
|
233
|
+
import_dialog.Dialog.Close,
|
|
245
234
|
{
|
|
246
235
|
"data-slot": "drawer-close-trigger",
|
|
247
|
-
className: styles.closeTrigger(
|
|
236
|
+
className: (0, import_shared_utils.cn)(styles.closeTrigger(), className),
|
|
248
237
|
...props
|
|
249
238
|
}
|
|
250
239
|
);
|
package/dist/drawer.mjs
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all)
|
|
@@ -18,14 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
16
|
}
|
|
19
17
|
return to;
|
|
20
18
|
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
20
|
|
|
31
21
|
// src/index.ts
|
|
@@ -37,10 +27,11 @@ __export(index_exports, {
|
|
|
37
27
|
module.exports = __toCommonJS(index_exports);
|
|
38
28
|
|
|
39
29
|
// src/drawer.tsx
|
|
30
|
+
var import_dialog = require("@base-ui-components/react/dialog");
|
|
40
31
|
var import_icons = require("@kopexa/icons");
|
|
41
32
|
var import_react_utils = require("@kopexa/react-utils");
|
|
33
|
+
var import_shared_utils = require("@kopexa/shared-utils");
|
|
42
34
|
var import_theme = require("@kopexa/theme");
|
|
43
|
-
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
44
35
|
|
|
45
36
|
// ../../hooks/use-callback-ref/src/index.ts
|
|
46
37
|
var import_react = require("react");
|
|
@@ -107,7 +98,7 @@ var DrawerRoot = (props) => {
|
|
|
107
98
|
});
|
|
108
99
|
const styles = (0, import_theme.drawer)({ size, radius, placement });
|
|
109
100
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerProvider, { value: { styles, open, placement }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
-
|
|
101
|
+
import_dialog.Dialog.Root,
|
|
111
102
|
{
|
|
112
103
|
"data-slot": "dialog",
|
|
113
104
|
open,
|
|
@@ -117,23 +108,21 @@ var DrawerRoot = (props) => {
|
|
|
117
108
|
) });
|
|
118
109
|
};
|
|
119
110
|
function DrawerTrigger({ ...props }) {
|
|
120
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
121
112
|
}
|
|
122
113
|
function DrawerPortal({ ...props }) {
|
|
123
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "drawer-portal", ...props });
|
|
124
115
|
}
|
|
125
116
|
function DrawerClose({ ...props }) {
|
|
126
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Close, { "data-slot": "drawer-close", ...props });
|
|
127
118
|
}
|
|
128
119
|
function DrawerOverlay({ className, ...props }) {
|
|
129
120
|
const { styles } = useDrawerContext();
|
|
130
121
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
131
|
-
|
|
122
|
+
import_dialog.Dialog.Backdrop,
|
|
132
123
|
{
|
|
133
124
|
"data-slot": "drawer-overlay",
|
|
134
|
-
className: styles.overlay(
|
|
135
|
-
className
|
|
136
|
-
}),
|
|
125
|
+
className: (0, import_shared_utils.cn)(styles.overlay(), className),
|
|
137
126
|
...props
|
|
138
127
|
}
|
|
139
128
|
);
|
|
@@ -144,15 +133,15 @@ var DrawerContent = (props) => {
|
|
|
144
133
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
145
134
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}),
|
|
146
135
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
147
|
-
|
|
136
|
+
import_dialog.Dialog.Popup,
|
|
148
137
|
{
|
|
149
138
|
"data-slot": "drawer-content",
|
|
150
|
-
className: styles.content(
|
|
139
|
+
className: (0, import_shared_utils.cn)(styles.content(), className),
|
|
151
140
|
...rest,
|
|
152
141
|
children: [
|
|
153
142
|
children,
|
|
154
143
|
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
155
|
-
|
|
144
|
+
import_dialog.Dialog.Close,
|
|
156
145
|
{
|
|
157
146
|
"data-slot": "dialog-close",
|
|
158
147
|
className: styles.close(),
|
|
@@ -173,7 +162,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
173
162
|
"div",
|
|
174
163
|
{
|
|
175
164
|
"data-slot": "drawer-header",
|
|
176
|
-
className: styles.header(
|
|
165
|
+
className: (0, import_shared_utils.cn)(styles.header(), className),
|
|
177
166
|
...props
|
|
178
167
|
}
|
|
179
168
|
);
|
|
@@ -184,7 +173,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
184
173
|
"div",
|
|
185
174
|
{
|
|
186
175
|
"data-slot": "drawer-footer",
|
|
187
|
-
className: styles.footer(
|
|
176
|
+
className: (0, import_shared_utils.cn)(styles.footer(), className),
|
|
188
177
|
...props
|
|
189
178
|
}
|
|
190
179
|
);
|
|
@@ -195,7 +184,7 @@ function DrawerBody({ className, ...props }) {
|
|
|
195
184
|
"div",
|
|
196
185
|
{
|
|
197
186
|
"data-slot": "drawer-body",
|
|
198
|
-
className: styles.body(
|
|
187
|
+
className: (0, import_shared_utils.cn)(styles.body(), className),
|
|
199
188
|
...props
|
|
200
189
|
}
|
|
201
190
|
);
|
|
@@ -203,10 +192,10 @@ function DrawerBody({ className, ...props }) {
|
|
|
203
192
|
function DrawerTitle({ className, ...props }) {
|
|
204
193
|
const { styles } = useDrawerContext();
|
|
205
194
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
206
|
-
|
|
195
|
+
import_dialog.Dialog.Title,
|
|
207
196
|
{
|
|
208
197
|
"data-slot": "drawer-title",
|
|
209
|
-
className: styles.title(
|
|
198
|
+
className: (0, import_shared_utils.cn)(styles.title(), className),
|
|
210
199
|
...props
|
|
211
200
|
}
|
|
212
201
|
);
|
|
@@ -217,10 +206,10 @@ function DrawerDescription({
|
|
|
217
206
|
}) {
|
|
218
207
|
const { styles } = useDrawerContext();
|
|
219
208
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
220
|
-
|
|
209
|
+
import_dialog.Dialog.Description,
|
|
221
210
|
{
|
|
222
211
|
"data-slot": "drawer-description",
|
|
223
|
-
className: styles.description(
|
|
212
|
+
className: (0, import_shared_utils.cn)(styles.description(), className),
|
|
224
213
|
...props
|
|
225
214
|
}
|
|
226
215
|
);
|
|
@@ -231,10 +220,10 @@ function DrawerCloseTrigger({
|
|
|
231
220
|
}) {
|
|
232
221
|
const { styles } = useDrawerContext();
|
|
233
222
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
234
|
-
|
|
223
|
+
import_dialog.Dialog.Close,
|
|
235
224
|
{
|
|
236
225
|
"data-slot": "drawer-close-trigger",
|
|
237
|
-
className: styles.closeTrigger(
|
|
226
|
+
className: (0, import_shared_utils.cn)(styles.closeTrigger(), className),
|
|
238
227
|
...props
|
|
239
228
|
}
|
|
240
229
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
namespace_exports
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UHRRDW6S.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useDrawerContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RYWBRHFV.mjs";
|
|
8
8
|
export {
|
|
9
9
|
namespace_exports as Drawer,
|
|
10
10
|
useDrawerContext
|
package/dist/namespace.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DrawerBody, DrawerBodyProps, DrawerClose, DrawerCloseProps, DrawerCloseTrigger, DrawerCloseTriggerProps, DrawerContent, DrawerContentProps, DrawerDescription, DrawerDescriptionProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerOverlay, DrawerOverlayProps, DrawerPortal, DrawerPortalProps, DrawerRoot, DrawerRootProps, DrawerTitle, DrawerTitleProps, DrawerTrigger, DrawerTriggerProps } from './drawer.mjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
|
+
import '@base-ui-components/react/dialog';
|
|
4
5
|
import '@kopexa/theme';
|
|
5
|
-
import '@radix-ui/react-dialog';
|
|
6
6
|
|
|
7
7
|
declare namespace namespace {
|
|
8
8
|
export { DrawerBody as Body, DrawerBodyProps as BodyProps, DrawerClose as Close, DrawerCloseProps as CloseProps, DrawerCloseTrigger as CloseTrigger, DrawerCloseTriggerProps as CloseTriggerProps, DrawerContent as Content, DrawerContentProps as ContentProps, DrawerDescription as Description, DrawerDescriptionProps as DescriptionProps, DrawerFooter as Footer, DrawerFooterProps as FooterProps, DrawerHeader as Header, DrawerHeaderProps as HeaderProps, DrawerOverlay as Overlay, DrawerOverlayProps as OverlayProps, DrawerPortal as Portal, DrawerPortalProps as PortalProps, DrawerRoot as Root, DrawerRootProps as RootProps, DrawerTitle as Title, DrawerTitleProps as TitleProps, DrawerTrigger as Trigger, DrawerTriggerProps as TriggerProps };
|
package/dist/namespace.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DrawerBody, DrawerBodyProps, DrawerClose, DrawerCloseProps, DrawerCloseTrigger, DrawerCloseTriggerProps, DrawerContent, DrawerContentProps, DrawerDescription, DrawerDescriptionProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerOverlay, DrawerOverlayProps, DrawerPortal, DrawerPortalProps, DrawerRoot, DrawerRootProps, DrawerTitle, DrawerTitleProps, DrawerTrigger, DrawerTriggerProps } from './drawer.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
|
+
import '@base-ui-components/react/dialog';
|
|
4
5
|
import '@kopexa/theme';
|
|
5
|
-
import '@radix-ui/react-dialog';
|
|
6
6
|
|
|
7
7
|
declare namespace namespace {
|
|
8
8
|
export { DrawerBody as Body, DrawerBodyProps as BodyProps, DrawerClose as Close, DrawerCloseProps as CloseProps, DrawerCloseTrigger as CloseTrigger, DrawerCloseTriggerProps as CloseTriggerProps, DrawerContent as Content, DrawerContentProps as ContentProps, DrawerDescription as Description, DrawerDescriptionProps as DescriptionProps, DrawerFooter as Footer, DrawerFooterProps as FooterProps, DrawerHeader as Header, DrawerHeaderProps as HeaderProps, DrawerOverlay as Overlay, DrawerOverlayProps as OverlayProps, DrawerPortal as Portal, DrawerPortalProps as PortalProps, DrawerRoot as Root, DrawerRootProps as RootProps, DrawerTitle as Title, DrawerTitleProps as TitleProps, DrawerTrigger as Trigger, DrawerTriggerProps as TriggerProps };
|
package/dist/namespace.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all)
|
|
@@ -18,14 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
16
|
}
|
|
19
17
|
return to;
|
|
20
18
|
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
20
|
|
|
31
21
|
// src/namespace.ts
|
|
@@ -47,10 +37,11 @@ __export(namespace_exports, {
|
|
|
47
37
|
module.exports = __toCommonJS(namespace_exports);
|
|
48
38
|
|
|
49
39
|
// src/drawer.tsx
|
|
40
|
+
var import_dialog = require("@base-ui-components/react/dialog");
|
|
50
41
|
var import_icons = require("@kopexa/icons");
|
|
51
42
|
var import_react_utils = require("@kopexa/react-utils");
|
|
43
|
+
var import_shared_utils = require("@kopexa/shared-utils");
|
|
52
44
|
var import_theme = require("@kopexa/theme");
|
|
53
|
-
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
54
45
|
|
|
55
46
|
// ../../hooks/use-callback-ref/src/index.ts
|
|
56
47
|
var import_react = require("react");
|
|
@@ -117,7 +108,7 @@ var DrawerRoot = (props) => {
|
|
|
117
108
|
});
|
|
118
109
|
const styles = (0, import_theme.drawer)({ size, radius, placement });
|
|
119
110
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerProvider, { value: { styles, open, placement }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
|
-
|
|
111
|
+
import_dialog.Dialog.Root,
|
|
121
112
|
{
|
|
122
113
|
"data-slot": "dialog",
|
|
123
114
|
open,
|
|
@@ -127,23 +118,21 @@ var DrawerRoot = (props) => {
|
|
|
127
118
|
) });
|
|
128
119
|
};
|
|
129
120
|
function DrawerTrigger({ ...props }) {
|
|
130
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
131
122
|
}
|
|
132
123
|
function DrawerPortal({ ...props }) {
|
|
133
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "drawer-portal", ...props });
|
|
134
125
|
}
|
|
135
126
|
function DrawerClose({ ...props }) {
|
|
136
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Close, { "data-slot": "drawer-close", ...props });
|
|
137
128
|
}
|
|
138
129
|
function DrawerOverlay({ className, ...props }) {
|
|
139
130
|
const { styles } = useDrawerContext();
|
|
140
131
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
|
-
|
|
132
|
+
import_dialog.Dialog.Backdrop,
|
|
142
133
|
{
|
|
143
134
|
"data-slot": "drawer-overlay",
|
|
144
|
-
className: styles.overlay(
|
|
145
|
-
className
|
|
146
|
-
}),
|
|
135
|
+
className: (0, import_shared_utils.cn)(styles.overlay(), className),
|
|
147
136
|
...props
|
|
148
137
|
}
|
|
149
138
|
);
|
|
@@ -154,15 +143,15 @@ var DrawerContent = (props) => {
|
|
|
154
143
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
155
144
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}),
|
|
156
145
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
157
|
-
|
|
146
|
+
import_dialog.Dialog.Popup,
|
|
158
147
|
{
|
|
159
148
|
"data-slot": "drawer-content",
|
|
160
|
-
className: styles.content(
|
|
149
|
+
className: (0, import_shared_utils.cn)(styles.content(), className),
|
|
161
150
|
...rest,
|
|
162
151
|
children: [
|
|
163
152
|
children,
|
|
164
153
|
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
165
|
-
|
|
154
|
+
import_dialog.Dialog.Close,
|
|
166
155
|
{
|
|
167
156
|
"data-slot": "dialog-close",
|
|
168
157
|
className: styles.close(),
|
|
@@ -183,7 +172,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
183
172
|
"div",
|
|
184
173
|
{
|
|
185
174
|
"data-slot": "drawer-header",
|
|
186
|
-
className: styles.header(
|
|
175
|
+
className: (0, import_shared_utils.cn)(styles.header(), className),
|
|
187
176
|
...props
|
|
188
177
|
}
|
|
189
178
|
);
|
|
@@ -194,7 +183,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
194
183
|
"div",
|
|
195
184
|
{
|
|
196
185
|
"data-slot": "drawer-footer",
|
|
197
|
-
className: styles.footer(
|
|
186
|
+
className: (0, import_shared_utils.cn)(styles.footer(), className),
|
|
198
187
|
...props
|
|
199
188
|
}
|
|
200
189
|
);
|
|
@@ -205,7 +194,7 @@ function DrawerBody({ className, ...props }) {
|
|
|
205
194
|
"div",
|
|
206
195
|
{
|
|
207
196
|
"data-slot": "drawer-body",
|
|
208
|
-
className: styles.body(
|
|
197
|
+
className: (0, import_shared_utils.cn)(styles.body(), className),
|
|
209
198
|
...props
|
|
210
199
|
}
|
|
211
200
|
);
|
|
@@ -213,10 +202,10 @@ function DrawerBody({ className, ...props }) {
|
|
|
213
202
|
function DrawerTitle({ className, ...props }) {
|
|
214
203
|
const { styles } = useDrawerContext();
|
|
215
204
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
216
|
-
|
|
205
|
+
import_dialog.Dialog.Title,
|
|
217
206
|
{
|
|
218
207
|
"data-slot": "drawer-title",
|
|
219
|
-
className: styles.title(
|
|
208
|
+
className: (0, import_shared_utils.cn)(styles.title(), className),
|
|
220
209
|
...props
|
|
221
210
|
}
|
|
222
211
|
);
|
|
@@ -227,10 +216,10 @@ function DrawerDescription({
|
|
|
227
216
|
}) {
|
|
228
217
|
const { styles } = useDrawerContext();
|
|
229
218
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
230
|
-
|
|
219
|
+
import_dialog.Dialog.Description,
|
|
231
220
|
{
|
|
232
221
|
"data-slot": "drawer-description",
|
|
233
|
-
className: styles.description(
|
|
222
|
+
className: (0, import_shared_utils.cn)(styles.description(), className),
|
|
234
223
|
...props
|
|
235
224
|
}
|
|
236
225
|
);
|
|
@@ -241,10 +230,10 @@ function DrawerCloseTrigger({
|
|
|
241
230
|
}) {
|
|
242
231
|
const { styles } = useDrawerContext();
|
|
243
232
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
244
|
-
|
|
233
|
+
import_dialog.Dialog.Close,
|
|
245
234
|
{
|
|
246
235
|
"data-slot": "drawer-close-trigger",
|
|
247
|
-
className: styles.closeTrigger(
|
|
236
|
+
className: (0, import_shared_utils.cn)(styles.closeTrigger(), className),
|
|
248
237
|
...props
|
|
249
238
|
}
|
|
250
239
|
);
|
package/dist/namespace.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-UHRRDW6S.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-
|
|
16
|
+
} from "./chunk-RYWBRHFV.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": "
|
|
3
|
+
"version": "11.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": "
|
|
30
|
+
"@kopexa/theme": "2.0.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@kopexa/
|
|
35
|
-
"@kopexa/
|
|
36
|
-
"@kopexa/
|
|
37
|
-
"@kopexa/
|
|
38
|
-
"@kopexa/
|
|
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"
|
|
39
39
|
},
|
|
40
40
|
"clean-package": "../../../clean-package.config.json",
|
|
41
41
|
"module": "dist/index.mjs",
|