@yamada-ui/popover 0.3.16 → 0.3.17

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.
@@ -20,7 +20,7 @@ import {
20
20
  getValidChildren,
21
21
  omitObject
22
22
  } from "@yamada-ui/utils";
23
- import { jsx, jsxs } from "react/jsx-runtime";
23
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
24
24
  var getPopoverContentProps = (animation = "scale", duration) => {
25
25
  const custom = {
26
26
  reverse: true,
@@ -85,6 +85,12 @@ var PopoverContent = forwardRef(
85
85
  validChildren,
86
86
  PopoverCloseButton
87
87
  );
88
+ const resolvedChildren = () => {
89
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
90
+ customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ jsx(PopoverCloseButton, {}) : null,
91
+ cloneChildren
92
+ ] });
93
+ };
88
94
  const css = {
89
95
  position: "relative",
90
96
  w: "100%",
@@ -106,13 +112,19 @@ var PopoverContent = forwardRef(
106
112
  w,
107
113
  minW,
108
114
  zIndex,
109
- children: /* @__PURE__ */ jsxs(
115
+ children: /* @__PURE__ */ jsx(
110
116
  ui.section,
111
117
  {
112
118
  as: motion[as],
113
119
  className: cx("ui-popover-content", className),
114
120
  ...animation !== "none" ? getPopoverContentProps(animation, duration) : {},
115
- ...getPopoverProps(rest, ref),
121
+ ...getPopoverProps(
122
+ {
123
+ ...rest,
124
+ children: resolvedChildren()
125
+ },
126
+ ref
127
+ ),
116
128
  initial: "exit",
117
129
  animate: isOpen ? "enter" : "exit",
118
130
  exit: "exit",
@@ -120,11 +132,7 @@ var PopoverContent = forwardRef(
120
132
  onAnimationComplete,
121
133
  rest.onAnimationComplete
122
134
  ),
123
- __css: css,
124
- children: [
125
- customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ jsx(PopoverCloseButton, {}) : null,
126
- cloneChildren
127
- ]
135
+ __css: css
128
136
  }
129
137
  )
130
138
  }
package/dist/index.js CHANGED
@@ -375,6 +375,12 @@ var PopoverContent = (0, import_core3.forwardRef)(
375
375
  validChildren,
376
376
  PopoverCloseButton
377
377
  );
378
+ const resolvedChildren = () => {
379
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
380
+ customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PopoverCloseButton, {}) : null,
381
+ cloneChildren
382
+ ] });
383
+ };
378
384
  const css = {
379
385
  position: "relative",
380
386
  w: "100%",
@@ -396,13 +402,19 @@ var PopoverContent = (0, import_core3.forwardRef)(
396
402
  w,
397
403
  minW,
398
404
  zIndex,
399
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
405
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
400
406
  import_core3.ui.section,
401
407
  {
402
408
  as: import_motion.motion[as],
403
409
  className: (0, import_utils3.cx)("ui-popover-content", className),
404
410
  ...animation !== "none" ? getPopoverContentProps(animation, duration) : {},
405
- ...getPopoverProps(rest, ref),
411
+ ...getPopoverProps(
412
+ {
413
+ ...rest,
414
+ children: resolvedChildren()
415
+ },
416
+ ref
417
+ ),
406
418
  initial: "exit",
407
419
  animate: isOpen ? "enter" : "exit",
408
420
  exit: "exit",
@@ -410,11 +422,7 @@ var PopoverContent = (0, import_core3.forwardRef)(
410
422
  onAnimationComplete,
411
423
  rest.onAnimationComplete
412
424
  ),
413
- __css: css,
414
- children: [
415
- customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PopoverCloseButton, {}) : null,
416
- cloneChildren
417
- ]
425
+ __css: css
418
426
  }
419
427
  )
420
428
  }
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  PopoverContent
4
- } from "./chunk-TGE2FU5Y.mjs";
4
+ } from "./chunk-ZXXPS4GL.mjs";
5
5
  import {
6
6
  PopoverAnchor
7
7
  } from "./chunk-AZMTGSD5.mjs";
@@ -138,6 +138,12 @@ var PopoverContent = (0, import_core3.forwardRef)(
138
138
  validChildren,
139
139
  PopoverCloseButton
140
140
  );
141
+ const resolvedChildren = () => {
142
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
143
+ customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PopoverCloseButton, {}) : null,
144
+ cloneChildren
145
+ ] });
146
+ };
141
147
  const css = {
142
148
  position: "relative",
143
149
  w: "100%",
@@ -159,13 +165,19 @@ var PopoverContent = (0, import_core3.forwardRef)(
159
165
  w,
160
166
  minW,
161
167
  zIndex,
162
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
168
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
163
169
  import_core3.ui.section,
164
170
  {
165
171
  as: import_motion.motion[as],
166
172
  className: (0, import_utils3.cx)("ui-popover-content", className),
167
173
  ...animation !== "none" ? getPopoverContentProps(animation, duration) : {},
168
- ...getPopoverProps(rest, ref),
174
+ ...getPopoverProps(
175
+ {
176
+ ...rest,
177
+ children: resolvedChildren()
178
+ },
179
+ ref
180
+ ),
169
181
  initial: "exit",
170
182
  animate: isOpen ? "enter" : "exit",
171
183
  exit: "exit",
@@ -173,11 +185,7 @@ var PopoverContent = (0, import_core3.forwardRef)(
173
185
  onAnimationComplete,
174
186
  rest.onAnimationComplete
175
187
  ),
176
- __css: css,
177
- children: [
178
- customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PopoverCloseButton, {}) : null,
179
- cloneChildren
180
- ]
188
+ __css: css
181
189
  }
182
190
  )
183
191
  }
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  PopoverContent
4
- } from "./chunk-TGE2FU5Y.mjs";
4
+ } from "./chunk-ZXXPS4GL.mjs";
5
5
  import "./chunk-AZMTGSD5.mjs";
6
6
  import "./chunk-K3ECBLCR.mjs";
7
7
  import "./chunk-IQVXY42J.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/popover",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "description": "Yamada UI popover component",
5
5
  "keywords": [
6
6
  "yamada",