@yamada-ui/modal 0.3.8 → 0.4.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-4VDODOHM.mjs → chunk-P7XGYPFD.mjs} +9 -7
- package/dist/dialog.js +8 -7
- package/dist/dialog.mjs +2 -1
- package/dist/drawer.js +8 -7
- package/dist/drawer.mjs +2 -1
- package/dist/index.js +8 -7
- package/dist/index.mjs +2 -1
- package/dist/modal-body.js +8 -7
- package/dist/modal-body.mjs +2 -1
- package/dist/modal-close-button.js +8 -7
- package/dist/modal-close-button.mjs +2 -1
- package/dist/modal-footer.js +8 -7
- package/dist/modal-footer.mjs +2 -1
- package/dist/modal-header.js +8 -7
- package/dist/modal-header.mjs +2 -1
- package/dist/modal-overlay.js +8 -7
- package/dist/modal-overlay.mjs +2 -1
- package/dist/modal.js +8 -7
- package/dist/modal.mjs +2 -1
- package/package.json +13 -10
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
// src/drawer.tsx
|
|
2
4
|
import {
|
|
3
5
|
forwardRef as forwardRef8,
|
|
@@ -69,8 +71,8 @@ var ModalOverlay = forwardRef(
|
|
|
69
71
|
className: cx("ui-modal-overlay", className),
|
|
70
72
|
custom: { duration },
|
|
71
73
|
__css: css,
|
|
72
|
-
onClick: handlerAll(onClick, onOverlayClick, (
|
|
73
|
-
|
|
74
|
+
onClick: handlerAll(onClick, onOverlayClick, (ev) => {
|
|
75
|
+
ev.stopPropagation();
|
|
74
76
|
if (closeOnOverlay)
|
|
75
77
|
onClose == null ? void 0 : onClose();
|
|
76
78
|
}),
|
|
@@ -99,8 +101,8 @@ var ModalCloseButton = forwardRef2(
|
|
|
99
101
|
ref,
|
|
100
102
|
className: cx2("ui-modal-close-button"),
|
|
101
103
|
__css: css,
|
|
102
|
-
onClick: handlerAll2(onClick, (
|
|
103
|
-
|
|
104
|
+
onClick: handlerAll2(onClick, (ev) => {
|
|
105
|
+
ev.stopPropagation();
|
|
104
106
|
onClose == null ? void 0 : onClose();
|
|
105
107
|
}),
|
|
106
108
|
...rest
|
|
@@ -416,10 +418,10 @@ var Modal = forwardRef7(
|
|
|
416
418
|
...rest
|
|
417
419
|
} = omitThemeProps2(mergedProps);
|
|
418
420
|
const onKeyDown = useCallback(
|
|
419
|
-
(
|
|
420
|
-
if (
|
|
421
|
+
(ev) => {
|
|
422
|
+
if (ev.key !== "Escape")
|
|
421
423
|
return;
|
|
422
|
-
|
|
424
|
+
ev.stopPropagation();
|
|
423
425
|
if (closeOnEsc)
|
|
424
426
|
onClose == null ? void 0 : onClose();
|
|
425
427
|
onEsc == null ? void 0 : onEsc();
|
package/dist/dialog.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -266,10 +267,10 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
266
267
|
...rest
|
|
267
268
|
} = (0, import_core2.omitThemeProps)(mergedProps);
|
|
268
269
|
const onKeyDown = (0, import_react.useCallback)(
|
|
269
|
-
(
|
|
270
|
-
if (
|
|
270
|
+
(ev) => {
|
|
271
|
+
if (ev.key !== "Escape")
|
|
271
272
|
return;
|
|
272
|
-
|
|
273
|
+
ev.stopPropagation();
|
|
273
274
|
if (closeOnEsc)
|
|
274
275
|
onClose == null ? void 0 : onClose();
|
|
275
276
|
onEsc == null ? void 0 : onEsc();
|
|
@@ -455,8 +456,8 @@ var ModalOverlay = (0, import_core3.forwardRef)(
|
|
|
455
456
|
className: (0, import_utils3.cx)("ui-modal-overlay", className),
|
|
456
457
|
custom: { duration },
|
|
457
458
|
__css: css,
|
|
458
|
-
onClick: (0, import_utils3.handlerAll)(onClick, onOverlayClick, (
|
|
459
|
-
|
|
459
|
+
onClick: (0, import_utils3.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
460
|
+
ev.stopPropagation();
|
|
460
461
|
if (closeOnOverlay)
|
|
461
462
|
onClose == null ? void 0 : onClose();
|
|
462
463
|
}),
|
|
@@ -485,8 +486,8 @@ var ModalCloseButton = (0, import_core4.forwardRef)(
|
|
|
485
486
|
ref,
|
|
486
487
|
className: (0, import_utils4.cx)("ui-modal-close-button"),
|
|
487
488
|
__css: css,
|
|
488
|
-
onClick: (0, import_utils4.handlerAll)(onClick, (
|
|
489
|
-
|
|
489
|
+
onClick: (0, import_utils4.handlerAll)(onClick, (ev) => {
|
|
490
|
+
ev.stopPropagation();
|
|
490
491
|
onClose == null ? void 0 : onClose();
|
|
491
492
|
}),
|
|
492
493
|
...rest
|
package/dist/dialog.mjs
CHANGED
package/dist/drawer.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -77,8 +78,8 @@ var ModalOverlay = (0, import_core.forwardRef)(
|
|
|
77
78
|
className: (0, import_utils.cx)("ui-modal-overlay", className),
|
|
78
79
|
custom: { duration },
|
|
79
80
|
__css: css,
|
|
80
|
-
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (
|
|
81
|
-
|
|
81
|
+
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
82
|
+
ev.stopPropagation();
|
|
82
83
|
if (closeOnOverlay)
|
|
83
84
|
onClose == null ? void 0 : onClose();
|
|
84
85
|
}),
|
|
@@ -107,8 +108,8 @@ var ModalCloseButton = (0, import_core2.forwardRef)(
|
|
|
107
108
|
ref,
|
|
108
109
|
className: (0, import_utils2.cx)("ui-modal-close-button"),
|
|
109
110
|
__css: css,
|
|
110
|
-
onClick: (0, import_utils2.handlerAll)(onClick, (
|
|
111
|
-
|
|
111
|
+
onClick: (0, import_utils2.handlerAll)(onClick, (ev) => {
|
|
112
|
+
ev.stopPropagation();
|
|
112
113
|
onClose == null ? void 0 : onClose();
|
|
113
114
|
}),
|
|
114
115
|
...rest
|
|
@@ -412,10 +413,10 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
412
413
|
...rest
|
|
413
414
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
414
415
|
const onKeyDown = (0, import_react.useCallback)(
|
|
415
|
-
(
|
|
416
|
-
if (
|
|
416
|
+
(ev) => {
|
|
417
|
+
if (ev.key !== "Escape")
|
|
417
418
|
return;
|
|
418
|
-
|
|
419
|
+
ev.stopPropagation();
|
|
419
420
|
if (closeOnEsc)
|
|
420
421
|
onClose == null ? void 0 : onClose();
|
|
421
422
|
onEsc == null ? void 0 : onEsc();
|
package/dist/drawer.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -275,10 +276,10 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
275
276
|
...rest
|
|
276
277
|
} = (0, import_core2.omitThemeProps)(mergedProps);
|
|
277
278
|
const onKeyDown = (0, import_react.useCallback)(
|
|
278
|
-
(
|
|
279
|
-
if (
|
|
279
|
+
(ev) => {
|
|
280
|
+
if (ev.key !== "Escape")
|
|
280
281
|
return;
|
|
281
|
-
|
|
282
|
+
ev.stopPropagation();
|
|
282
283
|
if (closeOnEsc)
|
|
283
284
|
onClose == null ? void 0 : onClose();
|
|
284
285
|
onEsc == null ? void 0 : onEsc();
|
|
@@ -464,8 +465,8 @@ var ModalOverlay = (0, import_core3.forwardRef)(
|
|
|
464
465
|
className: (0, import_utils3.cx)("ui-modal-overlay", className),
|
|
465
466
|
custom: { duration },
|
|
466
467
|
__css: css,
|
|
467
|
-
onClick: (0, import_utils3.handlerAll)(onClick, onOverlayClick, (
|
|
468
|
-
|
|
468
|
+
onClick: (0, import_utils3.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
469
|
+
ev.stopPropagation();
|
|
469
470
|
if (closeOnOverlay)
|
|
470
471
|
onClose == null ? void 0 : onClose();
|
|
471
472
|
}),
|
|
@@ -494,8 +495,8 @@ var ModalCloseButton = (0, import_core4.forwardRef)(
|
|
|
494
495
|
ref,
|
|
495
496
|
className: (0, import_utils4.cx)("ui-modal-close-button"),
|
|
496
497
|
__css: css,
|
|
497
|
-
onClick: (0, import_utils4.handlerAll)(onClick, (
|
|
498
|
-
|
|
498
|
+
onClick: (0, import_utils4.handlerAll)(onClick, (ev) => {
|
|
499
|
+
ev.stopPropagation();
|
|
499
500
|
onClose == null ? void 0 : onClose();
|
|
500
501
|
}),
|
|
501
502
|
...rest
|
package/dist/index.mjs
CHANGED
package/dist/modal-body.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -75,8 +76,8 @@ var ModalOverlay = (0, import_core.forwardRef)(
|
|
|
75
76
|
className: (0, import_utils.cx)("ui-modal-overlay", className),
|
|
76
77
|
custom: { duration },
|
|
77
78
|
__css: css,
|
|
78
|
-
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (
|
|
79
|
-
|
|
79
|
+
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
80
|
+
ev.stopPropagation();
|
|
80
81
|
if (closeOnOverlay)
|
|
81
82
|
onClose == null ? void 0 : onClose();
|
|
82
83
|
}),
|
|
@@ -105,8 +106,8 @@ var ModalCloseButton = (0, import_core2.forwardRef)(
|
|
|
105
106
|
ref,
|
|
106
107
|
className: (0, import_utils2.cx)("ui-modal-close-button"),
|
|
107
108
|
__css: css,
|
|
108
|
-
onClick: (0, import_utils2.handlerAll)(onClick, (
|
|
109
|
-
|
|
109
|
+
onClick: (0, import_utils2.handlerAll)(onClick, (ev) => {
|
|
110
|
+
ev.stopPropagation();
|
|
110
111
|
onClose == null ? void 0 : onClose();
|
|
111
112
|
}),
|
|
112
113
|
...rest
|
|
@@ -565,10 +566,10 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
565
566
|
...rest
|
|
566
567
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
567
568
|
const onKeyDown = (0, import_react.useCallback)(
|
|
568
|
-
(
|
|
569
|
-
if (
|
|
569
|
+
(ev) => {
|
|
570
|
+
if (ev.key !== "Escape")
|
|
570
571
|
return;
|
|
571
|
-
|
|
572
|
+
ev.stopPropagation();
|
|
572
573
|
if (closeOnEsc)
|
|
573
574
|
onClose == null ? void 0 : onClose();
|
|
574
575
|
onEsc == null ? void 0 : onEsc();
|
package/dist/modal-body.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -76,8 +77,8 @@ var ModalOverlay = (0, import_core.forwardRef)(
|
|
|
76
77
|
className: (0, import_utils.cx)("ui-modal-overlay", className),
|
|
77
78
|
custom: { duration },
|
|
78
79
|
__css: css,
|
|
79
|
-
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (
|
|
80
|
-
|
|
80
|
+
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
81
|
+
ev.stopPropagation();
|
|
81
82
|
if (closeOnOverlay)
|
|
82
83
|
onClose == null ? void 0 : onClose();
|
|
83
84
|
}),
|
|
@@ -564,10 +565,10 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
564
565
|
...rest
|
|
565
566
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
566
567
|
const onKeyDown = (0, import_react.useCallback)(
|
|
567
|
-
(
|
|
568
|
-
if (
|
|
568
|
+
(ev) => {
|
|
569
|
+
if (ev.key !== "Escape")
|
|
569
570
|
return;
|
|
570
|
-
|
|
571
|
+
ev.stopPropagation();
|
|
571
572
|
if (closeOnEsc)
|
|
572
573
|
onClose == null ? void 0 : onClose();
|
|
573
574
|
onEsc == null ? void 0 : onEsc();
|
|
@@ -735,8 +736,8 @@ var ModalCloseButton = (0, import_core8.forwardRef)(
|
|
|
735
736
|
ref,
|
|
736
737
|
className: (0, import_utils8.cx)("ui-modal-close-button"),
|
|
737
738
|
__css: css,
|
|
738
|
-
onClick: (0, import_utils8.handlerAll)(onClick, (
|
|
739
|
-
|
|
739
|
+
onClick: (0, import_utils8.handlerAll)(onClick, (ev) => {
|
|
740
|
+
ev.stopPropagation();
|
|
740
741
|
onClose == null ? void 0 : onClose();
|
|
741
742
|
}),
|
|
742
743
|
...rest
|
package/dist/modal-footer.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -75,8 +76,8 @@ var ModalOverlay = (0, import_core.forwardRef)(
|
|
|
75
76
|
className: (0, import_utils.cx)("ui-modal-overlay", className),
|
|
76
77
|
custom: { duration },
|
|
77
78
|
__css: css,
|
|
78
|
-
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (
|
|
79
|
-
|
|
79
|
+
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
80
|
+
ev.stopPropagation();
|
|
80
81
|
if (closeOnOverlay)
|
|
81
82
|
onClose == null ? void 0 : onClose();
|
|
82
83
|
}),
|
|
@@ -105,8 +106,8 @@ var ModalCloseButton = (0, import_core2.forwardRef)(
|
|
|
105
106
|
ref,
|
|
106
107
|
className: (0, import_utils2.cx)("ui-modal-close-button"),
|
|
107
108
|
__css: css,
|
|
108
|
-
onClick: (0, import_utils2.handlerAll)(onClick, (
|
|
109
|
-
|
|
109
|
+
onClick: (0, import_utils2.handlerAll)(onClick, (ev) => {
|
|
110
|
+
ev.stopPropagation();
|
|
110
111
|
onClose == null ? void 0 : onClose();
|
|
111
112
|
}),
|
|
112
113
|
...rest
|
|
@@ -566,10 +567,10 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
566
567
|
...rest
|
|
567
568
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
568
569
|
const onKeyDown = (0, import_react.useCallback)(
|
|
569
|
-
(
|
|
570
|
-
if (
|
|
570
|
+
(ev) => {
|
|
571
|
+
if (ev.key !== "Escape")
|
|
571
572
|
return;
|
|
572
|
-
|
|
573
|
+
ev.stopPropagation();
|
|
573
574
|
if (closeOnEsc)
|
|
574
575
|
onClose == null ? void 0 : onClose();
|
|
575
576
|
onEsc == null ? void 0 : onEsc();
|
package/dist/modal-footer.mjs
CHANGED
package/dist/modal-header.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -75,8 +76,8 @@ var ModalOverlay = (0, import_core.forwardRef)(
|
|
|
75
76
|
className: (0, import_utils.cx)("ui-modal-overlay", className),
|
|
76
77
|
custom: { duration },
|
|
77
78
|
__css: css,
|
|
78
|
-
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (
|
|
79
|
-
|
|
79
|
+
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
80
|
+
ev.stopPropagation();
|
|
80
81
|
if (closeOnOverlay)
|
|
81
82
|
onClose == null ? void 0 : onClose();
|
|
82
83
|
}),
|
|
@@ -105,8 +106,8 @@ var ModalCloseButton = (0, import_core2.forwardRef)(
|
|
|
105
106
|
ref,
|
|
106
107
|
className: (0, import_utils2.cx)("ui-modal-close-button"),
|
|
107
108
|
__css: css,
|
|
108
|
-
onClick: (0, import_utils2.handlerAll)(onClick, (
|
|
109
|
-
|
|
109
|
+
onClick: (0, import_utils2.handlerAll)(onClick, (ev) => {
|
|
110
|
+
ev.stopPropagation();
|
|
110
111
|
onClose == null ? void 0 : onClose();
|
|
111
112
|
}),
|
|
112
113
|
...rest
|
|
@@ -566,10 +567,10 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
566
567
|
...rest
|
|
567
568
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
568
569
|
const onKeyDown = (0, import_react.useCallback)(
|
|
569
|
-
(
|
|
570
|
-
if (
|
|
570
|
+
(ev) => {
|
|
571
|
+
if (ev.key !== "Escape")
|
|
571
572
|
return;
|
|
572
|
-
|
|
573
|
+
ev.stopPropagation();
|
|
573
574
|
if (closeOnEsc)
|
|
574
575
|
onClose == null ? void 0 : onClose();
|
|
575
576
|
onEsc == null ? void 0 : onEsc();
|
package/dist/modal-header.mjs
CHANGED
package/dist/modal-overlay.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -62,8 +63,8 @@ var ModalCloseButton = (0, import_core.forwardRef)(
|
|
|
62
63
|
ref,
|
|
63
64
|
className: (0, import_utils.cx)("ui-modal-close-button"),
|
|
64
65
|
__css: css,
|
|
65
|
-
onClick: (0, import_utils.handlerAll)(onClick, (
|
|
66
|
-
|
|
66
|
+
onClick: (0, import_utils.handlerAll)(onClick, (ev) => {
|
|
67
|
+
ev.stopPropagation();
|
|
67
68
|
onClose == null ? void 0 : onClose();
|
|
68
69
|
}),
|
|
69
70
|
...rest
|
|
@@ -548,10 +549,10 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
548
549
|
...rest
|
|
549
550
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
550
551
|
const onKeyDown = (0, import_react.useCallback)(
|
|
551
|
-
(
|
|
552
|
-
if (
|
|
552
|
+
(ev) => {
|
|
553
|
+
if (ev.key !== "Escape")
|
|
553
554
|
return;
|
|
554
|
-
|
|
555
|
+
ev.stopPropagation();
|
|
555
556
|
if (closeOnEsc)
|
|
556
557
|
onClose == null ? void 0 : onClose();
|
|
557
558
|
onEsc == null ? void 0 : onEsc();
|
|
@@ -733,8 +734,8 @@ var ModalOverlay = (0, import_core8.forwardRef)(
|
|
|
733
734
|
className: (0, import_utils8.cx)("ui-modal-overlay", className),
|
|
734
735
|
custom: { duration },
|
|
735
736
|
__css: css,
|
|
736
|
-
onClick: (0, import_utils8.handlerAll)(onClick, onOverlayClick, (
|
|
737
|
-
|
|
737
|
+
onClick: (0, import_utils8.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
738
|
+
ev.stopPropagation();
|
|
738
739
|
if (closeOnOverlay)
|
|
739
740
|
onClose == null ? void 0 : onClose();
|
|
740
741
|
}),
|
package/dist/modal-overlay.mjs
CHANGED
package/dist/modal.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -72,8 +73,8 @@ var ModalOverlay = (0, import_core.forwardRef)(
|
|
|
72
73
|
className: (0, import_utils.cx)("ui-modal-overlay", className),
|
|
73
74
|
custom: { duration },
|
|
74
75
|
__css: css,
|
|
75
|
-
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (
|
|
76
|
-
|
|
76
|
+
onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
77
|
+
ev.stopPropagation();
|
|
77
78
|
if (closeOnOverlay)
|
|
78
79
|
onClose == null ? void 0 : onClose();
|
|
79
80
|
}),
|
|
@@ -102,8 +103,8 @@ var ModalCloseButton = (0, import_core2.forwardRef)(
|
|
|
102
103
|
ref,
|
|
103
104
|
className: (0, import_utils2.cx)("ui-modal-close-button"),
|
|
104
105
|
__css: css,
|
|
105
|
-
onClick: (0, import_utils2.handlerAll)(onClick, (
|
|
106
|
-
|
|
106
|
+
onClick: (0, import_utils2.handlerAll)(onClick, (ev) => {
|
|
107
|
+
ev.stopPropagation();
|
|
107
108
|
onClose == null ? void 0 : onClose();
|
|
108
109
|
}),
|
|
109
110
|
...rest
|
|
@@ -588,10 +589,10 @@ var Modal = (0, import_core8.forwardRef)(
|
|
|
588
589
|
...rest
|
|
589
590
|
} = (0, import_core8.omitThemeProps)(mergedProps);
|
|
590
591
|
const onKeyDown = (0, import_react.useCallback)(
|
|
591
|
-
(
|
|
592
|
-
if (
|
|
592
|
+
(ev) => {
|
|
593
|
+
if (ev.key !== "Escape")
|
|
593
594
|
return;
|
|
594
|
-
|
|
595
|
+
ev.stopPropagation();
|
|
595
596
|
if (closeOnEsc)
|
|
596
597
|
onClose == null ? void 0 : onClose();
|
|
597
598
|
onEsc == null ? void 0 : onEsc();
|
package/dist/modal.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/modal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Yamada UI modal component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"react-remove-scroll": "^2.5.4",
|
|
39
|
-
"@yamada-ui/core": "0.
|
|
39
|
+
"@yamada-ui/core": "0.9.0",
|
|
40
40
|
"@yamada-ui/utils": "0.2.0",
|
|
41
|
-
"@yamada-ui/motion": "0.
|
|
42
|
-
"@yamada-ui/portal": "0.
|
|
43
|
-
"@yamada-ui/button": "0.
|
|
44
|
-
"@yamada-ui/focus-lock": "0.
|
|
45
|
-
"@yamada-ui/close-button": "0.
|
|
46
|
-
"@yamada-ui/transitions": "0.
|
|
47
|
-
"@yamada-ui/use-value": "0.
|
|
41
|
+
"@yamada-ui/motion": "0.4.0",
|
|
42
|
+
"@yamada-ui/portal": "0.3.0",
|
|
43
|
+
"@yamada-ui/button": "0.3.0",
|
|
44
|
+
"@yamada-ui/focus-lock": "0.3.0",
|
|
45
|
+
"@yamada-ui/close-button": "0.3.0",
|
|
46
|
+
"@yamada-ui/transitions": "0.3.0",
|
|
47
|
+
"@yamada-ui/use-value": "0.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"react": "^18.0.0",
|
|
@@ -60,7 +60,10 @@
|
|
|
60
60
|
"format": [
|
|
61
61
|
"cjs",
|
|
62
62
|
"esm"
|
|
63
|
-
]
|
|
63
|
+
],
|
|
64
|
+
"banner": {
|
|
65
|
+
"js": "\"use client\""
|
|
66
|
+
}
|
|
64
67
|
},
|
|
65
68
|
"module": "dist/index.mjs",
|
|
66
69
|
"types": "dist/index.d.ts",
|