@yamada-ui/modal 1.4.5-next-20241114172614 → 1.4.5-next-20241117114930

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. package/dist/{chunk-U2DBPI7Y.mjs → chunk-3RGLB7UM.mjs} +3 -3
  2. package/dist/{chunk-E4FDNJ4R.mjs → chunk-5NLJNYIN.mjs} +2 -2
  3. package/dist/{chunk-EPC5EUXN.mjs → chunk-64A25YOZ.mjs} +1 -1
  4. package/dist/chunk-64A25YOZ.mjs.map +1 -0
  5. package/dist/{chunk-CBL7CH2A.mjs → chunk-6ZTN6KKG.mjs} +3 -3
  6. package/dist/{chunk-DWQHOEUG.mjs → chunk-A64FIX7X.mjs} +5 -6
  7. package/dist/chunk-A64FIX7X.mjs.map +1 -0
  8. package/dist/{chunk-DH735WKL.mjs → chunk-AVLVLAM5.mjs} +3 -3
  9. package/dist/{chunk-4SA2BXAV.mjs → chunk-AZF6QW2S.mjs} +10 -9
  10. package/dist/chunk-AZF6QW2S.mjs.map +1 -0
  11. package/dist/{chunk-X5STF2Y7.mjs → chunk-F6XJWJIF.mjs} +2 -2
  12. package/dist/{chunk-SCU75AQJ.mjs → chunk-FXMVCPK5.mjs} +9 -8
  13. package/dist/chunk-FXMVCPK5.mjs.map +1 -0
  14. package/dist/{chunk-W4G2GVI7.mjs → chunk-GMWH5UP2.mjs} +8 -8
  15. package/dist/{chunk-EITLQG4B.mjs → chunk-I7XUEPCF.mjs} +3 -3
  16. package/dist/{chunk-GBZ3BEXX.mjs → chunk-OPXWQC3M.mjs} +5 -6
  17. package/dist/chunk-OPXWQC3M.mjs.map +1 -0
  18. package/dist/{chunk-UWNNN2FG.mjs → chunk-PXCCIW5O.mjs} +3 -3
  19. package/dist/{chunk-DT5IIM35.mjs → chunk-PXV3LL5A.mjs} +2 -2
  20. package/dist/{chunk-KRAXUNBU.mjs → chunk-QIRIQ2KT.mjs} +5 -5
  21. package/dist/{chunk-4MSKF3NP.mjs → chunk-R2TMPSE3.mjs} +3 -3
  22. package/dist/{chunk-CTBGRQX2.mjs → chunk-V6LGJTK2.mjs} +3 -3
  23. package/dist/{chunk-4VGCDKI3.mjs → chunk-XDFGVPCC.mjs} +2 -2
  24. package/dist/{chunk-Z7MBETMY.mjs → chunk-XOD2SYPV.mjs} +3 -3
  25. package/dist/{chunk-WKDYYNHI.mjs → chunk-YK2YBJMG.mjs} +12 -12
  26. package/dist/chunk-YK2YBJMG.mjs.map +1 -0
  27. package/dist/{chunk-O6TYHALA.mjs → chunk-ZG6MHJXG.mjs} +3 -3
  28. package/dist/{chunk-4L4JX6MZ.mjs → chunk-ZMEZYJLF.mjs} +3 -3
  29. package/dist/dialog-body.js +2 -3
  30. package/dist/dialog-body.js.map +1 -1
  31. package/dist/dialog-body.mjs +3 -3
  32. package/dist/dialog-close-button.js.map +1 -1
  33. package/dist/dialog-close-button.mjs +3 -3
  34. package/dist/dialog-footer.js.map +1 -1
  35. package/dist/dialog-footer.mjs +3 -3
  36. package/dist/dialog-header.js +2 -3
  37. package/dist/dialog-header.js.map +1 -1
  38. package/dist/dialog-header.mjs +3 -3
  39. package/dist/dialog-overlay.js.map +1 -1
  40. package/dist/dialog-overlay.mjs +3 -3
  41. package/dist/dialog.js +19 -19
  42. package/dist/dialog.js.map +1 -1
  43. package/dist/dialog.mjs +18 -18
  44. package/dist/drawer-body.js +2 -3
  45. package/dist/drawer-body.js.map +1 -1
  46. package/dist/drawer-body.mjs +3 -3
  47. package/dist/drawer-close-button.js.map +1 -1
  48. package/dist/drawer-close-button.mjs +3 -3
  49. package/dist/drawer-content.js +6 -5
  50. package/dist/drawer-content.js.map +1 -1
  51. package/dist/drawer-content.mjs +5 -5
  52. package/dist/drawer-drag-bar.js.map +1 -1
  53. package/dist/drawer-drag-bar.mjs +2 -2
  54. package/dist/drawer-footer.js.map +1 -1
  55. package/dist/drawer-footer.mjs +3 -3
  56. package/dist/drawer-header.js +2 -3
  57. package/dist/drawer-header.js.map +1 -1
  58. package/dist/drawer-header.mjs +3 -3
  59. package/dist/drawer-overlay.js.map +1 -1
  60. package/dist/drawer-overlay.mjs +3 -3
  61. package/dist/drawer.js +15 -13
  62. package/dist/drawer.js.map +1 -1
  63. package/dist/drawer.mjs +12 -12
  64. package/dist/index.js +19 -19
  65. package/dist/index.js.map +1 -1
  66. package/dist/index.mjs +22 -22
  67. package/dist/modal-body.js +2 -3
  68. package/dist/modal-body.js.map +1 -1
  69. package/dist/modal-body.mjs +2 -2
  70. package/dist/modal-close-button.js.map +1 -1
  71. package/dist/modal-close-button.mjs +2 -2
  72. package/dist/modal-content.js +5 -4
  73. package/dist/modal-content.js.map +1 -1
  74. package/dist/modal-content.mjs +4 -4
  75. package/dist/modal-context.d.mts +3 -2
  76. package/dist/modal-context.d.ts +3 -2
  77. package/dist/modal-context.js.map +1 -1
  78. package/dist/modal-context.mjs +1 -1
  79. package/dist/modal-footer.js.map +1 -1
  80. package/dist/modal-footer.mjs +2 -2
  81. package/dist/modal-header.js +2 -3
  82. package/dist/modal-header.js.map +1 -1
  83. package/dist/modal-header.mjs +2 -2
  84. package/dist/modal-overlay.js.map +1 -1
  85. package/dist/modal-overlay.mjs +2 -2
  86. package/dist/modal.js +15 -13
  87. package/dist/modal.js.map +1 -1
  88. package/dist/modal.mjs +11 -11
  89. package/package.json +5 -5
  90. package/dist/chunk-4SA2BXAV.mjs.map +0 -1
  91. package/dist/chunk-DWQHOEUG.mjs.map +0 -1
  92. package/dist/chunk-EPC5EUXN.mjs.map +0 -1
  93. package/dist/chunk-GBZ3BEXX.mjs.map +0 -1
  94. package/dist/chunk-SCU75AQJ.mjs.map +0 -1
  95. package/dist/chunk-WKDYYNHI.mjs.map +0 -1
  96. /package/dist/{chunk-U2DBPI7Y.mjs.map → chunk-3RGLB7UM.mjs.map} +0 -0
  97. /package/dist/{chunk-E4FDNJ4R.mjs.map → chunk-5NLJNYIN.mjs.map} +0 -0
  98. /package/dist/{chunk-CBL7CH2A.mjs.map → chunk-6ZTN6KKG.mjs.map} +0 -0
  99. /package/dist/{chunk-DH735WKL.mjs.map → chunk-AVLVLAM5.mjs.map} +0 -0
  100. /package/dist/{chunk-X5STF2Y7.mjs.map → chunk-F6XJWJIF.mjs.map} +0 -0
  101. /package/dist/{chunk-W4G2GVI7.mjs.map → chunk-GMWH5UP2.mjs.map} +0 -0
  102. /package/dist/{chunk-EITLQG4B.mjs.map → chunk-I7XUEPCF.mjs.map} +0 -0
  103. /package/dist/{chunk-UWNNN2FG.mjs.map → chunk-PXCCIW5O.mjs.map} +0 -0
  104. /package/dist/{chunk-DT5IIM35.mjs.map → chunk-PXV3LL5A.mjs.map} +0 -0
  105. /package/dist/{chunk-KRAXUNBU.mjs.map → chunk-QIRIQ2KT.mjs.map} +0 -0
  106. /package/dist/{chunk-4MSKF3NP.mjs.map → chunk-R2TMPSE3.mjs.map} +0 -0
  107. /package/dist/{chunk-CTBGRQX2.mjs.map → chunk-V6LGJTK2.mjs.map} +0 -0
  108. /package/dist/{chunk-4VGCDKI3.mjs.map → chunk-XDFGVPCC.mjs.map} +0 -0
  109. /package/dist/{chunk-Z7MBETMY.mjs.map → chunk-XOD2SYPV.mjs.map} +0 -0
  110. /package/dist/{chunk-O6TYHALA.mjs.map → chunk-ZG6MHJXG.mjs.map} +0 -0
  111. /package/dist/{chunk-4L4JX6MZ.mjs.map → chunk-ZMEZYJLF.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer-footer.tsx","../src/modal-context.ts","../src/modal-footer.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalFooterProps } from \"./modal-footer\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalFooter } from \"./modal-footer\"\n\nexport interface DrawerFooterProps extends ModalFooterProps {}\n\nexport const DrawerFooter = forwardRef<DrawerFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.footer }\n\n return (\n <ModalFooter\n ref={ref}\n className={cx(\"ui-drawer__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerFooter.displayName = \"DrawerFooter\"\nDrawerFooter.__ui__ = \"DrawerFooter\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n describedbyId: string\n labelledbyId: string\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalFooterProps extends HTMLUIProps<\"footer\"> {}\n\nexport const ModalFooter = forwardRef<ModalFooterProps, \"footer\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles } = useModal()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"flex-end\",\n ...(__css ? __css : styles.footer),\n }\n\n return (\n <ui.footer\n ref={ref}\n className={cx(\"ui-modal__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalFooter.displayName = \"ModalFooter\"\nModalFooter.__ui__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AAEA,aAAa,cAAc;AAC3B,aAAa,SAAS;","names":["import_core","import_utils","import_utils","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/drawer-footer.tsx","../src/modal-context.ts","../src/modal-footer.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalFooterProps } from \"./modal-footer\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalFooter } from \"./modal-footer\"\n\nexport interface DrawerFooterProps extends ModalFooterProps {}\n\nexport const DrawerFooter = forwardRef<DrawerFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.footer }\n\n return (\n <ModalFooter\n ref={ref}\n className={cx(\"ui-drawer__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerFooter.displayName = \"DrawerFooter\"\nDrawerFooter.__ui__ = \"DrawerFooter\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { RefObject } from \"react\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n bodyRef: RefObject<HTMLElement>\n headerRef: RefObject<HTMLElement>\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalFooterProps extends HTMLUIProps<\"footer\"> {}\n\nexport const ModalFooter = forwardRef<ModalFooterProps, \"footer\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles } = useModal()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"flex-end\",\n ...(__css ? __css : styles.footer),\n }\n\n return (\n <ui.footer\n ref={ref}\n className={cx(\"ui-modal__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalFooter.displayName = \"ModalFooter\"\nModalFooter.__ui__ = \"ModalFooter\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACAnB,mBAA8B;AAQvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;AC/BD,kBAA+B;AAC/B,IAAAC,gBAAmB;AAiBb;AAZC,IAAM,kBAAc;AAAA,EACzB,CAAC,EAAE,WAAW,OAAO,GAAG,KAAK,GAAG,QAAQ;AACtC,UAAM,EAAE,OAAO,IAAI,SAAS;AAE5B,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,GAAI,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,oBAAoB,SAAS;AAAA,QAC3C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;;;AFdf,IAAAC,sBAAA;AAPC,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAC3B,aAAa,SAAS;","names":["import_core","import_utils","import_utils","import_jsx_runtime"]}
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
  import {
3
3
  DrawerFooter
4
- } from "./chunk-DH735WKL.mjs";
5
- import "./chunk-X5STF2Y7.mjs";
6
- import "./chunk-EPC5EUXN.mjs";
4
+ } from "./chunk-AVLVLAM5.mjs";
5
+ import "./chunk-F6XJWJIF.mjs";
6
+ import "./chunk-64A25YOZ.mjs";
7
7
  export {
8
8
  DrawerFooter
9
9
  };
@@ -48,7 +48,7 @@ var import_utils2 = require("@yamada-ui/utils");
48
48
  var import_jsx_runtime = require("react/jsx-runtime");
49
49
  var ModalHeader = (0, import_core.forwardRef)(
50
50
  ({ className, __css, ...rest }, ref) => {
51
- const { labelledbyId, styles } = useModal();
51
+ const { headerRef, styles } = useModal();
52
52
  const css = {
53
53
  alignItems: "center",
54
54
  display: "flex",
@@ -58,8 +58,7 @@ var ModalHeader = (0, import_core.forwardRef)(
58
58
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
59
  import_core.ui.header,
60
60
  {
61
- id: labelledbyId,
62
- ref,
61
+ ref: (0, import_utils2.mergeRefs)(headerRef, ref),
63
62
  className: (0, import_utils2.cx)("ui-modal__header", className),
64
63
  __css: css,
65
64
  ...rest
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer-header.tsx","../src/modal-context.ts","../src/modal-header.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalHeaderProps } from \"./modal-header\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalHeader } from \"./modal-header\"\n\nexport interface DrawerHeaderProps extends ModalHeaderProps {}\n\nexport const DrawerHeader = forwardRef<DrawerHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.header }\n\n return (\n <ModalHeader\n ref={ref}\n className={cx(\"ui-drawer__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerHeader.displayName = \"DrawerHeader\"\nDrawerHeader.__ui__ = \"DrawerHeader\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n describedbyId: string\n labelledbyId: string\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalHeaderProps extends HTMLUIProps<\"header\"> {}\n\nexport const ModalHeader = forwardRef<ModalHeaderProps, \"header\">(\n ({ className, __css, ...rest }, ref) => {\n const { labelledbyId, styles } = useModal()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n ...(__css ? __css : styles.header),\n }\n\n return (\n <ui.header\n id={labelledbyId}\n ref={ref}\n className={cx(\"ui-modal__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalHeader.displayName = \"ModalHeader\"\nModalHeader.__ui__ = \"ModalHeader\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACDnB,mBAA8B;AAQvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;AC9BD,kBAA+B;AAC/B,IAAAC,gBAAmB;AAiBb;AAZC,IAAM,kBAAc;AAAA,EACzB,CAAC,EAAE,WAAW,OAAO,GAAG,KAAK,GAAG,QAAQ;AACtC,UAAM,EAAE,cAAc,OAAO,IAAI,SAAS;AAE1C,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,GAAI,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC,IAAI;AAAA,QACJ;AAAA,QACA,eAAW,kBAAG,oBAAoB,SAAS;AAAA,QAC3C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;;;AFff,IAAAC,sBAAA;AAPC,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAC3B,aAAa,SAAS;","names":["import_core","import_utils","import_utils","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/drawer-header.tsx","../src/modal-context.ts","../src/modal-header.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalHeaderProps } from \"./modal-header\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalHeader } from \"./modal-header\"\n\nexport interface DrawerHeaderProps extends ModalHeaderProps {}\n\nexport const DrawerHeader = forwardRef<DrawerHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.header }\n\n return (\n <ModalHeader\n ref={ref}\n className={cx(\"ui-drawer__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerHeader.displayName = \"DrawerHeader\"\nDrawerHeader.__ui__ = \"DrawerHeader\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { RefObject } from \"react\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n bodyRef: RefObject<HTMLElement>\n headerRef: RefObject<HTMLElement>\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx, mergeRefs } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalHeaderProps extends HTMLUIProps<\"header\"> {}\n\nexport const ModalHeader = forwardRef<ModalHeaderProps, \"header\">(\n ({ className, __css, ...rest }, ref) => {\n const { headerRef, styles } = useModal()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n ...(__css ? __css : styles.header),\n }\n\n return (\n <ui.header\n ref={mergeRefs(headerRef, ref)}\n className={cx(\"ui-modal__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalHeader.displayName = \"ModalHeader\"\nModalHeader.__ui__ = \"ModalHeader\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACAnB,mBAA8B;AAQvB,IAAM,CAAC,eA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eader
4
- } from "./chunk-O6TYHALA.mjs";
5
- import "./chunk-DWQHOEUG.mjs";
6
- import "./chunk-EPC5EUXN.mjs";
4
+ } from "./chunk-ZG6MHJXG.mjs";
5
+ import "./chunk-A64FIX7X.mjs";
6
+ import "./chunk-64A25YOZ.mjs";
7
7
  export {
8
8
  DrawerHeader
9
9
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer-overlay.tsx","../src/modal-context.ts","../src/modal-overlay.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DrawerOverlayProps extends ModalOverlayProps {}\n\nexport const DrawerOverlay = motionForwardRef<DrawerOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-drawer__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerOverlay.displayName = \"DrawerOverlay\"\nDrawerOverlay.__ui__ = \"DrawerOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n describedbyId: string\n labelledbyId: string\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalOverlayProps extends MotionProps {}\n\nexport const ModalOverlay = motionForwardRef<ModalOverlayProps, \"div\">(\n ({ className, onClick, __css, ...rest }, ref) => {\n const {\n animation,\n closeOnOverlay,\n duration,\n styles,\n onClose,\n onOverlayClick,\n } = useModal()\n\n const css: CSSUIObject = {\n h: \"100dvh\",\n left: 0,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <motion.div\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n aria-hidden\n custom={{ duration }}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n __css={css}\n {...props}\n {...rest}\n />\n )\n },\n)\n\nModalOverlay.displayName = \"ModalOverlay\"\nModalOverlay.__ui__ = \"ModalOverlay\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,iBAAiC;AACjC,IAAAC,gBAAmB;;;ACDnB,mBAA8B;AAQvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AACh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N;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;AAC5B,cAAc,SAAS;","names":["import_motion","import_utils","import_utils","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/drawer-overlay.tsx","../src/modal-context.ts","../src/modal-overlay.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DrawerOverlayProps extends ModalOverlayProps {}\n\nexport const DrawerOverlay = motionForwardRef<DrawerOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-drawer__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerOverlay.displayName = \"DrawerOverlay\"\nDrawerOverlay.__ui__ = \"DrawerOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { RefObject } from \"react\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n bodyRef: RefObject<HTMLElement>\n headerRef: RefObject<HTMLElement>\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalOverlayProps extends MotionProps {}\n\nexport const ModalOverlay = motionForwardRef<ModalOverlayProps, \"div\">(\n ({ className, onClick, __css, ...rest }, ref) => {\n const {\n animation,\n closeOnOverlay,\n duration,\n styles,\n onClose,\n onOverlayClick,\n } = useModal()\n\n const css: CSSUIObject = {\n h: \"100dvh\",\n left: 0,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <motion.div\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n aria-hidden\n custom={{ duration }}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n __css={css}\n {...props}\n {...rest}\n />\n )\n },\n)\n\nModalOverlay.displayName = \"ModalOverlay\"\nModalOverlay.__ui__ = \"ModalOverlay\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,iBAAiC;AACjC,IAAAC,gBAAmB;;;ACAnB,mBAA8B;AAQvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cA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_runtime"]}
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
  import {
3
3
  DrawerOverlay
4
- } from "./chunk-4L4JX6MZ.mjs";
5
- import "./chunk-4VGCDKI3.mjs";
6
- import "./chunk-EPC5EUXN.mjs";
4
+ } from "./chunk-ZMEZYJLF.mjs";
5
+ import "./chunk-XDFGVPCC.mjs";
6
+ import "./chunk-64A25YOZ.mjs";
7
7
  export {
8
8
  DrawerOverlay
9
9
  };
package/dist/drawer.js CHANGED
@@ -147,7 +147,8 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
147
147
  blankForDragProps,
148
148
  ...rest
149
149
  }, ref) => {
150
- let { describedbyId, duration, isOpen, labelledbyId, open, onClose } = useModal();
150
+ var _a, _b;
151
+ let { bodyRef, duration, headerRef, isOpen, open, onClose } = useModal();
151
152
  open != null ? open : open = isOpen;
152
153
  const styles = useDrawer();
153
154
  const placement = (0, import_use_value.useValue)(_placement);
@@ -157,8 +158,8 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
157
158
  DrawerCloseButton
158
159
  );
159
160
  const blankForDragBg = (0, import_react.useMemo)(() => {
160
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
161
- const propBg = (_c = (_b = (_a = rest.backgroundColor) != null ? _a : rest.bgColor) != null ? _b : rest.background) != null ? _c : rest.bg;
161
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
162
+ const propBg = (_c = (_b2 = (_a2 = rest.backgroundColor) != null ? _a2 : rest.bgColor) != null ? _b2 : rest.background) != null ? _c : rest.bg;
162
163
  const styleBg = (_j = (_h = (_f = (_d = styles.container) == null ? void 0 : _d.backgroundColor) != null ? _f : (_e = styles.container) == null ? void 0 : _e.bgColor) != null ? _h : (_g = styles.container) == null ? void 0 : _g.background) != null ? _j : (_i = styles.container) == null ? void 0 : _i.bg;
163
164
  const computedBg = propBg != null ? propBg : styleBg;
164
165
  return (0, import_utils5.isArray)(computedBg) ? computedBg : [computedBg];
@@ -253,8 +254,8 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
253
254
  {
254
255
  ref,
255
256
  className: (0, import_utils5.cx)("ui-drawer", className),
256
- "aria-describedby": describedbyId,
257
- "aria-labelledby": labelledbyId,
257
+ "aria-describedby": (_a = bodyRef.current) == null ? void 0 : _a.id,
258
+ "aria-labelledby": (_b = headerRef.current) == null ? void 0 : _b.id,
258
259
  "aria-modal": "true",
259
260
  drag: closeOnDrag ? getDragDirection() : false,
260
261
  dragConstraints: getDragDirectionRestriction(dragConstraints),
@@ -458,11 +459,12 @@ var getModalContentProps = (animation = "scale", duration) => {
458
459
  };
459
460
  var ModalContent = (0, import_motion5.motionForwardRef)(
460
461
  ({ className, children, __css, ...rest }, ref) => {
462
+ var _a, _b;
461
463
  const {
462
464
  animation,
463
- describedbyId,
465
+ bodyRef,
464
466
  duration,
465
- labelledbyId,
467
+ headerRef,
466
468
  scrollBehavior,
467
469
  styles,
468
470
  withCloseButton,
@@ -489,8 +491,8 @@ var ModalContent = (0, import_motion5.motionForwardRef)(
489
491
  {
490
492
  ref,
491
493
  className: (0, import_utils10.cx)("ui-modal", className),
492
- "aria-describedby": describedbyId,
493
- "aria-labelledby": labelledbyId,
494
+ "aria-describedby": (_a = bodyRef.current) == null ? void 0 : _a.id,
495
+ "aria-labelledby": (_b = headerRef.current) == null ? void 0 : _b.id,
494
496
  "aria-modal": "true",
495
497
  role: "dialog",
496
498
  tabIndex: -1,
@@ -545,9 +547,9 @@ var Modal = (0, import_motion6.motionForwardRef)(
545
547
  onOverlayClick,
546
548
  ...rest
547
549
  } = (0, import_core6.omitThemeProps)(mergedProps);
550
+ const headerRef = (0, import_react2.useRef)(null);
551
+ const bodyRef = (0, import_react2.useRef)(null);
548
552
  open != null ? open : open = isOpen;
549
- const labelledbyId = (0, import_react2.useId)();
550
- const describedbyId = (0, import_react2.useId)();
551
553
  const onKeyDown = (0, import_react2.useCallback)(
552
554
  (ev) => {
553
555
  if (ev.key !== "Escape") return;
@@ -585,11 +587,11 @@ var Modal = (0, import_motion6.motionForwardRef)(
585
587
  {
586
588
  value: {
587
589
  animation,
590
+ bodyRef,
588
591
  closeOnOverlay,
589
- describedbyId,
590
592
  duration,
593
+ headerRef,
591
594
  isOpen,
592
- labelledbyId,
593
595
  open,
594
596
  scrollBehavior,
595
597
  styles,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer.tsx","../src/drawer-content.tsx","../src/drawer-close-button.tsx","../src/modal-close-button.tsx","../src/modal-context.ts","../src/drawer-drag-bar.tsx","../src/drawer-overlay.tsx","../src/modal-overlay.tsx","../src/modal.tsx","../src/dialog-overlay.tsx","../src/modal-content.tsx","../src/dialog-close-button.tsx"],"sourcesContent":["import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport type { SlideProps } from \"@yamada-ui/transitions\"\nimport type { ModalProps } from \"./modal\"\nimport { omitThemeProps, useComponentMultiStyle } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { DrawerContent } from \"./drawer-content\"\nimport { DrawerOverlay } from \"./drawer-overlay\"\nimport { Modal } from \"./modal\"\nimport { DrawerProvider } from \"./modal-context\"\n\ninterface DrawerOptions {\n /**\n * If `true`, then the drawer will close on drag.\n *\n * @default false\n */\n closeOnDrag?: boolean\n /**\n * Applies constraints on the permitted draggable area.\n *\n * @default 0\n */\n dragConstraints?: number\n /**\n * The degree of movement allowed outside constraints. 0 = no movement, 1 = full movement.\n *\n * @default 0.1\n */\n dragElastic?: number\n /**\n * Offset from being dragged to closing.\n *\n * @default 80\n */\n dragOffset?: number\n /**\n * Velocity of the drag that triggers close.\n *\n * @default 100\n */\n dragVelocity?: number\n /**\n * If `true` and drawer's placement is `top` or `bottom`, the drawer will occupy the viewport height (100dvh).\n */\n fullHeight?: boolean\n /**\n * If `true` and drawer's placement is `top` or `bottom`, the drawer will occupy the viewport height (100dvh).\n *\n * @deprecated Use `fullHeight` instead.\n */\n isFullHeight?: boolean\n /**\n * The placement of the drawer.\n *\n * @default 'right'\n */\n placement?: SlideProps[\"placement\"]\n /**\n * If `true`, display the drag bar when `closeOnDrag` is `true`.\n *\n * @default true\n */\n withDragBar?: boolean\n /**\n * Props for the blank area when `closeOnDrag` is `true`.\n */\n blankForDragProps?: CSSUIObject\n}\n\nexport interface DrawerProps\n extends Omit<\n ModalProps,\n | \"animation\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"outside\"\n | \"placement\"\n | \"scrollBehavior\"\n | keyof ThemeProps\n >,\n ThemeProps<\"Drawer\">,\n DrawerOptions {}\n\n/**\n * `Drawer` is a component for a panel that appears from the edge of the screen.\n *\n * @see Docs https://yamada-ui.com/components/overlay/drawer\n */\nexport const Drawer = motionForwardRef<DrawerProps, \"div\">(\n ({ size, closeOnDrag = false, placement = \"right\", ...props }, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Drawer\", {\n size,\n closeOnDrag,\n placement,\n ...props,\n })\n let {\n allowPinchZoom,\n autoFocus,\n blockScrollOnMount,\n children,\n closeOnEsc,\n closeOnOverlay,\n dragConstraints = 0,\n dragElastic = 0.1,\n dragOffset = 80,\n dragVelocity = 100,\n duration = { enter: 0.4, exit: 0.3 },\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames,\n open,\n restoreFocus,\n withCloseButton = !closeOnDrag,\n withDragBar = true,\n withOverlay = true,\n blankForDragProps,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n ...rest\n } = omitThemeProps(mergedProps, [\"isFullHeight\"])\n\n open ??= isOpen\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerOverlay, ...cloneChildren] = findChildren(\n validChildren,\n DrawerOverlay,\n )\n\n return (\n <DrawerProvider value={styles}>\n <Modal\n ref={ref}\n {...{\n allowPinchZoom,\n autoFocus,\n blockScrollOnMount,\n closeOnEsc,\n closeOnOverlay,\n duration,\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames,\n open,\n restoreFocus,\n withCloseButton: false,\n withOverlay: false,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n }}\n >\n {customDrawerOverlay ?? (withOverlay ? <DrawerOverlay /> : null)}\n\n <DrawerContent\n {...{\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest,\n closeOnDrag,\n placement,\n }}\n >\n {cloneChildren}\n </DrawerContent>\n </Modal>\n </DrawerProvider>\n )\n },\n)\n\nDrawer.displayName = \"Drawer\"\nDrawer.__ui__ = \"Drawer\"\n","import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport type { MotionPanInfo } from \"@yamada-ui/motion\"\nimport type { Merge } from \"@yamada-ui/utils\"\nimport type { DrawerProps } from \"./drawer\"\nimport { ui } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { Slide } from \"@yamada-ui/transitions\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport { cx, findChildren, getValidChildren, isArray } from \"@yamada-ui/utils\"\nimport { useCallback, useMemo } from \"react\"\nimport { DrawerCloseButton } from \"./drawer-close-button\"\nimport { DrawerDragBar } from \"./drawer-drag-bar\"\nimport { useDrawer, useModal } from \"./modal-context\"\n\nexport interface DrawerContentProps\n extends Merge<\n Omit<DrawerProps, \"isOpen\" | \"open\" | \"placement\" | keyof ThemeProps>,\n Required<\n Pick<\n DrawerProps,\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"dragOffset\"\n | \"dragVelocity\"\n | \"placement\"\n | \"placement\"\n >\n >\n > {}\n\nexport const DrawerContent = motionForwardRef<DrawerContentProps, \"div\">(\n (\n {\n className,\n children,\n closeOnDrag,\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n placement: _placement,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest\n },\n ref,\n ) => {\n let { describedbyId, duration, isOpen, labelledbyId, open, onClose } =\n useModal()\n\n open ??= isOpen\n\n const styles = useDrawer()\n const placement = useValue(_placement)\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n DrawerCloseButton,\n )\n\n const blankForDragBg = useMemo(() => {\n const propBg =\n rest.backgroundColor ?? rest.bgColor ?? rest.background ?? rest.bg\n const styleBg =\n styles.container?.backgroundColor ??\n styles.container?.bgColor ??\n styles.container?.background ??\n styles.container?.bg\n const computedBg = propBg ?? styleBg\n\n return isArray(computedBg) ? computedBg : [computedBg]\n }, [rest, styles])\n\n const blankForDrag = useMemo<CSSUIObject>(() => {\n let position: CSSUIObject = {}\n\n switch (placement) {\n case \"top\":\n position = { left: 0, right: 0, top: \"calc(-100dvh + 1px)\" }\n break\n\n case \"bottom\":\n position = { bottom: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"left\":\n position = { bottom: 0, left: \"calc(-100% + 1px)\", top: 0 }\n break\n\n case \"right\":\n position = { bottom: 0, right: \"calc(-100% + 1px)\", top: 0 }\n break\n }\n\n const [lightBg, darkBg] = blankForDragBg\n\n return {\n _after: {\n bg: lightBg,\n content: '\"\"',\n display: \"block\",\n h: \"100dvh\",\n position: \"absolute\",\n w: \"100%\",\n ...position,\n ...blankForDragProps,\n },\n _dark: {\n _after: {\n bg: darkBg,\n },\n },\n }\n }, [placement, blankForDragBg, blankForDragProps])\n\n const css = useMemo<CSSUIObject>(\n () => ({\n display: \"flex\",\n flexDirection:\n placement === \"top\" || placement === \"bottom\" ? \"column\" : \"row\",\n outline: 0,\n ...(closeOnDrag ? blankForDrag : {}),\n ...styles.container,\n }),\n [blankForDrag, closeOnDrag, placement, styles],\n )\n\n const getDragDirectionRestriction = useCallback(\n (value: number) => {\n switch (placement) {\n case \"top\":\n return { bottom: value }\n case \"bottom\":\n return { top: value }\n case \"left\":\n return { right: value }\n case \"right\":\n return { left: value }\n }\n },\n [placement],\n )\n\n const getDragDirection = useCallback(() => {\n switch (placement) {\n case \"top\":\n case \"bottom\":\n return \"y\"\n case \"left\":\n case \"right\":\n return \"x\"\n }\n }, [placement])\n\n const isCloseByDragInfo = useCallback(\n (info: MotionPanInfo) => {\n switch (placement) {\n case \"top\":\n return (\n info.velocity.y <= dragVelocity * -1 ||\n info.offset.y <= dragOffset * -1\n )\n case \"bottom\":\n return (\n info.velocity.y >= dragVelocity || info.offset.y >= dragOffset\n )\n case \"left\":\n return (\n info.velocity.x <= dragVelocity * -1 ||\n info.offset.x <= dragOffset * -1\n )\n case \"right\":\n return (\n info.velocity.x >= dragVelocity || info.offset.x >= dragOffset\n )\n }\n },\n [placement, dragVelocity, dragOffset],\n )\n\n return (\n <Slide\n ref={ref}\n className={cx(\"ui-drawer\", className)}\n aria-describedby={describedbyId}\n aria-labelledby={labelledbyId}\n aria-modal=\"true\"\n drag={closeOnDrag ? getDragDirection() : false}\n dragConstraints={getDragDirectionRestriction(dragConstraints)}\n dragElastic={getDragDirectionRestriction(dragElastic)}\n dragMomentum={false}\n dragSnapToOrigin\n duration={duration}\n isOpen={open}\n placement={placement}\n role=\"dialog\"\n tabIndex={-1}\n onDragEnd={(_, info) => {\n if (isCloseByDragInfo(info)) onClose?.()\n }}\n __css={css}\n {...rest}\n >\n {customDrawerCloseButton ??\n (withCloseButton && onClose ? <DrawerCloseButton /> : null)}\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"bottom\" || placement === \"right\") ? (\n <DrawerDragBar />\n ) : null}\n\n <ui.div\n className=\"ui-drawer__inner\"\n __css={{\n display: \"flex\",\n flexDirection: \"column\",\n w: \"100%\",\n ...styles.inner,\n }}\n >\n {cloneChildren}\n </ui.div>\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"top\" || placement === \"left\") ? (\n <DrawerDragBar />\n ) : null}\n </Slide>\n )\n },\n)\n\nDrawerContent.displayName = \"DrawerContent\"\nDrawerContent.__ui__ = \"DrawerContent\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalCloseButtonProps } from \"./modal-close-button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useDrawer } from \"./modal-context\"\n\nexport interface DrawerCloseButtonProps extends ModalCloseButtonProps {}\n\nexport const DrawerCloseButton = forwardRef<DrawerCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-drawer__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerCloseButton.displayName = \"DrawerCloseButton\"\nDrawerCloseButton.__ui__ = \"DrawerCloseButton\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { CloseButton } from \"@yamada-ui/close-button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalCloseButtonProps extends CloseButtonProps {}\n\nexport const ModalCloseButton = forwardRef<ModalCloseButtonProps, \"button\">(\n ({ onClick, __css, ...rest }, ref) => {\n const { styles, onClose } = useModal()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n ...(__css ? __css : styles.closeButton),\n }\n\n return (\n <CloseButton\n ref={ref}\n className={cx(\"ui-modal__close-button\")}\n aria-label=\"Close modal\"\n onClick={handlerAll(onClick, (ev) => {\n ev.stopPropagation()\n onClose?.()\n })}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalCloseButton.displayName = \"ModalCloseButton\"\nModalCloseButton.__ui__ = \"ModalCloseButton\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n describedbyId: string\n labelledbyId: string\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\n\nexport interface DrawerDragBarProps extends HTMLUIProps {}\n\nexport const DrawerDragBar = forwardRef<DrawerDragBarProps, \"div\">(\n ({ className, __css, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.dragBar }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-drawer__drag-bar\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerDragBar.displayName = \"DrawerDragBar\"\nDrawerDragBar.__ui__ = \"DrawerDragBar\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DrawerOverlayProps extends ModalOverlayProps {}\n\nexport const DrawerOverlay = motionForwardRef<DrawerOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-drawer__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerOverlay.displayName = \"DrawerOverlay\"\nDrawerOverlay.__ui__ = \"DrawerOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalOverlayProps extends MotionProps {}\n\nexport const ModalOverlay = motionForwardRef<ModalOverlayProps, \"div\">(\n ({ className, onClick, __css, ...rest }, ref) => {\n const {\n animation,\n closeOnOverlay,\n duration,\n styles,\n onClose,\n onOverlayClick,\n } = useModal()\n\n const css: CSSUIObject = {\n h: \"100dvh\",\n left: 0,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <motion.div\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n aria-hidden\n custom={{ duration }}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n __css={css}\n {...props}\n {...rest}\n />\n )\n },\n)\n\nModalOverlay.displayName = \"ModalOverlay\"\nModalOverlay.__ui__ = \"ModalOverlay\"\n","import type {\n CSSUIObject,\n CSSUIProps,\n HTMLUIProps,\n ThemeProps,\n Token,\n} from \"@yamada-ui/core\"\nimport type { FocusLockProps } from \"@yamada-ui/focus-lock\"\nimport type { MotionTransitionProps } from \"@yamada-ui/motion\"\nimport type { PortalProps } from \"@yamada-ui/portal\"\nimport type { KeyboardEvent } from \"react\"\nimport type { ModalContentProps } from \"./modal-content\"\nimport { omitThemeProps, ui, useComponentMultiStyle } from \"@yamada-ui/core\"\nimport { FocusLock } from \"@yamada-ui/focus-lock\"\nimport { AnimatePresence, motionForwardRef } from \"@yamada-ui/motion\"\nimport { Portal } from \"@yamada-ui/portal\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport { findChild, findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { cloneElement, useCallback, useId } from \"react\"\nimport { RemoveScroll } from \"react-remove-scroll\"\nimport { DialogOverlay } from \"./dialog-overlay\"\nimport { DrawerContent } from \"./drawer-content\"\nimport { DrawerOverlay } from \"./drawer-overlay\"\nimport { ModalContent } from \"./modal-content\"\nimport { ModalProvider } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface ModalOptions\n extends Pick<\n FocusLockProps,\n | \"autoFocus\"\n | \"finalFocusRef\"\n | \"initialFocusRef\"\n | \"lockFocusAcrossFrames\"\n | \"restoreFocus\"\n > {\n /**\n * Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.\n *\n * @default false.\n */\n allowPinchZoom?: boolean\n /**\n * The animation of the tooltip.\n *\n * @default 'scale'\n */\n animation?: \"bottom\" | \"left\" | \"none\" | \"right\" | \"scale\" | \"top\"\n /**\n * If `true`, scrolling will be disabled on the `body` when the modal opens.\n *\n * @default true\n */\n blockScrollOnMount?: boolean\n /**\n * If `true`, the modal will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, the modal will close when the overlay is clicked.\n *\n * @default true\n */\n closeOnOverlay?: boolean\n /**\n * The animation duration.\n */\n duration?: MotionTransitionProps[\"duration\"]\n /**\n * If `true`, the open will be opened.\n *\n * @deprecated Use `open` instead.\n */\n isOpen?: boolean\n /**\n * If `true`, the open will be opened.\n */\n open?: boolean\n /**\n * The CSS `padding` property.\n */\n outside?: CSSUIProps[\"p\"]\n /**\n * The placement of the modal.\n *\n * @default 'center'\n */\n placement?: Token<\n | \"bottom\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n | \"left\"\n | \"right\"\n | \"top\"\n | \"top-left\"\n | \"top-right\"\n >\n /**\n * Where scroll behavior should originate.\n *\n * - `inside`: scroll only occurs within the `ModalBody`.\n * - `outside`: the entire `ModalContent` will scroll within the viewport.\n *\n * @default 'inside'\n */\n scrollBehavior?: \"inside\" | \"outside\"\n /**\n * If `true`, display the modal close button.\n *\n * @default true\n */\n withCloseButton?: boolean\n /**\n * If `true`, display the modal overlay.\n *\n * @default true\n */\n withOverlay?: boolean\n /**\n * Props for modal container element.\n */\n containerProps?: HTMLUIProps\n /**\n * Props to be forwarded to the portal component.\n */\n portalProps?: Omit<PortalProps, \"children\">\n /**\n * Callback invoked to close the modal.\n */\n onClose?: () => void\n /**\n * Callback function to run side effects after the modal has closed.\n */\n onCloseComplete?: () => void\n /**\n * Callback fired when the escape key is pressed and focus is within modal.\n */\n onEsc?(): void\n /**\n * Callback fired when the overlay is clicked.\n */\n onOverlayClick?: () => void\n}\n\nexport interface ModalProps\n extends ModalContentProps,\n ThemeProps<\"Modal\">,\n ModalOptions {}\n\n/**\n * `Modal` is a component that is displayed over the main content to focus the user's attention solely on the information.\n *\n * @see Docs https://yamada-ui.com/components/overlay/modal\n */\nexport const Modal = motionForwardRef<ModalProps, \"section\">(\n ({ size, ...props }, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Modal\", {\n size,\n ...props,\n })\n let {\n className,\n allowPinchZoom = false,\n animation = \"scale\",\n autoFocus,\n blockScrollOnMount = true,\n children,\n closeOnEsc = true,\n closeOnOverlay = true,\n duration,\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames = true,\n open,\n outside = \"fallback(4, 1rem)\",\n placement: _placement = \"center\",\n restoreFocus,\n scrollBehavior = \"inside\",\n withCloseButton = true,\n withOverlay = true,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n ...rest\n } = omitThemeProps(mergedProps)\n\n open ??= isOpen\n\n const labelledbyId = useId()\n const describedbyId = useId()\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (ev.key !== \"Escape\") return\n\n ev.stopPropagation()\n\n if (closeOnEsc) onClose?.()\n\n onEsc?.()\n },\n [closeOnEsc, onClose, onEsc],\n )\n\n const validChildren = getValidChildren(children)\n\n const [customModalOverlay, ...cloneChildren] = findChildren(\n validChildren,\n ModalOverlay,\n DialogOverlay,\n DrawerOverlay,\n )\n\n let drawerContent = findChild(validChildren, DrawerContent)\n\n if (drawerContent)\n drawerContent = cloneElement(drawerContent, { onKeyDown })\n\n const placement = useValue(_placement)\n\n const css: CSSUIObject = {\n alignItems: placement.includes(\"top\")\n ? \"flex-start\"\n : placement.includes(\"bottom\")\n ? \"flex-end\"\n : \"center\",\n display: \"flex\",\n h: \"100dvh\",\n justifyContent: placement.includes(\"left\")\n ? \"flex-start\"\n : placement.includes(\"right\")\n ? \"flex-end\"\n : \"center\",\n left: 0,\n p: size !== \"full\" ? outside : undefined,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n zIndex: \"fallback(jeice, 110)\",\n }\n\n return (\n <ModalProvider\n value={{\n animation,\n closeOnOverlay,\n describedbyId,\n duration,\n isOpen,\n labelledbyId,\n open,\n scrollBehavior,\n styles,\n withCloseButton,\n onClose,\n onOverlayClick,\n }}\n >\n <AnimatePresence onExitComplete={onCloseComplete}>\n {open ? (\n <Portal {...portalProps}>\n <FocusLock\n autoFocus={autoFocus}\n finalFocusRef={finalFocusRef}\n initialFocusRef={initialFocusRef}\n lockFocusAcrossFrames={lockFocusAcrossFrames}\n restoreFocus={restoreFocus}\n >\n <RemoveScroll\n allowPinchZoom={allowPinchZoom}\n enabled={blockScrollOnMount}\n forwardProps\n >\n <ui.div __css={css} {...containerProps}>\n {customModalOverlay ??\n (withOverlay && size !== \"full\" ? (\n <ModalOverlay />\n ) : null)}\n\n {drawerContent ?? (\n <ModalContent\n ref={ref}\n className={className}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {cloneChildren}\n </ModalContent>\n )}\n </ui.div>\n </RemoveScroll>\n </FocusLock>\n </Portal>\n ) : null}\n </AnimatePresence>\n </ModalProvider>\n )\n },\n)\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDialog } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DialogOverlayProps extends ModalOverlayProps {}\n\nexport const DialogOverlay = motionForwardRef<DialogOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-dialog__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogOverlay.displayName = \"DialogOverlay\"\nDialogOverlay.__ui__ = \"DialogOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps, MotionTransitionProps } from \"@yamada-ui/motion\"\nimport type { PropsWithChildren } from \"react\"\nimport type { ModalProps } from \"./modal\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { scaleFadeProps, slideFadeProps } from \"@yamada-ui/transitions\"\nimport { cx, findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { DialogCloseButton } from \"./dialog-close-button\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useModal } from \"./modal-context\"\n\nconst getModalContentProps = (\n animation: ModalProps[\"animation\"] = \"scale\",\n duration?: MotionTransitionProps[\"duration\"],\n) => {\n switch (animation) {\n case \"scale\":\n return {\n ...scaleFadeProps,\n custom: { duration, reverse: true, scale: 0.95 },\n }\n case \"top\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetY: -16, reverse: true },\n }\n case \"right\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetX: 16, reverse: true },\n }\n case \"left\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetX: -16, reverse: true },\n }\n case \"bottom\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetY: 16, reverse: true },\n }\n }\n}\n\nexport interface ModalContentProps\n extends Omit<\n MotionProps<\"section\">,\n \"animation\" | \"children\" | \"scrollBehavior\" | \"transition\"\n >,\n PropsWithChildren {}\n\nexport const ModalContent = motionForwardRef<ModalContentProps, \"section\">(\n ({ className, children, __css, ...rest }, ref) => {\n const {\n animation,\n describedbyId,\n duration,\n labelledbyId,\n scrollBehavior,\n styles,\n withCloseButton,\n onClose,\n } = useModal()\n\n const validChildren = getValidChildren(children)\n\n const [customModalCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n ModalCloseButton,\n DialogCloseButton,\n )\n\n const props =\n animation !== \"none\" ? getModalContentProps(animation, duration) : {}\n\n const css: CSSUIObject = {\n display: \"flex\",\n flexDirection: \"column\",\n maxH: \"100%\",\n outline: 0,\n overflow: scrollBehavior === \"inside\" ? \"hidden\" : \"auto\",\n position: \"relative\",\n ...(__css ? __css : styles.container),\n }\n\n return (\n <motion.section\n ref={ref}\n className={cx(\"ui-modal\", className)}\n aria-describedby={describedbyId}\n aria-labelledby={labelledbyId}\n aria-modal=\"true\"\n role=\"dialog\"\n tabIndex={-1}\n __css={css}\n {...props}\n {...rest}\n >\n {customModalCloseButton ??\n (withCloseButton && onClose ? <ModalCloseButton /> : null)}\n\n {cloneChildren}\n </motion.section>\n )\n },\n)\n\nModalContent.displayName = \"ModalContent\"\nModalContent.__ui__ = \"ModalContent\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useDialog } from \"./modal-context\"\n\nexport interface DialogCloseButtonProps extends CloseButtonProps {}\n\nexport const DialogCloseButton = forwardRef<DialogCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-dialog__close-button\", className)}\n aria-label=\"Close dialog\"\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogCloseButton.displayName = \"DialogCloseButton\"\nDialogCloseButton.__ui__ = \"DialogCloseButton\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,IAAAA,eAAuD;AACvD,IAAAC,iBAAiC;AACjC,IAAAC,iBAA+C;;;ACD/C,IAAAC,eAAmB;AACnB,oBAAiC;AACjC,yBAAsB;AACtB,uBAAyB;AACzB,IAAAC,gBAA4D;AAC5D,mBAAqC;;;ACPrC,IAAAC,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACDnB,0BAA4B;AAC5B,kBAA2B;AAC3B,IAAAC,gBAA+B;;;ACF/B,mBAA8B;AAQvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;ADZK;AAVC,IAAM,uBAAmB;AAAA,EAC9B,CAAC,EAAE,SAAS,OAAO,GAAG,KAAK,GAAG,QAAQ;AACpC,UAAM,EAAE,QAAQ,QAAQ,IAAI,SAAS;AAErC,UAAM,MAAmB;AAAA,MACvB,UAAU;AAAA,MACV,GAAI,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,wBAAwB;AAAA,QACtC,cAAW;AAAA,QACX,aAAS,0BAAW,SAAS,CAAC,OAAO;AACnC,aAAG,gBAAgB;AACnB;AAA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A,UACH;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AACrB,OAAO,SAAS;","names":["import_core","import_motion","import_utils","import_core","import_utils","import_core","import_utils","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_motion","import_utils","import_motion","import_transitions","import_utils","import_jsx_runtime","import_jsx_runtime","import_core","import_motion","import_use_value","import_utils","import_react","import_motion","import_utils","import_jsx_runtime","import_motion","import_transitions","import_utils","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/drawer.tsx","../src/drawer-content.tsx","../src/drawer-close-button.tsx","../src/modal-close-button.tsx","../src/modal-context.ts","../src/drawer-drag-bar.tsx","../src/drawer-overlay.tsx","../src/modal-overlay.tsx","../src/modal.tsx","../src/dialog-overlay.tsx","../src/modal-content.tsx","../src/dialog-close-button.tsx"],"sourcesContent":["import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport type { SlideProps } from \"@yamada-ui/transitions\"\nimport type { ModalProps } from \"./modal\"\nimport { omitThemeProps, useComponentMultiStyle } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { DrawerContent } from \"./drawer-content\"\nimport { DrawerOverlay } from \"./drawer-overlay\"\nimport { Modal } from \"./modal\"\nimport { DrawerProvider } from \"./modal-context\"\n\ninterface DrawerOptions {\n /**\n * If `true`, then the drawer will close on drag.\n *\n * @default false\n */\n closeOnDrag?: boolean\n /**\n * Applies constraints on the permitted draggable area.\n *\n * @default 0\n */\n dragConstraints?: number\n /**\n * The degree of movement allowed outside constraints. 0 = no movement, 1 = full movement.\n *\n * @default 0.1\n */\n dragElastic?: number\n /**\n * Offset from being dragged to closing.\n *\n * @default 80\n */\n dragOffset?: number\n /**\n * Velocity of the drag that triggers close.\n *\n * @default 100\n */\n dragVelocity?: number\n /**\n * If `true` and drawer's placement is `top` or `bottom`, the drawer will occupy the viewport height (100dvh).\n */\n fullHeight?: boolean\n /**\n * If `true` and drawer's placement is `top` or `bottom`, the drawer will occupy the viewport height (100dvh).\n *\n * @deprecated Use `fullHeight` instead.\n */\n isFullHeight?: boolean\n /**\n * The placement of the drawer.\n *\n * @default 'right'\n */\n placement?: SlideProps[\"placement\"]\n /**\n * If `true`, display the drag bar when `closeOnDrag` is `true`.\n *\n * @default true\n */\n withDragBar?: boolean\n /**\n * Props for the blank area when `closeOnDrag` is `true`.\n */\n blankForDragProps?: CSSUIObject\n}\n\nexport interface DrawerProps\n extends Omit<\n ModalProps,\n | \"animation\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"outside\"\n | \"placement\"\n | \"scrollBehavior\"\n | keyof ThemeProps\n >,\n ThemeProps<\"Drawer\">,\n DrawerOptions {}\n\n/**\n * `Drawer` is a component for a panel that appears from the edge of the screen.\n *\n * @see Docs https://yamada-ui.com/components/overlay/drawer\n */\nexport const Drawer = motionForwardRef<DrawerProps, \"div\">(\n ({ size, closeOnDrag = false, placement = \"right\", ...props }, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Drawer\", {\n size,\n closeOnDrag,\n placement,\n ...props,\n })\n let {\n allowPinchZoom,\n autoFocus,\n blockScrollOnMount,\n children,\n closeOnEsc,\n closeOnOverlay,\n dragConstraints = 0,\n dragElastic = 0.1,\n dragOffset = 80,\n dragVelocity = 100,\n duration = { enter: 0.4, exit: 0.3 },\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames,\n open,\n restoreFocus,\n withCloseButton = !closeOnDrag,\n withDragBar = true,\n withOverlay = true,\n blankForDragProps,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n ...rest\n } = omitThemeProps(mergedProps, [\"isFullHeight\"])\n\n open ??= isOpen\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerOverlay, ...cloneChildren] = findChildren(\n validChildren,\n DrawerOverlay,\n )\n\n return (\n <DrawerProvider value={styles}>\n <Modal\n ref={ref}\n {...{\n allowPinchZoom,\n autoFocus,\n blockScrollOnMount,\n closeOnEsc,\n closeOnOverlay,\n duration,\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames,\n open,\n restoreFocus,\n withCloseButton: false,\n withOverlay: false,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n }}\n >\n {customDrawerOverlay ?? (withOverlay ? <DrawerOverlay /> : null)}\n\n <DrawerContent\n {...{\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest,\n closeOnDrag,\n placement,\n }}\n >\n {cloneChildren}\n </DrawerContent>\n </Modal>\n </DrawerProvider>\n )\n },\n)\n\nDrawer.displayName = \"Drawer\"\nDrawer.__ui__ = \"Drawer\"\n","import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport type { MotionPanInfo } from \"@yamada-ui/motion\"\nimport type { Merge } from \"@yamada-ui/utils\"\nimport type { DrawerProps } from \"./drawer\"\nimport { ui } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { Slide } from \"@yamada-ui/transitions\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport { cx, findChildren, getValidChildren, isArray } from \"@yamada-ui/utils\"\nimport { useCallback, useMemo } from \"react\"\nimport { DrawerCloseButton } from \"./drawer-close-button\"\nimport { DrawerDragBar } from \"./drawer-drag-bar\"\nimport { useDrawer, useModal } from \"./modal-context\"\n\nexport interface DrawerContentProps\n extends Merge<\n Omit<DrawerProps, \"isOpen\" | \"open\" | \"placement\" | keyof ThemeProps>,\n Required<\n Pick<\n DrawerProps,\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"dragOffset\"\n | \"dragVelocity\"\n | \"placement\"\n | \"placement\"\n >\n >\n > {}\n\nexport const DrawerContent = motionForwardRef<DrawerContentProps, \"div\">(\n (\n {\n className,\n children,\n closeOnDrag,\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n placement: _placement,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest\n },\n ref,\n ) => {\n let { bodyRef, duration, headerRef, isOpen, open, onClose } = useModal()\n\n open ??= isOpen\n\n const styles = useDrawer()\n const placement = useValue(_placement)\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n DrawerCloseButton,\n )\n\n const blankForDragBg = useMemo(() => {\n const propBg =\n rest.backgroundColor ?? rest.bgColor ?? rest.background ?? rest.bg\n const styleBg =\n styles.container?.backgroundColor ??\n styles.container?.bgColor ??\n styles.container?.background ??\n styles.container?.bg\n const computedBg = propBg ?? styleBg\n\n return isArray(computedBg) ? computedBg : [computedBg]\n }, [rest, styles])\n\n const blankForDrag = useMemo<CSSUIObject>(() => {\n let position: CSSUIObject = {}\n\n switch (placement) {\n case \"top\":\n position = { left: 0, right: 0, top: \"calc(-100dvh + 1px)\" }\n break\n\n case \"bottom\":\n position = { bottom: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"left\":\n position = { bottom: 0, left: \"calc(-100% + 1px)\", top: 0 }\n break\n\n case \"right\":\n position = { bottom: 0, right: \"calc(-100% + 1px)\", top: 0 }\n break\n }\n\n const [lightBg, darkBg] = blankForDragBg\n\n return {\n _after: {\n bg: lightBg,\n content: '\"\"',\n display: \"block\",\n h: \"100dvh\",\n position: \"absolute\",\n w: \"100%\",\n ...position,\n ...blankForDragProps,\n },\n _dark: {\n _after: {\n bg: darkBg,\n },\n },\n }\n }, [placement, blankForDragBg, blankForDragProps])\n\n const css = useMemo<CSSUIObject>(\n () => ({\n display: \"flex\",\n flexDirection:\n placement === \"top\" || placement === \"bottom\" ? \"column\" : \"row\",\n outline: 0,\n ...(closeOnDrag ? blankForDrag : {}),\n ...styles.container,\n }),\n [blankForDrag, closeOnDrag, placement, styles],\n )\n\n const getDragDirectionRestriction = useCallback(\n (value: number) => {\n switch (placement) {\n case \"top\":\n return { bottom: value }\n case \"bottom\":\n return { top: value }\n case \"left\":\n return { right: value }\n case \"right\":\n return { left: value }\n }\n },\n [placement],\n )\n\n const getDragDirection = useCallback(() => {\n switch (placement) {\n case \"top\":\n case \"bottom\":\n return \"y\"\n case \"left\":\n case \"right\":\n return \"x\"\n }\n }, [placement])\n\n const isCloseByDragInfo = useCallback(\n (info: MotionPanInfo) => {\n switch (placement) {\n case \"top\":\n return (\n info.velocity.y <= dragVelocity * -1 ||\n info.offset.y <= dragOffset * -1\n )\n case \"bottom\":\n return (\n info.velocity.y >= dragVelocity || info.offset.y >= dragOffset\n )\n case \"left\":\n return (\n info.velocity.x <= dragVelocity * -1 ||\n info.offset.x <= dragOffset * -1\n )\n case \"right\":\n return (\n info.velocity.x >= dragVelocity || info.offset.x >= dragOffset\n )\n }\n },\n [placement, dragVelocity, dragOffset],\n )\n\n return (\n <Slide\n ref={ref}\n className={cx(\"ui-drawer\", className)}\n aria-describedby={bodyRef.current?.id}\n aria-labelledby={headerRef.current?.id}\n aria-modal=\"true\"\n drag={closeOnDrag ? getDragDirection() : false}\n dragConstraints={getDragDirectionRestriction(dragConstraints)}\n dragElastic={getDragDirectionRestriction(dragElastic)}\n dragMomentum={false}\n dragSnapToOrigin\n duration={duration}\n isOpen={open}\n placement={placement}\n role=\"dialog\"\n tabIndex={-1}\n onDragEnd={(_, info) => {\n if (isCloseByDragInfo(info)) onClose?.()\n }}\n __css={css}\n {...rest}\n >\n {customDrawerCloseButton ??\n (withCloseButton && onClose ? <DrawerCloseButton /> : null)}\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"bottom\" || placement === \"right\") ? (\n <DrawerDragBar />\n ) : null}\n\n <ui.div\n className=\"ui-drawer__inner\"\n __css={{\n display: \"flex\",\n flexDirection: \"column\",\n w: \"100%\",\n ...styles.inner,\n }}\n >\n {cloneChildren}\n </ui.div>\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"top\" || placement === \"left\") ? (\n <DrawerDragBar />\n ) : null}\n </Slide>\n )\n },\n)\n\nDrawerContent.displayName = \"DrawerContent\"\nDrawerContent.__ui__ = \"DrawerContent\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalCloseButtonProps } from \"./modal-close-button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useDrawer } from \"./modal-context\"\n\nexport interface DrawerCloseButtonProps extends ModalCloseButtonProps {}\n\nexport const DrawerCloseButton = forwardRef<DrawerCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-drawer__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerCloseButton.displayName = \"DrawerCloseButton\"\nDrawerCloseButton.__ui__ = \"DrawerCloseButton\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { CloseButton } from \"@yamada-ui/close-button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalCloseButtonProps extends CloseButtonProps {}\n\nexport const ModalCloseButton = forwardRef<ModalCloseButtonProps, \"button\">(\n ({ onClick, __css, ...rest }, ref) => {\n const { styles, onClose } = useModal()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n ...(__css ? __css : styles.closeButton),\n }\n\n return (\n <CloseButton\n ref={ref}\n className={cx(\"ui-modal__close-button\")}\n aria-label=\"Close modal\"\n onClick={handlerAll(onClick, (ev) => {\n ev.stopPropagation()\n onClose?.()\n })}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalCloseButton.displayName = \"ModalCloseButton\"\nModalCloseButton.__ui__ = \"ModalCloseButton\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { RefObject } from \"react\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n bodyRef: RefObject<HTMLElement>\n headerRef: RefObject<HTMLElement>\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\n\nexport interface DrawerDragBarProps extends HTMLUIProps {}\n\nexport const DrawerDragBar = forwardRef<DrawerDragBarProps, \"div\">(\n ({ className, __css, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.dragBar }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-drawer__drag-bar\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerDragBar.displayName = \"DrawerDragBar\"\nDrawerDragBar.__ui__ = \"DrawerDragBar\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DrawerOverlayProps extends ModalOverlayProps {}\n\nexport const DrawerOverlay = motionForwardRef<DrawerOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-drawer__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerOverlay.displayName = \"DrawerOverlay\"\nDrawerOverlay.__ui__ = \"DrawerOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalOverlayProps extends MotionProps {}\n\nexport const ModalOverlay = motionForwardRef<ModalOverlayProps, \"div\">(\n ({ className, onClick, __css, ...rest }, ref) => {\n const {\n animation,\n closeOnOverlay,\n duration,\n styles,\n onClose,\n onOverlayClick,\n } = useModal()\n\n const css: CSSUIObject = {\n h: \"100dvh\",\n left: 0,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <motion.div\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n aria-hidden\n custom={{ duration }}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n __css={css}\n {...props}\n {...rest}\n />\n )\n },\n)\n\nModalOverlay.displayName = \"ModalOverlay\"\nModalOverlay.__ui__ = \"ModalOverlay\"\n","import type {\n CSSUIObject,\n CSSUIProps,\n HTMLUIProps,\n ThemeProps,\n Token,\n} from \"@yamada-ui/core\"\nimport type { FocusLockProps } from \"@yamada-ui/focus-lock\"\nimport type { MotionTransitionProps } from \"@yamada-ui/motion\"\nimport type { PortalProps } from \"@yamada-ui/portal\"\nimport type { KeyboardEvent } from \"react\"\nimport type { ModalContentProps } from \"./modal-content\"\nimport { omitThemeProps, ui, useComponentMultiStyle } from \"@yamada-ui/core\"\nimport { FocusLock } from \"@yamada-ui/focus-lock\"\nimport { AnimatePresence, motionForwardRef } from \"@yamada-ui/motion\"\nimport { Portal } from \"@yamada-ui/portal\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport { findChild, findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { cloneElement, useCallback, useRef } from \"react\"\nimport { RemoveScroll } from \"react-remove-scroll\"\nimport { DialogOverlay } from \"./dialog-overlay\"\nimport { DrawerContent } from \"./drawer-content\"\nimport { DrawerOverlay } from \"./drawer-overlay\"\nimport { ModalContent } from \"./modal-content\"\nimport { ModalProvider } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface ModalOptions\n extends Pick<\n FocusLockProps,\n | \"autoFocus\"\n | \"finalFocusRef\"\n | \"initialFocusRef\"\n | \"lockFocusAcrossFrames\"\n | \"restoreFocus\"\n > {\n /**\n * Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.\n *\n * @default false.\n */\n allowPinchZoom?: boolean\n /**\n * The animation of the tooltip.\n *\n * @default 'scale'\n */\n animation?: \"bottom\" | \"left\" | \"none\" | \"right\" | \"scale\" | \"top\"\n /**\n * If `true`, scrolling will be disabled on the `body` when the modal opens.\n *\n * @default true\n */\n blockScrollOnMount?: boolean\n /**\n * If `true`, the modal will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, the modal will close when the overlay is clicked.\n *\n * @default true\n */\n closeOnOverlay?: boolean\n /**\n * The animation duration.\n */\n duration?: MotionTransitionProps[\"duration\"]\n /**\n * If `true`, the open will be opened.\n *\n * @deprecated Use `open` instead.\n */\n isOpen?: boolean\n /**\n * If `true`, the open will be opened.\n */\n open?: boolean\n /**\n * The CSS `padding` property.\n */\n outside?: CSSUIProps[\"p\"]\n /**\n * The placement of the modal.\n *\n * @default 'center'\n */\n placement?: Token<\n | \"bottom\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n | \"left\"\n | \"right\"\n | \"top\"\n | \"top-left\"\n | \"top-right\"\n >\n /**\n * Where scroll behavior should originate.\n *\n * - `inside`: scroll only occurs within the `ModalBody`.\n * - `outside`: the entire `ModalContent` will scroll within the viewport.\n *\n * @default 'inside'\n */\n scrollBehavior?: \"inside\" | \"outside\"\n /**\n * If `true`, display the modal close button.\n *\n * @default true\n */\n withCloseButton?: boolean\n /**\n * If `true`, display the modal overlay.\n *\n * @default true\n */\n withOverlay?: boolean\n /**\n * Props for modal container element.\n */\n containerProps?: HTMLUIProps\n /**\n * Props to be forwarded to the portal component.\n */\n portalProps?: Omit<PortalProps, \"children\">\n /**\n * Callback invoked to close the modal.\n */\n onClose?: () => void\n /**\n * Callback function to run side effects after the modal has closed.\n */\n onCloseComplete?: () => void\n /**\n * Callback fired when the escape key is pressed and focus is within modal.\n */\n onEsc?(): void\n /**\n * Callback fired when the overlay is clicked.\n */\n onOverlayClick?: () => void\n}\n\nexport interface ModalProps\n extends ModalContentProps,\n ThemeProps<\"Modal\">,\n ModalOptions {}\n\n/**\n * `Modal` is a component that is displayed over the main content to focus the user's attention solely on the information.\n *\n * @see Docs https://yamada-ui.com/components/overlay/modal\n */\nexport const Modal = motionForwardRef<ModalProps, \"section\">(\n ({ size, ...props }, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Modal\", {\n size,\n ...props,\n })\n let {\n className,\n allowPinchZoom = false,\n animation = \"scale\",\n autoFocus,\n blockScrollOnMount = true,\n children,\n closeOnEsc = true,\n closeOnOverlay = true,\n duration,\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames = true,\n open,\n outside = \"fallback(4, 1rem)\",\n placement: _placement = \"center\",\n restoreFocus,\n scrollBehavior = \"inside\",\n withCloseButton = true,\n withOverlay = true,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n ...rest\n } = omitThemeProps(mergedProps)\n const headerRef = useRef<HTMLElement>(null)\n const bodyRef = useRef<HTMLElement>(null)\n\n open ??= isOpen\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (ev.key !== \"Escape\") return\n\n ev.stopPropagation()\n\n if (closeOnEsc) onClose?.()\n\n onEsc?.()\n },\n [closeOnEsc, onClose, onEsc],\n )\n\n const validChildren = getValidChildren(children)\n\n const [customModalOverlay, ...cloneChildren] = findChildren(\n validChildren,\n ModalOverlay,\n DialogOverlay,\n DrawerOverlay,\n )\n\n let drawerContent = findChild(validChildren, DrawerContent)\n\n if (drawerContent)\n drawerContent = cloneElement(drawerContent, { onKeyDown })\n\n const placement = useValue(_placement)\n\n const css: CSSUIObject = {\n alignItems: placement.includes(\"top\")\n ? \"flex-start\"\n : placement.includes(\"bottom\")\n ? \"flex-end\"\n : \"center\",\n display: \"flex\",\n h: \"100dvh\",\n justifyContent: placement.includes(\"left\")\n ? \"flex-start\"\n : placement.includes(\"right\")\n ? \"flex-end\"\n : \"center\",\n left: 0,\n p: size !== \"full\" ? outside : undefined,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n zIndex: \"fallback(jeice, 110)\",\n }\n\n return (\n <ModalProvider\n value={{\n animation,\n bodyRef,\n closeOnOverlay,\n duration,\n headerRef,\n isOpen,\n open,\n scrollBehavior,\n styles,\n withCloseButton,\n onClose,\n onOverlayClick,\n }}\n >\n <AnimatePresence onExitComplete={onCloseComplete}>\n {open ? (\n <Portal {...portalProps}>\n <FocusLock\n autoFocus={autoFocus}\n finalFocusRef={finalFocusRef}\n initialFocusRef={initialFocusRef}\n lockFocusAcrossFrames={lockFocusAcrossFrames}\n restoreFocus={restoreFocus}\n >\n <RemoveScroll\n allowPinchZoom={allowPinchZoom}\n enabled={blockScrollOnMount}\n forwardProps\n >\n <ui.div __css={css} {...containerProps}>\n {customModalOverlay ??\n (withOverlay && size !== \"full\" ? (\n <ModalOverlay />\n ) : null)}\n\n {drawerContent ?? (\n <ModalContent\n ref={ref}\n className={className}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {cloneChildren}\n </ModalContent>\n )}\n </ui.div>\n </RemoveScroll>\n </FocusLock>\n </Portal>\n ) : null}\n </AnimatePresence>\n </ModalProvider>\n )\n },\n)\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDialog } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DialogOverlayProps extends ModalOverlayProps {}\n\nexport const DialogOverlay = motionForwardRef<DialogOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-dialog__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogOverlay.displayName = \"DialogOverlay\"\nDialogOverlay.__ui__ = \"DialogOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps, MotionTransitionProps } from \"@yamada-ui/motion\"\nimport type { PropsWithChildren } from \"react\"\nimport type { ModalProps } from \"./modal\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { scaleFadeProps, slideFadeProps } from \"@yamada-ui/transitions\"\nimport { cx, findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { DialogCloseButton } from \"./dialog-close-button\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useModal } from \"./modal-context\"\n\nconst getModalContentProps = (\n animation: ModalProps[\"animation\"] = \"scale\",\n duration?: MotionTransitionProps[\"duration\"],\n) => {\n switch (animation) {\n case \"scale\":\n return {\n ...scaleFadeProps,\n custom: { duration, reverse: true, scale: 0.95 },\n }\n case \"top\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetY: -16, reverse: true },\n }\n case \"right\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetX: 16, reverse: true },\n }\n case \"left\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetX: -16, reverse: true },\n }\n case \"bottom\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetY: 16, reverse: true },\n }\n }\n}\n\nexport interface ModalContentProps\n extends Omit<\n MotionProps<\"section\">,\n \"animation\" | \"children\" | \"scrollBehavior\" | \"transition\"\n >,\n PropsWithChildren {}\n\nexport const ModalContent = motionForwardRef<ModalContentProps, \"section\">(\n ({ className, children, __css, ...rest }, ref) => {\n const {\n animation,\n bodyRef,\n duration,\n headerRef,\n scrollBehavior,\n styles,\n withCloseButton,\n onClose,\n } = useModal()\n\n const validChildren = getValidChildren(children)\n\n const [customModalCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n ModalCloseButton,\n DialogCloseButton,\n )\n\n const props =\n animation !== \"none\" ? getModalContentProps(animation, duration) : {}\n\n const css: CSSUIObject = {\n display: \"flex\",\n flexDirection: \"column\",\n maxH: \"100%\",\n outline: 0,\n overflow: scrollBehavior === \"inside\" ? \"hidden\" : \"auto\",\n position: \"relative\",\n ...(__css ? __css : styles.container),\n }\n\n return (\n <motion.section\n ref={ref}\n className={cx(\"ui-modal\", className)}\n aria-describedby={bodyRef.current?.id}\n aria-labelledby={headerRef.current?.id}\n aria-modal=\"true\"\n role=\"dialog\"\n tabIndex={-1}\n __css={css}\n {...props}\n {...rest}\n >\n {customModalCloseButton ??\n (withCloseButton && onClose ? <ModalCloseButton /> : null)}\n\n {cloneChildren}\n </motion.section>\n )\n },\n)\n\nModalContent.displayName = \"ModalContent\"\nModalContent.__ui__ = \"ModalContent\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useDialog } from \"./modal-context\"\n\nexport interface DialogCloseButtonProps extends CloseButtonProps {}\n\nexport const DialogCloseButton = forwardRef<DialogCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-dialog__close-button\", className)}\n aria-label=\"Close dialog\"\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogCloseButton.displayName = \"DialogCloseButton\"\nDialogCloseButton.__ui__ = \"DialogCloseButton\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,IAAAA,eAAuD;AACvD,IAAAC,iBAAiC;AACjC,IAAAC,iBAA+C;;;ACD/C,IAAAC,eAAmB;AACnB,oBAAiC;AACjC,yBAAsB;AACtB,uBAAyB;AACzB,IAAAC,gBAA4D;AAC5D,mBAAqC;;;ACPrC,IAAAC,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACDnB,0BAA4B;AAC5B,kBAA2B;AAC3B,IAAAC,gBAA+B;;;ACD/B,mBAA8B;AAQvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;ADbK;AAVC,IAAM,uBAAmB;AAAA,EAC9B,CAAC,EAAE,SAAS,OAAO,GAAG,KAAK,GAAG,QAAQ;AACpC,UAAM,EAAE,QAAQ,QAAQ,IAAI,SAAS;AAErC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AA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,iBAAiB;AAAA,UACjB,aAAa;AAAA,UACb;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QAEC;AAAA,8DAAwB,cAAc,8CAAC,iBAAc,IAAK;AAAA,UAE3D;AAAA,YAAC;AAAA;AAAA,cACE,GAAG;AAAA,gBACF;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,GAAG;AAAA,gBACH;AAAA,gBACA;AAAA,cACF;AAAA,cAEC;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AACrB,OAAO,SAAS;","names":["import_core","import_motion","import_utils","import_core","import_utils","import_core","import_utils","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","_a","_b","import_motion","import_utils","import_motion","import_transitions","import_utils","import_jsx_runtime","import_jsx_runtime","import_core","import_motion","import_use_value","import_utils","import_react","import_motion","import_utils","import_jsx_runtime","import_motion","import_transitions","import_utils","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
package/dist/drawer.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  "use client"
2
2
  import {
3
3
  Drawer
4
- } from "./chunk-KRAXUNBU.mjs";
5
- import "./chunk-WKDYYNHI.mjs";
6
- import "./chunk-SCU75AQJ.mjs";
7
- import "./chunk-4SA2BXAV.mjs";
8
- import "./chunk-E4FDNJ4R.mjs";
9
- import "./chunk-4L4JX6MZ.mjs";
10
- import "./chunk-U2DBPI7Y.mjs";
11
- import "./chunk-CTBGRQX2.mjs";
12
- import "./chunk-4VGCDKI3.mjs";
13
- import "./chunk-UWNNN2FG.mjs";
14
- import "./chunk-DT5IIM35.mjs";
15
- import "./chunk-EPC5EUXN.mjs";
4
+ } from "./chunk-QIRIQ2KT.mjs";
5
+ import "./chunk-YK2YBJMG.mjs";
6
+ import "./chunk-FXMVCPK5.mjs";
7
+ import "./chunk-AZF6QW2S.mjs";
8
+ import "./chunk-5NLJNYIN.mjs";
9
+ import "./chunk-ZMEZYJLF.mjs";
10
+ import "./chunk-3RGLB7UM.mjs";
11
+ import "./chunk-V6LGJTK2.mjs";
12
+ import "./chunk-XDFGVPCC.mjs";
13
+ import "./chunk-PXCCIW5O.mjs";
14
+ import "./chunk-PXV3LL5A.mjs";
15
+ import "./chunk-64A25YOZ.mjs";
16
16
  export {
17
17
  Drawer
18
18
  };
package/dist/index.js CHANGED
@@ -75,7 +75,7 @@ var [DrawerProvider, useDrawer] = (0, import_utils.createContext)({
75
75
  var import_jsx_runtime = require("react/jsx-runtime");
76
76
  var ModalBody = (0, import_core.forwardRef)(
77
77
  ({ className, __css, ...rest }, ref) => {
78
- const { describedbyId, scrollBehavior, styles } = useModal();
78
+ const { bodyRef, scrollBehavior, styles } = useModal();
79
79
  const css = {
80
80
  alignItems: "flex-start",
81
81
  display: "flex",
@@ -86,8 +86,7 @@ var ModalBody = (0, import_core.forwardRef)(
86
86
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
87
87
  import_core.ui.div,
88
88
  {
89
- id: describedbyId,
90
- ref,
89
+ ref: (0, import_utils2.mergeRefs)(bodyRef, ref),
91
90
  className: (0, import_utils2.cx)("ui-modal__body", className),
92
91
  __css: css,
93
92
  ...rest
@@ -235,7 +234,7 @@ var import_utils8 = require("@yamada-ui/utils");
235
234
  var import_jsx_runtime7 = require("react/jsx-runtime");
236
235
  var ModalHeader = (0, import_core7.forwardRef)(
237
236
  ({ className, __css, ...rest }, ref) => {
238
- const { labelledbyId, styles } = useModal();
237
+ const { headerRef, styles } = useModal();
239
238
  const css = {
240
239
  alignItems: "center",
241
240
  display: "flex",
@@ -245,8 +244,7 @@ var ModalHeader = (0, import_core7.forwardRef)(
245
244
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
246
245
  import_core7.ui.header,
247
246
  {
248
- id: labelledbyId,
249
- ref,
247
+ ref: (0, import_utils8.mergeRefs)(headerRef, ref),
250
248
  className: (0, import_utils8.cx)("ui-modal__header", className),
251
249
  __css: css,
252
250
  ...rest
@@ -425,7 +423,8 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
425
423
  blankForDragProps,
426
424
  ...rest
427
425
  }, ref) => {
428
- let { describedbyId, duration, isOpen, labelledbyId, open, onClose } = useModal();
426
+ var _a, _b;
427
+ let { bodyRef, duration, headerRef, isOpen, open, onClose } = useModal();
429
428
  open != null ? open : open = isOpen;
430
429
  const styles = useDrawer();
431
430
  const placement = (0, import_use_value.useValue)(_placement);
@@ -435,8 +434,8 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
435
434
  DrawerCloseButton
436
435
  );
437
436
  const blankForDragBg = (0, import_react.useMemo)(() => {
438
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
439
- const propBg = (_c = (_b = (_a = rest.backgroundColor) != null ? _a : rest.bgColor) != null ? _b : rest.background) != null ? _c : rest.bg;
437
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
438
+ const propBg = (_c = (_b2 = (_a2 = rest.backgroundColor) != null ? _a2 : rest.bgColor) != null ? _b2 : rest.background) != null ? _c : rest.bg;
440
439
  const styleBg = (_j = (_h = (_f = (_d = styles.container) == null ? void 0 : _d.backgroundColor) != null ? _f : (_e = styles.container) == null ? void 0 : _e.bgColor) != null ? _h : (_g = styles.container) == null ? void 0 : _g.background) != null ? _j : (_i = styles.container) == null ? void 0 : _i.bg;
441
440
  const computedBg = propBg != null ? propBg : styleBg;
442
441
  return (0, import_utils14.isArray)(computedBg) ? computedBg : [computedBg];
@@ -531,8 +530,8 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
531
530
  {
532
531
  ref,
533
532
  className: (0, import_utils14.cx)("ui-drawer", className),
534
- "aria-describedby": describedbyId,
535
- "aria-labelledby": labelledbyId,
533
+ "aria-describedby": (_a = bodyRef.current) == null ? void 0 : _a.id,
534
+ "aria-labelledby": (_b = headerRef.current) == null ? void 0 : _b.id,
536
535
  "aria-modal": "true",
537
536
  drag: closeOnDrag ? getDragDirection() : false,
538
537
  dragConstraints: getDragDirectionRestriction(dragConstraints),
@@ -632,11 +631,12 @@ var getModalContentProps = (animation = "scale", duration) => {
632
631
  };
633
632
  var ModalContent = (0, import_motion5.motionForwardRef)(
634
633
  ({ className, children, __css, ...rest }, ref) => {
634
+ var _a, _b;
635
635
  const {
636
636
  animation,
637
- describedbyId,
637
+ bodyRef,
638
638
  duration,
639
- labelledbyId,
639
+ headerRef,
640
640
  scrollBehavior,
641
641
  styles,
642
642
  withCloseButton,
@@ -663,8 +663,8 @@ var ModalContent = (0, import_motion5.motionForwardRef)(
663
663
  {
664
664
  ref,
665
665
  className: (0, import_utils16.cx)("ui-modal", className),
666
- "aria-describedby": describedbyId,
667
- "aria-labelledby": labelledbyId,
666
+ "aria-describedby": (_a = bodyRef.current) == null ? void 0 : _a.id,
667
+ "aria-labelledby": (_b = headerRef.current) == null ? void 0 : _b.id,
668
668
  "aria-modal": "true",
669
669
  role: "dialog",
670
670
  tabIndex: -1,
@@ -719,9 +719,9 @@ var Modal = (0, import_motion6.motionForwardRef)(
719
719
  onOverlayClick,
720
720
  ...rest
721
721
  } = (0, import_core12.omitThemeProps)(mergedProps);
722
+ const headerRef = (0, import_react2.useRef)(null);
723
+ const bodyRef = (0, import_react2.useRef)(null);
722
724
  open != null ? open : open = isOpen;
723
- const labelledbyId = (0, import_react2.useId)();
724
- const describedbyId = (0, import_react2.useId)();
725
725
  const onKeyDown = (0, import_react2.useCallback)(
726
726
  (ev) => {
727
727
  if (ev.key !== "Escape") return;
@@ -759,11 +759,11 @@ var Modal = (0, import_motion6.motionForwardRef)(
759
759
  {
760
760
  value: {
761
761
  animation,
762
+ bodyRef,
762
763
  closeOnOverlay,
763
- describedbyId,
764
764
  duration,
765
+ headerRef,
765
766
  isOpen,
766
- labelledbyId,
767
767
  open,
768
768
  scrollBehavior,
769
769
  styles,