@kopexa/dialog 9.0.7 → 9.0.9

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.
@@ -1,22 +1,12 @@
1
1
  "use client";
2
- import {
3
- scaleInOut
4
- } from "./chunk-I6IVWHHG.mjs";
5
2
 
6
3
  // src/dialog.tsx
7
4
  import { CloseIcon } from "@kopexa/icons";
8
- import { TRANSITION_VARIANTS } from "@kopexa/motion-utils";
9
5
  import { createContext } from "@kopexa/react-utils";
10
6
  import { cn } from "@kopexa/shared-utils";
11
7
  import { dialog } from "@kopexa/theme";
12
8
  import { useControllableState } from "@kopexa/use-controllable-state";
13
9
  import * as DialogPrimitive from "@radix-ui/react-dialog";
14
- import {
15
- AnimatePresence,
16
- domAnimation,
17
- LazyMotion,
18
- motion
19
- } from "motion/react";
20
10
  import { jsx, jsxs } from "react/jsx-runtime";
21
11
  var [DialogProvider, useDialogContext] = createContext();
22
12
  var DialogRoot = (props) => {
@@ -55,26 +45,16 @@ function DialogClose({ ...props }) {
55
45
  }
56
46
  function DialogOverlay({ className, ...props }) {
57
47
  const { styles } = useDialogContext();
58
- return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsx(
48
+ return /* @__PURE__ */ jsx(
59
49
  DialogPrimitive.Overlay,
60
50
  {
61
51
  "data-slot": "dialog-overlay",
62
52
  className: styles.overlay({
63
53
  className
64
54
  }),
65
- ...props,
66
- asChild: true,
67
- children: /* @__PURE__ */ jsx(
68
- motion.div,
69
- {
70
- animate: "enter",
71
- exit: "exit",
72
- initial: "exit",
73
- variants: TRANSITION_VARIANTS.fade
74
- }
75
- )
55
+ ...props
76
56
  }
77
- ) });
57
+ );
78
58
  }
79
59
  function DialogContent({
80
60
  className,
@@ -82,42 +62,32 @@ function DialogContent({
82
62
  showCloseButton = true,
83
63
  ...props
84
64
  }) {
85
- const { styles, open } = useDialogContext();
86
- return /* @__PURE__ */ jsx(AnimatePresence, { children: open ? /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", forceMount: true, children: [
65
+ const { styles } = useDialogContext();
66
+ return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
87
67
  /* @__PURE__ */ jsx(DialogOverlay, {}),
88
- /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsx(
68
+ /* @__PURE__ */ jsxs(
89
69
  DialogPrimitive.Content,
90
70
  {
91
71
  "data-slot": "dialog-content",
92
72
  className: cn(styles.content(), className),
93
- asChild: true,
94
73
  ...props,
95
- children: /* @__PURE__ */ jsxs(
96
- motion.div,
97
- {
98
- animate: "enter",
99
- exit: "exit",
100
- initial: "exit",
101
- variants: scaleInOut,
102
- children: [
103
- children,
104
- showCloseButton && /* @__PURE__ */ jsxs(
105
- DialogPrimitive.Close,
106
- {
107
- "data-slot": "dialog-close",
108
- className: styles.close(),
109
- children: [
110
- /* @__PURE__ */ jsx(CloseIcon, {}),
111
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
112
- ]
113
- }
114
- )
115
- ]
116
- }
117
- )
74
+ children: [
75
+ children,
76
+ showCloseButton && /* @__PURE__ */ jsxs(
77
+ DialogPrimitive.Close,
78
+ {
79
+ "data-slot": "dialog-close",
80
+ className: styles.close(),
81
+ children: [
82
+ /* @__PURE__ */ jsx(CloseIcon, {}),
83
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
84
+ ]
85
+ }
86
+ )
87
+ ]
118
88
  }
119
- ) })
120
- ] }) : null });
89
+ )
90
+ ] });
121
91
  }
122
92
  function DialogHeader({ className, ...props }) {
123
93
  const { styles } = useDialogContext();
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ var __defProp = Object.defineProperty;
3
+ var __export = (target, all) => {
4
+ for (var name in all)
5
+ __defProp(target, name, { get: all[name], enumerable: true });
6
+ };
7
+
8
+ export {
9
+ __export
10
+ };
@@ -12,10 +12,10 @@ import {
12
12
  DialogRoot,
13
13
  DialogTitle,
14
14
  DialogTrigger
15
- } from "./chunk-QDJEB3MY.mjs";
15
+ } from "./chunk-5S6NCDGO.mjs";
16
16
  import {
17
17
  __export
18
- } from "./chunk-I6IVWHHG.mjs";
18
+ } from "./chunk-C7GZJJIK.mjs";
19
19
 
20
20
  // src/namespace.ts
21
21
  var namespace_exports = {};
package/dist/dialog.js CHANGED
@@ -47,51 +47,11 @@ __export(dialog_exports, {
47
47
  });
48
48
  module.exports = __toCommonJS(dialog_exports);
49
49
  var import_icons = require("@kopexa/icons");
50
- var import_motion_utils2 = require("@kopexa/motion-utils");
51
50
  var import_react_utils = require("@kopexa/react-utils");
52
51
  var import_shared_utils = require("@kopexa/shared-utils");
53
52
  var import_theme = require("@kopexa/theme");
54
53
  var import_use_controllable_state = require("@kopexa/use-controllable-state");
55
54
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
56
- var import_react = require("motion/react");
57
-
58
- // src/transition.ts
59
- var import_motion_utils = require("@kopexa/motion-utils");
60
- var scaleInOut = {
61
- enter: {
62
- scale: "var(--scale-enter)",
63
- y: "var(--slide-enter)",
64
- opacity: 1,
65
- willChange: "auto",
66
- transition: {
67
- scale: {
68
- duration: 0.4,
69
- ease: import_motion_utils.TRANSITION_EASINGS.ease
70
- },
71
- opacity: {
72
- duration: 0.4,
73
- ease: import_motion_utils.TRANSITION_EASINGS.ease
74
- },
75
- y: {
76
- type: "spring",
77
- bounce: 0,
78
- duration: 0.6
79
- }
80
- }
81
- },
82
- exit: {
83
- scale: "var(--scale-exit)",
84
- y: "var(--slide-exit)",
85
- opacity: 0,
86
- willChange: "transform",
87
- transition: {
88
- duration: 0.3,
89
- ease: import_motion_utils.TRANSITION_EASINGS.ease
90
- }
91
- }
92
- };
93
-
94
- // src/dialog.tsx
95
55
  var import_jsx_runtime = require("react/jsx-runtime");
96
56
  var [DialogProvider, useDialogContext] = (0, import_react_utils.createContext)();
97
57
  var DialogRoot = (props) => {
@@ -130,26 +90,16 @@ function DialogClose({ ...props }) {
130
90
  }
131
91
  function DialogOverlay({ className, ...props }) {
132
92
  const { styles } = useDialogContext();
133
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.LazyMotion, { features: import_react.domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
134
94
  DialogPrimitive.Overlay,
135
95
  {
136
96
  "data-slot": "dialog-overlay",
137
97
  className: styles.overlay({
138
98
  className
139
99
  }),
140
- ...props,
141
- asChild: true,
142
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
143
- import_react.motion.div,
144
- {
145
- animate: "enter",
146
- exit: "exit",
147
- initial: "exit",
148
- variants: import_motion_utils2.TRANSITION_VARIANTS.fade
149
- }
150
- )
100
+ ...props
151
101
  }
152
- ) });
102
+ );
153
103
  }
154
104
  function DialogContent({
155
105
  className,
@@ -157,42 +107,32 @@ function DialogContent({
157
107
  showCloseButton = true,
158
108
  ...props
159
109
  }) {
160
- const { styles, open } = useDialogContext();
161
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.AnimatePresence, { children: open ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", forceMount: true, children: [
110
+ const { styles } = useDialogContext();
111
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
162
112
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
163
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.LazyMotion, { features: import_react.domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
164
114
  DialogPrimitive.Content,
165
115
  {
166
116
  "data-slot": "dialog-content",
167
117
  className: (0, import_shared_utils.cn)(styles.content(), className),
168
- asChild: true,
169
118
  ...props,
170
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
171
- import_react.motion.div,
172
- {
173
- animate: "enter",
174
- exit: "exit",
175
- initial: "exit",
176
- variants: scaleInOut,
177
- children: [
178
- children,
179
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
180
- DialogPrimitive.Close,
181
- {
182
- "data-slot": "dialog-close",
183
- className: styles.close(),
184
- children: [
185
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseIcon, {}),
186
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
187
- ]
188
- }
189
- )
190
- ]
191
- }
192
- )
119
+ children: [
120
+ children,
121
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
122
+ DialogPrimitive.Close,
123
+ {
124
+ "data-slot": "dialog-close",
125
+ className: styles.close(),
126
+ children: [
127
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseIcon, {}),
128
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
129
+ ]
130
+ }
131
+ )
132
+ ]
193
133
  }
194
- ) })
195
- ] }) : null });
134
+ )
135
+ ] });
196
136
  }
197
137
  function DialogHeader({ className, ...props }) {
198
138
  const { styles } = useDialogContext();
package/dist/dialog.mjs CHANGED
@@ -13,8 +13,8 @@ import {
13
13
  DialogTitle,
14
14
  DialogTrigger,
15
15
  useDialogContext
16
- } from "./chunk-QDJEB3MY.mjs";
17
- import "./chunk-I6IVWHHG.mjs";
16
+ } from "./chunk-5S6NCDGO.mjs";
17
+ import "./chunk-C7GZJJIK.mjs";
18
18
  export {
19
19
  DialogBody,
20
20
  DialogClose,
package/dist/index.js CHANGED
@@ -50,51 +50,11 @@ module.exports = __toCommonJS(index_exports);
50
50
 
51
51
  // src/dialog.tsx
52
52
  var import_icons = require("@kopexa/icons");
53
- var import_motion_utils2 = require("@kopexa/motion-utils");
54
53
  var import_react_utils = require("@kopexa/react-utils");
55
54
  var import_shared_utils = require("@kopexa/shared-utils");
56
55
  var import_theme = require("@kopexa/theme");
57
56
  var import_use_controllable_state = require("@kopexa/use-controllable-state");
58
57
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
59
- var import_react = require("motion/react");
60
-
61
- // src/transition.ts
62
- var import_motion_utils = require("@kopexa/motion-utils");
63
- var scaleInOut = {
64
- enter: {
65
- scale: "var(--scale-enter)",
66
- y: "var(--slide-enter)",
67
- opacity: 1,
68
- willChange: "auto",
69
- transition: {
70
- scale: {
71
- duration: 0.4,
72
- ease: import_motion_utils.TRANSITION_EASINGS.ease
73
- },
74
- opacity: {
75
- duration: 0.4,
76
- ease: import_motion_utils.TRANSITION_EASINGS.ease
77
- },
78
- y: {
79
- type: "spring",
80
- bounce: 0,
81
- duration: 0.6
82
- }
83
- }
84
- },
85
- exit: {
86
- scale: "var(--scale-exit)",
87
- y: "var(--slide-exit)",
88
- opacity: 0,
89
- willChange: "transform",
90
- transition: {
91
- duration: 0.3,
92
- ease: import_motion_utils.TRANSITION_EASINGS.ease
93
- }
94
- }
95
- };
96
-
97
- // src/dialog.tsx
98
58
  var import_jsx_runtime = require("react/jsx-runtime");
99
59
  var [DialogProvider, useDialogContext] = (0, import_react_utils.createContext)();
100
60
  var DialogRoot = (props) => {
@@ -133,26 +93,16 @@ function DialogClose({ ...props }) {
133
93
  }
134
94
  function DialogOverlay({ className, ...props }) {
135
95
  const { styles } = useDialogContext();
136
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.LazyMotion, { features: import_react.domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
137
97
  DialogPrimitive.Overlay,
138
98
  {
139
99
  "data-slot": "dialog-overlay",
140
100
  className: styles.overlay({
141
101
  className
142
102
  }),
143
- ...props,
144
- asChild: true,
145
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
146
- import_react.motion.div,
147
- {
148
- animate: "enter",
149
- exit: "exit",
150
- initial: "exit",
151
- variants: import_motion_utils2.TRANSITION_VARIANTS.fade
152
- }
153
- )
103
+ ...props
154
104
  }
155
- ) });
105
+ );
156
106
  }
157
107
  function DialogContent({
158
108
  className,
@@ -160,42 +110,32 @@ function DialogContent({
160
110
  showCloseButton = true,
161
111
  ...props
162
112
  }) {
163
- const { styles, open } = useDialogContext();
164
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.AnimatePresence, { children: open ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", forceMount: true, children: [
113
+ const { styles } = useDialogContext();
114
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
165
115
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
166
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.LazyMotion, { features: import_react.domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
167
117
  DialogPrimitive.Content,
168
118
  {
169
119
  "data-slot": "dialog-content",
170
120
  className: (0, import_shared_utils.cn)(styles.content(), className),
171
- asChild: true,
172
121
  ...props,
173
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
174
- import_react.motion.div,
175
- {
176
- animate: "enter",
177
- exit: "exit",
178
- initial: "exit",
179
- variants: scaleInOut,
180
- children: [
181
- children,
182
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
183
- DialogPrimitive.Close,
184
- {
185
- "data-slot": "dialog-close",
186
- className: styles.close(),
187
- children: [
188
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseIcon, {}),
189
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
190
- ]
191
- }
192
- )
193
- ]
194
- }
195
- )
122
+ children: [
123
+ children,
124
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
125
+ DialogPrimitive.Close,
126
+ {
127
+ "data-slot": "dialog-close",
128
+ className: styles.close(),
129
+ children: [
130
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseIcon, {}),
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
132
+ ]
133
+ }
134
+ )
135
+ ]
196
136
  }
197
- ) })
198
- ] }) : null });
137
+ )
138
+ ] });
199
139
  }
200
140
  function DialogHeader({ className, ...props }) {
201
141
  const { styles } = useDialogContext();
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  namespace_exports
4
- } from "./chunk-AAFBD57M.mjs";
4
+ } from "./chunk-SUPSWH6D.mjs";
5
5
  import {
6
6
  DialogBody,
7
7
  DialogClose,
@@ -16,8 +16,8 @@ import {
16
16
  DialogTitle,
17
17
  DialogTrigger,
18
18
  useDialogContext
19
- } from "./chunk-QDJEB3MY.mjs";
20
- import "./chunk-I6IVWHHG.mjs";
19
+ } from "./chunk-5S6NCDGO.mjs";
20
+ import "./chunk-C7GZJJIK.mjs";
21
21
  export {
22
22
  namespace_exports as Dialog,
23
23
  DialogBody,
package/dist/namespace.js CHANGED
@@ -48,51 +48,11 @@ module.exports = __toCommonJS(namespace_exports);
48
48
 
49
49
  // src/dialog.tsx
50
50
  var import_icons = require("@kopexa/icons");
51
- var import_motion_utils2 = require("@kopexa/motion-utils");
52
51
  var import_react_utils = require("@kopexa/react-utils");
53
52
  var import_shared_utils = require("@kopexa/shared-utils");
54
53
  var import_theme = require("@kopexa/theme");
55
54
  var import_use_controllable_state = require("@kopexa/use-controllable-state");
56
55
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
57
- var import_react = require("motion/react");
58
-
59
- // src/transition.ts
60
- var import_motion_utils = require("@kopexa/motion-utils");
61
- var scaleInOut = {
62
- enter: {
63
- scale: "var(--scale-enter)",
64
- y: "var(--slide-enter)",
65
- opacity: 1,
66
- willChange: "auto",
67
- transition: {
68
- scale: {
69
- duration: 0.4,
70
- ease: import_motion_utils.TRANSITION_EASINGS.ease
71
- },
72
- opacity: {
73
- duration: 0.4,
74
- ease: import_motion_utils.TRANSITION_EASINGS.ease
75
- },
76
- y: {
77
- type: "spring",
78
- bounce: 0,
79
- duration: 0.6
80
- }
81
- }
82
- },
83
- exit: {
84
- scale: "var(--scale-exit)",
85
- y: "var(--slide-exit)",
86
- opacity: 0,
87
- willChange: "transform",
88
- transition: {
89
- duration: 0.3,
90
- ease: import_motion_utils.TRANSITION_EASINGS.ease
91
- }
92
- }
93
- };
94
-
95
- // src/dialog.tsx
96
56
  var import_jsx_runtime = require("react/jsx-runtime");
97
57
  var [DialogProvider, useDialogContext] = (0, import_react_utils.createContext)();
98
58
  var DialogRoot = (props) => {
@@ -131,26 +91,16 @@ function DialogClose({ ...props }) {
131
91
  }
132
92
  function DialogOverlay({ className, ...props }) {
133
93
  const { styles } = useDialogContext();
134
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.LazyMotion, { features: import_react.domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
94
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
95
  DialogPrimitive.Overlay,
136
96
  {
137
97
  "data-slot": "dialog-overlay",
138
98
  className: styles.overlay({
139
99
  className
140
100
  }),
141
- ...props,
142
- asChild: true,
143
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
144
- import_react.motion.div,
145
- {
146
- animate: "enter",
147
- exit: "exit",
148
- initial: "exit",
149
- variants: import_motion_utils2.TRANSITION_VARIANTS.fade
150
- }
151
- )
101
+ ...props
152
102
  }
153
- ) });
103
+ );
154
104
  }
155
105
  function DialogContent({
156
106
  className,
@@ -158,42 +108,32 @@ function DialogContent({
158
108
  showCloseButton = true,
159
109
  ...props
160
110
  }) {
161
- const { styles, open } = useDialogContext();
162
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.AnimatePresence, { children: open ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", forceMount: true, children: [
111
+ const { styles } = useDialogContext();
112
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
163
113
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
164
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.LazyMotion, { features: import_react.domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
165
115
  DialogPrimitive.Content,
166
116
  {
167
117
  "data-slot": "dialog-content",
168
118
  className: (0, import_shared_utils.cn)(styles.content(), className),
169
- asChild: true,
170
119
  ...props,
171
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
172
- import_react.motion.div,
173
- {
174
- animate: "enter",
175
- exit: "exit",
176
- initial: "exit",
177
- variants: scaleInOut,
178
- children: [
179
- children,
180
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
181
- DialogPrimitive.Close,
182
- {
183
- "data-slot": "dialog-close",
184
- className: styles.close(),
185
- children: [
186
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseIcon, {}),
187
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
188
- ]
189
- }
190
- )
191
- ]
192
- }
193
- )
120
+ children: [
121
+ children,
122
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
123
+ DialogPrimitive.Close,
124
+ {
125
+ "data-slot": "dialog-close",
126
+ className: styles.close(),
127
+ children: [
128
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseIcon, {}),
129
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
130
+ ]
131
+ }
132
+ )
133
+ ]
194
134
  }
195
- ) })
196
- ] }) : null });
135
+ )
136
+ ] });
197
137
  }
198
138
  function DialogHeader({ className, ...props }) {
199
139
  const { styles } = useDialogContext();
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import "./chunk-AAFBD57M.mjs";
2
+ import "./chunk-SUPSWH6D.mjs";
3
3
  import {
4
4
  DialogBody,
5
5
  DialogClose,
@@ -13,8 +13,8 @@ import {
13
13
  DialogRoot,
14
14
  DialogTitle,
15
15
  DialogTrigger
16
- } from "./chunk-QDJEB3MY.mjs";
17
- import "./chunk-I6IVWHHG.mjs";
16
+ } from "./chunk-5S6NCDGO.mjs";
17
+ import "./chunk-C7GZJJIK.mjs";
18
18
  export {
19
19
  DialogBody as Body,
20
20
  DialogClose as Close,
@@ -1,7 +1,41 @@
1
1
  "use client";
2
- import {
3
- scaleInOut
4
- } from "./chunk-I6IVWHHG.mjs";
2
+ import "./chunk-C7GZJJIK.mjs";
3
+
4
+ // src/transition.ts
5
+ import { TRANSITION_EASINGS } from "@kopexa/motion-utils";
6
+ var scaleInOut = {
7
+ enter: {
8
+ scale: "var(--scale-enter)",
9
+ y: "var(--slide-enter)",
10
+ opacity: 1,
11
+ willChange: "auto",
12
+ transition: {
13
+ scale: {
14
+ duration: 0.4,
15
+ ease: TRANSITION_EASINGS.ease
16
+ },
17
+ opacity: {
18
+ duration: 0.4,
19
+ ease: TRANSITION_EASINGS.ease
20
+ },
21
+ y: {
22
+ type: "spring",
23
+ bounce: 0,
24
+ duration: 0.6
25
+ }
26
+ }
27
+ },
28
+ exit: {
29
+ scale: "var(--scale-exit)",
30
+ y: "var(--slide-exit)",
31
+ opacity: 0,
32
+ willChange: "transform",
33
+ transition: {
34
+ duration: 0.3,
35
+ ease: TRANSITION_EASINGS.ease
36
+ }
37
+ }
38
+ };
5
39
  export {
6
40
  scaleInOut
7
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopexa/dialog",
3
- "version": "9.0.7",
3
+ "version": "9.0.9",
4
4
  "description": "A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.",
5
5
  "keywords": [
6
6
  "dialog"
@@ -25,18 +25,16 @@
25
25
  "url": "https://github.com/kopexa-grc/sight/issues"
26
26
  },
27
27
  "peerDependencies": {
28
- "motion": ">=12.23.6",
29
28
  "react": ">=19.0.0-rc.0",
30
29
  "react-dom": ">=19.0.0-rc.0",
31
- "@kopexa/theme": "1.6.7"
30
+ "@kopexa/theme": "1.6.9"
32
31
  },
33
32
  "dependencies": {
34
33
  "@radix-ui/react-dialog": "^1.1.14",
35
- "motion": "^12.23.12",
36
- "@kopexa/icons": "9.0.7",
34
+ "@kopexa/icons": "9.0.9",
37
35
  "@kopexa/react-utils": "2.0.6",
38
36
  "@kopexa/shared-utils": "1.1.5",
39
- "@kopexa/motion-utils": "9.0.7",
37
+ "@kopexa/motion-utils": "9.0.9",
40
38
  "@kopexa/use-controllable-state": "1.1.2"
41
39
  },
42
40
  "clean-package": "../../../clean-package.config.json",
@@ -1,47 +0,0 @@
1
- "use client";
2
- var __defProp = Object.defineProperty;
3
- var __export = (target, all) => {
4
- for (var name in all)
5
- __defProp(target, name, { get: all[name], enumerable: true });
6
- };
7
-
8
- // src/transition.ts
9
- import { TRANSITION_EASINGS } from "@kopexa/motion-utils";
10
- var scaleInOut = {
11
- enter: {
12
- scale: "var(--scale-enter)",
13
- y: "var(--slide-enter)",
14
- opacity: 1,
15
- willChange: "auto",
16
- transition: {
17
- scale: {
18
- duration: 0.4,
19
- ease: TRANSITION_EASINGS.ease
20
- },
21
- opacity: {
22
- duration: 0.4,
23
- ease: TRANSITION_EASINGS.ease
24
- },
25
- y: {
26
- type: "spring",
27
- bounce: 0,
28
- duration: 0.6
29
- }
30
- }
31
- },
32
- exit: {
33
- scale: "var(--scale-exit)",
34
- y: "var(--slide-exit)",
35
- opacity: 0,
36
- willChange: "transform",
37
- transition: {
38
- duration: 0.3,
39
- ease: TRANSITION_EASINGS.ease
40
- }
41
- }
42
- };
43
-
44
- export {
45
- __export,
46
- scaleInOut
47
- };