@yamada-ui/popover 0.2.9 → 0.2.11
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-TKSIF3VR.mjs → chunk-3Y5F6DFS.mjs} +25 -6
- package/dist/{chunk-3ZBBCVWN.mjs → chunk-GCWNHEX2.mjs} +10 -2
- package/dist/{chunk-FATHV76U.mjs → chunk-JQO73R3X.mjs} +1 -1
- package/dist/{chunk-DUC7O5IU.mjs → chunk-ML7BDIKK.mjs} +5 -2
- package/dist/{chunk-MTV2U3J2.mjs → chunk-N2YJEOSR.mjs} +22 -5
- package/dist/{chunk-QT5ZKMKL.mjs → chunk-NPQOLPDM.mjs} +5 -2
- package/dist/chunk-PWCBRLZL.mjs +32 -0
- package/dist/{chunk-ZH43FBXY.mjs → chunk-QYDCF4RV.mjs} +10 -2
- package/dist/index.js +61 -16
- package/dist/index.mjs +8 -8
- package/dist/popover-anchor.mjs +2 -2
- package/dist/popover-body.js +20 -10
- package/dist/popover-body.mjs +2 -2
- package/dist/popover-close-button.mjs +2 -2
- package/dist/popover-content.js +19 -3
- package/dist/popover-content.mjs +8 -8
- package/dist/popover-footer.js +9 -1
- package/dist/popover-footer.mjs +2 -2
- package/dist/popover-header.js +9 -1
- package/dist/popover-header.mjs +2 -2
- package/dist/popover-trigger.mjs +2 -2
- package/dist/popover.js +4 -1
- package/dist/popover.mjs +1 -1
- package/package.json +10 -10
- package/dist/chunk-3DUCJBT6.mjs +0 -22
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PopoverCloseButton
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JQO73R3X.mjs";
|
|
4
4
|
import {
|
|
5
5
|
usePopover
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-N2YJEOSR.mjs";
|
|
7
7
|
|
|
8
8
|
// src/popover-content.tsx
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
ui,
|
|
11
|
+
forwardRef
|
|
12
|
+
} from "@yamada-ui/core";
|
|
10
13
|
import { motion } from "@yamada-ui/motion";
|
|
11
14
|
import { scaleFadeProps, slideFadeProps } from "@yamada-ui/transitions";
|
|
12
15
|
import {
|
|
@@ -53,7 +56,18 @@ var getPopoverContentProps = (animation = "scale", duration) => {
|
|
|
53
56
|
}
|
|
54
57
|
};
|
|
55
58
|
var PopoverContent = forwardRef(
|
|
56
|
-
({
|
|
59
|
+
({
|
|
60
|
+
as = "section",
|
|
61
|
+
className,
|
|
62
|
+
children,
|
|
63
|
+
w,
|
|
64
|
+
width,
|
|
65
|
+
minW,
|
|
66
|
+
minWidth,
|
|
67
|
+
zIndex,
|
|
68
|
+
__css,
|
|
69
|
+
...rest
|
|
70
|
+
}, ref) => {
|
|
57
71
|
var _a, _b, _c, _d;
|
|
58
72
|
const {
|
|
59
73
|
isOpen,
|
|
@@ -84,7 +98,9 @@ var PopoverContent = forwardRef(
|
|
|
84
98
|
return /* @__PURE__ */ jsx(
|
|
85
99
|
ui.div,
|
|
86
100
|
{
|
|
87
|
-
...getPopperProps({
|
|
101
|
+
...getPopperProps({
|
|
102
|
+
style: { visibility: isOpen ? "visible" : "hidden" }
|
|
103
|
+
}),
|
|
88
104
|
className: "ui-popover",
|
|
89
105
|
w,
|
|
90
106
|
minW,
|
|
@@ -99,7 +115,10 @@ var PopoverContent = forwardRef(
|
|
|
99
115
|
initial: "exit",
|
|
100
116
|
animate: isOpen ? "enter" : "exit",
|
|
101
117
|
exit: "exit",
|
|
102
|
-
onAnimationComplete: funcAll(
|
|
118
|
+
onAnimationComplete: funcAll(
|
|
119
|
+
onAnimationComplete,
|
|
120
|
+
rest.onAnimationComplete
|
|
121
|
+
),
|
|
103
122
|
__css: css,
|
|
104
123
|
children: [
|
|
105
124
|
customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ jsx(PopoverCloseButton, {}) : null,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePopover
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N2YJEOSR.mjs";
|
|
4
4
|
|
|
5
5
|
// src/popover-header.tsx
|
|
6
6
|
import { ui, forwardRef } from "@yamada-ui/core";
|
|
@@ -15,7 +15,15 @@ var PopoverHeader = forwardRef(
|
|
|
15
15
|
justifyContent: "flex-start",
|
|
16
16
|
...styles.header
|
|
17
17
|
};
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
ui.header,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
className: cx("ui-popover-header", className),
|
|
23
|
+
__css: css,
|
|
24
|
+
...rest
|
|
25
|
+
}
|
|
26
|
+
);
|
|
19
27
|
}
|
|
20
28
|
);
|
|
21
29
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePopover
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N2YJEOSR.mjs";
|
|
4
4
|
|
|
5
5
|
// src/popover-trigger.tsx
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Children,
|
|
8
|
+
cloneElement
|
|
9
|
+
} from "react";
|
|
7
10
|
var PopoverTrigger = ({ children }) => {
|
|
8
11
|
const child = Children.only(children);
|
|
9
12
|
const { getTriggerProps } = usePopover();
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
// src/popover.tsx
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
useMultiComponentStyle,
|
|
4
|
+
omitThemeProps
|
|
5
|
+
} from "@yamada-ui/core";
|
|
3
6
|
import { useAnimationObserver } from "@yamada-ui/use-animation";
|
|
4
|
-
import {
|
|
5
|
-
|
|
7
|
+
import {
|
|
8
|
+
useDisclosure,
|
|
9
|
+
useLazyDisclosure
|
|
10
|
+
} from "@yamada-ui/use-disclosure";
|
|
11
|
+
import {
|
|
12
|
+
useFocusOnHide,
|
|
13
|
+
useFocusOnShow,
|
|
14
|
+
useFocusOnPointerDown
|
|
15
|
+
} from "@yamada-ui/use-focus";
|
|
6
16
|
import { usePopper } from "@yamada-ui/use-popper";
|
|
7
17
|
import {
|
|
8
18
|
createContext,
|
|
@@ -12,7 +22,11 @@ import {
|
|
|
12
22
|
mergeRefs,
|
|
13
23
|
runIfFunc
|
|
14
24
|
} from "@yamada-ui/utils";
|
|
15
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
useCallback,
|
|
27
|
+
useEffect,
|
|
28
|
+
useRef
|
|
29
|
+
} from "react";
|
|
16
30
|
import { jsx } from "react/jsx-runtime";
|
|
17
31
|
var [PopoverProvider, usePopover] = createContext({
|
|
18
32
|
strict: false,
|
|
@@ -41,7 +55,10 @@ var Popover = (props) => {
|
|
|
41
55
|
const anchorRef = useRef(null);
|
|
42
56
|
const triggerRef = useRef(null);
|
|
43
57
|
const popoverRef = useRef(null);
|
|
44
|
-
const { present, onAnimationComplete } = useAnimationObserver({
|
|
58
|
+
const { present, onAnimationComplete } = useAnimationObserver({
|
|
59
|
+
isOpen,
|
|
60
|
+
ref: popoverRef
|
|
61
|
+
});
|
|
45
62
|
const openTimeout = useRef(void 0);
|
|
46
63
|
const closeTimeout = useRef(void 0);
|
|
47
64
|
const isHoveringRef = useRef(false);
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePopover
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N2YJEOSR.mjs";
|
|
4
4
|
|
|
5
5
|
// src/popover-anchor.tsx
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Children,
|
|
8
|
+
cloneElement
|
|
9
|
+
} from "react";
|
|
7
10
|
var PopoverAnchor = ({ children }) => {
|
|
8
11
|
const child = Children.only(children);
|
|
9
12
|
const { getAnchorProps } = usePopover();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
usePopover
|
|
3
|
+
} from "./chunk-N2YJEOSR.mjs";
|
|
4
|
+
|
|
5
|
+
// src/popover-body.tsx
|
|
6
|
+
import { ui, forwardRef } from "@yamada-ui/core";
|
|
7
|
+
import { cx } from "@yamada-ui/utils";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var PopoverBody = forwardRef(
|
|
10
|
+
({ className, ...rest }, ref) => {
|
|
11
|
+
const { styles } = usePopover();
|
|
12
|
+
const css = {
|
|
13
|
+
display: "flex",
|
|
14
|
+
flexDirection: "column",
|
|
15
|
+
alignItems: "flex-start",
|
|
16
|
+
...styles.body
|
|
17
|
+
};
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
ui.main,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
className: cx("ui-popover-body", className),
|
|
23
|
+
__css: css,
|
|
24
|
+
...rest
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
PopoverBody
|
|
32
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePopover
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N2YJEOSR.mjs";
|
|
4
4
|
|
|
5
5
|
// src/popover-footer.tsx
|
|
6
6
|
import { ui, forwardRef } from "@yamada-ui/core";
|
|
@@ -15,7 +15,15 @@ var PopoverFooter = forwardRef(
|
|
|
15
15
|
justifyContent: "flex-start",
|
|
16
16
|
...styles.footer
|
|
17
17
|
};
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
ui.footer,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
className: cx("ui-popover-footer", className),
|
|
23
|
+
__css: css,
|
|
24
|
+
...rest
|
|
25
|
+
}
|
|
26
|
+
);
|
|
19
27
|
}
|
|
20
28
|
);
|
|
21
29
|
|
package/dist/index.js
CHANGED
|
@@ -67,7 +67,10 @@ var Popover = (props) => {
|
|
|
67
67
|
const anchorRef = (0, import_react.useRef)(null);
|
|
68
68
|
const triggerRef = (0, import_react.useRef)(null);
|
|
69
69
|
const popoverRef = (0, import_react.useRef)(null);
|
|
70
|
-
const { present, onAnimationComplete } = (0, import_use_animation.useAnimationObserver)({
|
|
70
|
+
const { present, onAnimationComplete } = (0, import_use_animation.useAnimationObserver)({
|
|
71
|
+
isOpen,
|
|
72
|
+
ref: popoverRef
|
|
73
|
+
});
|
|
71
74
|
const openTimeout = (0, import_react.useRef)(void 0);
|
|
72
75
|
const closeTimeout = (0, import_react.useRef)(void 0);
|
|
73
76
|
const isHoveringRef = (0, import_react.useRef)(false);
|
|
@@ -336,7 +339,18 @@ var getPopoverContentProps = (animation = "scale", duration) => {
|
|
|
336
339
|
}
|
|
337
340
|
};
|
|
338
341
|
var PopoverContent = (0, import_core3.forwardRef)(
|
|
339
|
-
({
|
|
342
|
+
({
|
|
343
|
+
as = "section",
|
|
344
|
+
className,
|
|
345
|
+
children,
|
|
346
|
+
w,
|
|
347
|
+
width,
|
|
348
|
+
minW,
|
|
349
|
+
minWidth,
|
|
350
|
+
zIndex,
|
|
351
|
+
__css,
|
|
352
|
+
...rest
|
|
353
|
+
}, ref) => {
|
|
340
354
|
var _a, _b, _c, _d;
|
|
341
355
|
const {
|
|
342
356
|
isOpen,
|
|
@@ -367,7 +381,9 @@ var PopoverContent = (0, import_core3.forwardRef)(
|
|
|
367
381
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
368
382
|
import_core3.ui.div,
|
|
369
383
|
{
|
|
370
|
-
...getPopperProps({
|
|
384
|
+
...getPopperProps({
|
|
385
|
+
style: { visibility: isOpen ? "visible" : "hidden" }
|
|
386
|
+
}),
|
|
371
387
|
className: "ui-popover",
|
|
372
388
|
w,
|
|
373
389
|
minW,
|
|
@@ -382,7 +398,10 @@ var PopoverContent = (0, import_core3.forwardRef)(
|
|
|
382
398
|
initial: "exit",
|
|
383
399
|
animate: isOpen ? "enter" : "exit",
|
|
384
400
|
exit: "exit",
|
|
385
|
-
onAnimationComplete: (0, import_utils3.funcAll)(
|
|
401
|
+
onAnimationComplete: (0, import_utils3.funcAll)(
|
|
402
|
+
onAnimationComplete,
|
|
403
|
+
rest.onAnimationComplete
|
|
404
|
+
),
|
|
386
405
|
__css: css,
|
|
387
406
|
children: [
|
|
388
407
|
customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PopoverCloseButton, {}) : null,
|
|
@@ -408,7 +427,15 @@ var PopoverHeader = (0, import_core4.forwardRef)(
|
|
|
408
427
|
justifyContent: "flex-start",
|
|
409
428
|
...styles.header
|
|
410
429
|
};
|
|
411
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
431
|
+
import_core4.ui.header,
|
|
432
|
+
{
|
|
433
|
+
ref,
|
|
434
|
+
className: (0, import_utils4.cx)("ui-popover-header", className),
|
|
435
|
+
__css: css,
|
|
436
|
+
...rest
|
|
437
|
+
}
|
|
438
|
+
);
|
|
412
439
|
}
|
|
413
440
|
);
|
|
414
441
|
|
|
@@ -416,16 +443,26 @@ var PopoverHeader = (0, import_core4.forwardRef)(
|
|
|
416
443
|
var import_core5 = require("@yamada-ui/core");
|
|
417
444
|
var import_utils5 = require("@yamada-ui/utils");
|
|
418
445
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
419
|
-
var PopoverBody = (0, import_core5.forwardRef)(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
446
|
+
var PopoverBody = (0, import_core5.forwardRef)(
|
|
447
|
+
({ className, ...rest }, ref) => {
|
|
448
|
+
const { styles } = usePopover();
|
|
449
|
+
const css = {
|
|
450
|
+
display: "flex",
|
|
451
|
+
flexDirection: "column",
|
|
452
|
+
alignItems: "flex-start",
|
|
453
|
+
...styles.body
|
|
454
|
+
};
|
|
455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
456
|
+
import_core5.ui.main,
|
|
457
|
+
{
|
|
458
|
+
ref,
|
|
459
|
+
className: (0, import_utils5.cx)("ui-popover-body", className),
|
|
460
|
+
__css: css,
|
|
461
|
+
...rest
|
|
462
|
+
}
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
);
|
|
429
466
|
|
|
430
467
|
// src/popover-footer.tsx
|
|
431
468
|
var import_core6 = require("@yamada-ui/core");
|
|
@@ -440,7 +477,15 @@ var PopoverFooter = (0, import_core6.forwardRef)(
|
|
|
440
477
|
justifyContent: "flex-start",
|
|
441
478
|
...styles.footer
|
|
442
479
|
};
|
|
443
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
481
|
+
import_core6.ui.footer,
|
|
482
|
+
{
|
|
483
|
+
ref,
|
|
484
|
+
className: (0, import_utils6.cx)("ui-popover-footer", className),
|
|
485
|
+
__css: css,
|
|
486
|
+
...rest
|
|
487
|
+
}
|
|
488
|
+
);
|
|
444
489
|
}
|
|
445
490
|
);
|
|
446
491
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PopoverContent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3Y5F6DFS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
PopoverAnchor
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NPQOLPDM.mjs";
|
|
7
7
|
import {
|
|
8
8
|
PopoverBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PWCBRLZL.mjs";
|
|
10
10
|
import {
|
|
11
11
|
PopoverCloseButton
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JQO73R3X.mjs";
|
|
13
13
|
import {
|
|
14
14
|
PopoverFooter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QYDCF4RV.mjs";
|
|
16
16
|
import {
|
|
17
17
|
PopoverHeader
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GCWNHEX2.mjs";
|
|
19
19
|
import {
|
|
20
20
|
PopoverTrigger
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ML7BDIKK.mjs";
|
|
22
22
|
import {
|
|
23
23
|
Popover
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-N2YJEOSR.mjs";
|
|
25
25
|
export {
|
|
26
26
|
Popover,
|
|
27
27
|
PopoverAnchor,
|
package/dist/popover-anchor.mjs
CHANGED
package/dist/popover-body.js
CHANGED
|
@@ -42,16 +42,26 @@ var [PopoverProvider, usePopover] = (0, import_utils.createContext)({
|
|
|
42
42
|
|
|
43
43
|
// src/popover-body.tsx
|
|
44
44
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
45
|
-
var PopoverBody = (0, import_core2.forwardRef)(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
var PopoverBody = (0, import_core2.forwardRef)(
|
|
46
|
+
({ className, ...rest }, ref) => {
|
|
47
|
+
const { styles } = usePopover();
|
|
48
|
+
const css = {
|
|
49
|
+
display: "flex",
|
|
50
|
+
flexDirection: "column",
|
|
51
|
+
alignItems: "flex-start",
|
|
52
|
+
...styles.body
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
55
|
+
import_core2.ui.main,
|
|
56
|
+
{
|
|
57
|
+
ref,
|
|
58
|
+
className: (0, import_utils2.cx)("ui-popover-body", className),
|
|
59
|
+
__css: css,
|
|
60
|
+
...rest
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
55
65
|
// Annotate the CommonJS export names for ESM import in node:
|
|
56
66
|
0 && (module.exports = {
|
|
57
67
|
PopoverBody
|
package/dist/popover-body.mjs
CHANGED
package/dist/popover-content.js
CHANGED
|
@@ -109,7 +109,18 @@ var getPopoverContentProps = (animation = "scale", duration) => {
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
var PopoverContent = (0, import_core3.forwardRef)(
|
|
112
|
-
({
|
|
112
|
+
({
|
|
113
|
+
as = "section",
|
|
114
|
+
className,
|
|
115
|
+
children,
|
|
116
|
+
w,
|
|
117
|
+
width,
|
|
118
|
+
minW,
|
|
119
|
+
minWidth,
|
|
120
|
+
zIndex,
|
|
121
|
+
__css,
|
|
122
|
+
...rest
|
|
123
|
+
}, ref) => {
|
|
113
124
|
var _a, _b, _c, _d;
|
|
114
125
|
const {
|
|
115
126
|
isOpen,
|
|
@@ -140,7 +151,9 @@ var PopoverContent = (0, import_core3.forwardRef)(
|
|
|
140
151
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
141
152
|
import_core3.ui.div,
|
|
142
153
|
{
|
|
143
|
-
...getPopperProps({
|
|
154
|
+
...getPopperProps({
|
|
155
|
+
style: { visibility: isOpen ? "visible" : "hidden" }
|
|
156
|
+
}),
|
|
144
157
|
className: "ui-popover",
|
|
145
158
|
w,
|
|
146
159
|
minW,
|
|
@@ -155,7 +168,10 @@ var PopoverContent = (0, import_core3.forwardRef)(
|
|
|
155
168
|
initial: "exit",
|
|
156
169
|
animate: isOpen ? "enter" : "exit",
|
|
157
170
|
exit: "exit",
|
|
158
|
-
onAnimationComplete: (0, import_utils3.funcAll)(
|
|
171
|
+
onAnimationComplete: (0, import_utils3.funcAll)(
|
|
172
|
+
onAnimationComplete,
|
|
173
|
+
rest.onAnimationComplete
|
|
174
|
+
),
|
|
159
175
|
__css: css,
|
|
160
176
|
children: [
|
|
161
177
|
customPopoverCloseButton != null ? customPopoverCloseButton : closeOnButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PopoverCloseButton, {}) : null,
|
package/dist/popover-content.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PopoverContent
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3Y5F6DFS.mjs";
|
|
4
|
+
import "./chunk-NPQOLPDM.mjs";
|
|
5
|
+
import "./chunk-PWCBRLZL.mjs";
|
|
6
|
+
import "./chunk-JQO73R3X.mjs";
|
|
7
|
+
import "./chunk-QYDCF4RV.mjs";
|
|
8
|
+
import "./chunk-GCWNHEX2.mjs";
|
|
9
|
+
import "./chunk-ML7BDIKK.mjs";
|
|
10
|
+
import "./chunk-N2YJEOSR.mjs";
|
|
11
11
|
export {
|
|
12
12
|
PopoverContent
|
|
13
13
|
};
|
package/dist/popover-footer.js
CHANGED
|
@@ -51,7 +51,15 @@ var PopoverFooter = (0, import_core2.forwardRef)(
|
|
|
51
51
|
justifyContent: "flex-start",
|
|
52
52
|
...styles.footer
|
|
53
53
|
};
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
55
|
+
import_core2.ui.footer,
|
|
56
|
+
{
|
|
57
|
+
ref,
|
|
58
|
+
className: (0, import_utils2.cx)("ui-popover-footer", className),
|
|
59
|
+
__css: css,
|
|
60
|
+
...rest
|
|
61
|
+
}
|
|
62
|
+
);
|
|
55
63
|
}
|
|
56
64
|
);
|
|
57
65
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/popover-footer.mjs
CHANGED
package/dist/popover-header.js
CHANGED
|
@@ -51,7 +51,15 @@ var PopoverHeader = (0, import_core2.forwardRef)(
|
|
|
51
51
|
justifyContent: "flex-start",
|
|
52
52
|
...styles.header
|
|
53
53
|
};
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
55
|
+
import_core2.ui.header,
|
|
56
|
+
{
|
|
57
|
+
ref,
|
|
58
|
+
className: (0, import_utils2.cx)("ui-popover-header", className),
|
|
59
|
+
__css: css,
|
|
60
|
+
...rest
|
|
61
|
+
}
|
|
62
|
+
);
|
|
55
63
|
}
|
|
56
64
|
);
|
|
57
65
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/popover-header.mjs
CHANGED
package/dist/popover-trigger.mjs
CHANGED
package/dist/popover.js
CHANGED
|
@@ -59,7 +59,10 @@ var Popover = (props) => {
|
|
|
59
59
|
const anchorRef = (0, import_react.useRef)(null);
|
|
60
60
|
const triggerRef = (0, import_react.useRef)(null);
|
|
61
61
|
const popoverRef = (0, import_react.useRef)(null);
|
|
62
|
-
const { present, onAnimationComplete } = (0, import_use_animation.useAnimationObserver)({
|
|
62
|
+
const { present, onAnimationComplete } = (0, import_use_animation.useAnimationObserver)({
|
|
63
|
+
isOpen,
|
|
64
|
+
ref: popoverRef
|
|
65
|
+
});
|
|
63
66
|
const openTimeout = (0, import_react.useRef)(void 0);
|
|
64
67
|
const closeTimeout = (0, import_react.useRef)(void 0);
|
|
65
68
|
const isHoveringRef = (0, import_react.useRef)(false);
|
package/dist/popover.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/popover",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "Yamada UI popover component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yamada-ui/core": "0.5.
|
|
39
|
-
"@yamada-ui/utils": "0.1.
|
|
40
|
-
"@yamada-ui/close-button": "0.2.
|
|
41
|
-
"@yamada-ui/transitions": "0.2.
|
|
42
|
-
"@yamada-ui/motion": "0.3.
|
|
43
|
-
"@yamada-ui/use-popper": "0.2.
|
|
44
|
-
"@yamada-ui/use-disclosure": "0.2.
|
|
45
|
-
"@yamada-ui/use-focus": "0.1.
|
|
46
|
-
"@yamada-ui/use-animation": "0.1.
|
|
38
|
+
"@yamada-ui/core": "0.5.3",
|
|
39
|
+
"@yamada-ui/utils": "0.1.4",
|
|
40
|
+
"@yamada-ui/close-button": "0.2.8",
|
|
41
|
+
"@yamada-ui/transitions": "0.2.9",
|
|
42
|
+
"@yamada-ui/motion": "0.3.6",
|
|
43
|
+
"@yamada-ui/use-popper": "0.2.8",
|
|
44
|
+
"@yamada-ui/use-disclosure": "0.2.5",
|
|
45
|
+
"@yamada-ui/use-focus": "0.1.4",
|
|
46
|
+
"@yamada-ui/use-animation": "0.1.20"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"react": "^18.0.0",
|
package/dist/chunk-3DUCJBT6.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
usePopover
|
|
3
|
-
} from "./chunk-MTV2U3J2.mjs";
|
|
4
|
-
|
|
5
|
-
// src/popover-body.tsx
|
|
6
|
-
import { ui, forwardRef } from "@yamada-ui/core";
|
|
7
|
-
import { cx } from "@yamada-ui/utils";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
var PopoverBody = forwardRef(({ className, ...rest }, ref) => {
|
|
10
|
-
const { styles } = usePopover();
|
|
11
|
-
const css = {
|
|
12
|
-
display: "flex",
|
|
13
|
-
flexDirection: "column",
|
|
14
|
-
alignItems: "flex-start",
|
|
15
|
-
...styles.body
|
|
16
|
-
};
|
|
17
|
-
return /* @__PURE__ */ jsx(ui.main, { ref, className: cx("ui-popover-body", className), __css: css, ...rest });
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
PopoverBody
|
|
22
|
-
};
|