@yamada-ui/react 2.2.0 → 2.3.0-next-20260411030430

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/dist/cjs/components/avatar/avatar-group.cjs +6 -3
  2. package/dist/cjs/components/avatar/avatar-group.cjs.map +1 -1
  3. package/dist/cjs/components/checkbox/checkbox-group.cjs +6 -4
  4. package/dist/cjs/components/checkbox/checkbox-group.cjs.map +1 -1
  5. package/dist/cjs/components/checkbox-card/checkbox-card-group.cjs +5 -3
  6. package/dist/cjs/components/checkbox-card/checkbox-card-group.cjs.map +1 -1
  7. package/dist/cjs/components/menu/menu.cjs +45 -42
  8. package/dist/cjs/components/menu/menu.cjs.map +1 -1
  9. package/dist/cjs/components/native-popover/native-popover.cjs +26 -23
  10. package/dist/cjs/components/native-popover/native-popover.cjs.map +1 -1
  11. package/dist/cjs/components/popover/popover.cjs +34 -31
  12. package/dist/cjs/components/popover/popover.cjs.map +1 -1
  13. package/dist/cjs/components/radio/radio-group.cjs +6 -4
  14. package/dist/cjs/components/radio/radio-group.cjs.map +1 -1
  15. package/dist/cjs/components/radio-card/radio-card-group.cjs +5 -3
  16. package/dist/cjs/components/radio-card/radio-card-group.cjs.map +1 -1
  17. package/dist/cjs/components/toggle/toggle-group.cjs +6 -4
  18. package/dist/cjs/components/toggle/toggle-group.cjs.map +1 -1
  19. package/dist/cjs/components/tooltip/tooltip.cjs +23 -18
  20. package/dist/cjs/components/tooltip/tooltip.cjs.map +1 -1
  21. package/dist/cjs/core/components/create-component.cjs +31 -6
  22. package/dist/cjs/core/components/create-component.cjs.map +1 -1
  23. package/dist/esm/components/avatar/avatar-group.js +6 -3
  24. package/dist/esm/components/avatar/avatar-group.js.map +1 -1
  25. package/dist/esm/components/checkbox/checkbox-group.js +6 -4
  26. package/dist/esm/components/checkbox/checkbox-group.js.map +1 -1
  27. package/dist/esm/components/checkbox-card/checkbox-card-group.js +5 -3
  28. package/dist/esm/components/checkbox-card/checkbox-card-group.js.map +1 -1
  29. package/dist/esm/components/menu/menu.js +45 -42
  30. package/dist/esm/components/menu/menu.js.map +1 -1
  31. package/dist/esm/components/native-popover/native-popover.js +26 -23
  32. package/dist/esm/components/native-popover/native-popover.js.map +1 -1
  33. package/dist/esm/components/popover/popover.js +34 -31
  34. package/dist/esm/components/popover/popover.js.map +1 -1
  35. package/dist/esm/components/radio/radio-group.js +6 -4
  36. package/dist/esm/components/radio/radio-group.js.map +1 -1
  37. package/dist/esm/components/radio-card/radio-card-group.js +5 -3
  38. package/dist/esm/components/radio-card/radio-card-group.js.map +1 -1
  39. package/dist/esm/components/toggle/toggle-group.js +6 -4
  40. package/dist/esm/components/toggle/toggle-group.js.map +1 -1
  41. package/dist/esm/components/tooltip/tooltip.js +23 -18
  42. package/dist/esm/components/tooltip/tooltip.js.map +1 -1
  43. package/dist/esm/core/components/create-component.js +31 -6
  44. package/dist/esm/core/components/create-component.js.map +1 -1
  45. package/dist/types/components/accordion/accordion.d.ts +2 -4
  46. package/dist/types/components/accordion/use-accordion.d.ts +11 -11
  47. package/dist/types/components/action-bar/action-bar.d.ts +2 -3
  48. package/dist/types/components/airy/airy.d.ts +2 -3
  49. package/dist/types/components/alert/alert.d.ts +2 -5
  50. package/dist/types/components/alert/alert.style.d.ts +1 -1
  51. package/dist/types/components/alpha-slider/alpha-slider.d.ts +2 -3
  52. package/dist/types/components/aspect-ratio/aspect-ratio.d.ts +2 -2
  53. package/dist/types/components/autocomplete/autocomplete.d.ts +2 -4
  54. package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
  55. package/dist/types/components/autocomplete/use-autocomplete.d.ts +5 -7
  56. package/dist/types/components/avatar/avatar.d.ts +5 -5
  57. package/dist/types/components/avatar/avatar.style.d.ts +1 -1
  58. package/dist/types/components/avatar/use-avatar-group.d.ts +2 -2
  59. package/dist/types/components/badge/badge.d.ts +2 -2
  60. package/dist/types/components/bleed/bleed.d.ts +2 -2
  61. package/dist/types/components/blockquote/blockquote.d.ts +2 -2
  62. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  63. package/dist/types/components/breadcrumb/use-breadcrumb.d.ts +2 -2
  64. package/dist/types/components/button/button-group.d.ts +0 -1
  65. package/dist/types/components/button/button.d.ts +2 -3
  66. package/dist/types/components/button/icon-button.d.ts +2 -2
  67. package/dist/types/components/calendar/calendar.d.ts +2 -3
  68. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  69. package/dist/types/components/calendar/use-calendar.d.ts +8 -9
  70. package/dist/types/components/card/card.d.ts +2 -2
  71. package/dist/types/components/carousel/carousel.d.ts +2 -3
  72. package/dist/types/components/carousel/carousel.style.d.ts +2 -2
  73. package/dist/types/components/carousel/use-carousel.d.ts +3 -3
  74. package/dist/types/components/center/center.d.ts +2 -2
  75. package/dist/types/components/chart/area-chart.d.ts +2 -2
  76. package/dist/types/components/chart/bar-chart.d.ts +2 -2
  77. package/dist/types/components/chart/chart.d.ts +5 -5
  78. package/dist/types/components/chart/composed-chart.d.ts +2 -2
  79. package/dist/types/components/chart/donut-chart.d.ts +2 -2
  80. package/dist/types/components/chart/line-chart.d.ts +2 -2
  81. package/dist/types/components/chart/pie-chart.d.ts +2 -2
  82. package/dist/types/components/chart/radar-chart.d.ts +2 -2
  83. package/dist/types/components/chart/radial-chart.d.ts +2 -2
  84. package/dist/types/components/chart/use-chart.d.ts +2 -2
  85. package/dist/types/components/checkbox/checkbox-group.d.ts +0 -2
  86. package/dist/types/components/checkbox/checkbox.d.ts +5 -6
  87. package/dist/types/components/checkbox/checkbox.style.d.ts +1 -1
  88. package/dist/types/components/checkbox/use-checkbox-group.d.ts +2 -3
  89. package/dist/types/components/checkbox/use-checkbox.d.ts +0 -1
  90. package/dist/types/components/checkbox-card/checkbox-card-group.d.ts +0 -3
  91. package/dist/types/components/checkbox-card/checkbox-card.d.ts +5 -7
  92. package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
  93. package/dist/types/components/circle-progress/circle-progress.d.ts +2 -3
  94. package/dist/types/components/close-button/close-button.d.ts +2 -3
  95. package/dist/types/components/code/code.d.ts +2 -2
  96. package/dist/types/components/collapse/collapse.d.ts +2 -3
  97. package/dist/types/components/color-picker/color-picker.d.ts +2 -6
  98. package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
  99. package/dist/types/components/color-picker/use-color-picker.d.ts +2 -5
  100. package/dist/types/components/color-selector/color-selector.d.ts +2 -6
  101. package/dist/types/components/color-selector/color-selector.style.d.ts +2 -2
  102. package/dist/types/components/color-selector/use-color-selector.d.ts +3 -5
  103. package/dist/types/components/color-swatch/color-swatch.d.ts +2 -2
  104. package/dist/types/components/container/container.d.ts +2 -2
  105. package/dist/types/components/data-list/data-list.d.ts +2 -2
  106. package/dist/types/components/data-list/data-list.style.d.ts +1 -1
  107. package/dist/types/components/date-picker/date-picker.d.ts +2 -5
  108. package/dist/types/components/date-picker/use-date-picker.d.ts +4 -7
  109. package/dist/types/components/drawer/drawer.d.ts +2 -5
  110. package/dist/types/components/drawer/drawer.style.d.ts +2 -2
  111. package/dist/types/components/drawer/use-drawer.d.ts +0 -2
  112. package/dist/types/components/dropzone/dropzone.d.ts +5 -8
  113. package/dist/types/components/dropzone/dropzone.style.d.ts +1 -1
  114. package/dist/types/components/dropzone/use-dropzone.d.ts +0 -1
  115. package/dist/types/components/editable/editable.d.ts +2 -3
  116. package/dist/types/components/editable/use-editable.d.ts +2 -3
  117. package/dist/types/components/em/em.d.ts +2 -2
  118. package/dist/types/components/empty-state/empty-state.d.ts +2 -2
  119. package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
  120. package/dist/types/components/fade/fade.d.ts +2 -3
  121. package/dist/types/components/fade-scale/fade-scale.d.ts +0 -1
  122. package/dist/types/components/field/field.d.ts +3 -3
  123. package/dist/types/components/field/use-field-props.d.ts +4 -4
  124. package/dist/types/components/fieldset/fieldset.d.ts +3 -4
  125. package/dist/types/components/file-button/file-button.d.ts +2 -4
  126. package/dist/types/components/file-button/use-file-button.d.ts +18 -20
  127. package/dist/types/components/file-input/file-input.d.ts +2 -4
  128. package/dist/types/components/file-input/file-input.style.d.ts +1 -1
  129. package/dist/types/components/file-input/use-file-input.d.ts +17 -18
  130. package/dist/types/components/flex/flex.d.ts +2 -2
  131. package/dist/types/components/flip/flip.d.ts +4 -5
  132. package/dist/types/components/float/float.d.ts +2 -2
  133. package/dist/types/components/form/form.d.ts +3 -4
  134. package/dist/types/components/format/format-byte.d.ts +4 -4
  135. package/dist/types/components/format/format-date-time.d.ts +4 -4
  136. package/dist/types/components/format/format-number.d.ts +2 -2
  137. package/dist/types/components/format/use-format-byte.d.ts +0 -1
  138. package/dist/types/components/format/use-format-date-time.d.ts +0 -1
  139. package/dist/types/components/format/use-format-number.d.ts +0 -1
  140. package/dist/types/components/grid/grid-item.d.ts +2 -2
  141. package/dist/types/components/grid/grid.d.ts +2 -2
  142. package/dist/types/components/group/group.d.ts +2 -3
  143. package/dist/types/components/group/use-group.d.ts +2 -2
  144. package/dist/types/components/heading/heading.d.ts +2 -2
  145. package/dist/types/components/highlight/highlight.d.ts +0 -2
  146. package/dist/types/components/hue-slider/hue-slider.d.ts +3 -4
  147. package/dist/types/components/icon/icon.d.ts +4 -4
  148. package/dist/types/components/image/image.d.ts +2 -2
  149. package/dist/types/components/indicator/indicator.d.ts +4 -5
  150. package/dist/types/components/infinite-scroll-area/infinite-scroll-area.d.ts +2 -2
  151. package/dist/types/components/input/input-addon.d.ts +2 -2
  152. package/dist/types/components/input/input-element.d.ts +2 -2
  153. package/dist/types/components/input/input-group.d.ts +0 -2
  154. package/dist/types/components/input/input.d.ts +2 -3
  155. package/dist/types/components/kbd/kbd.d.ts +2 -2
  156. package/dist/types/components/link/link.d.ts +2 -2
  157. package/dist/types/components/link-box/link-box.d.ts +2 -2
  158. package/dist/types/components/list/list.d.ts +2 -2
  159. package/dist/types/components/loading/loading-provider.d.ts +2 -2
  160. package/dist/types/components/loading/loading.d.ts +3 -4
  161. package/dist/types/components/loading/use-loading-component.d.ts +0 -1
  162. package/dist/types/components/mark/mark.d.ts +2 -2
  163. package/dist/types/components/menu/menu.d.ts +2 -3
  164. package/dist/types/components/menu/use-menu.d.ts +11 -11
  165. package/dist/types/components/modal/modal.d.ts +2 -6
  166. package/dist/types/components/modal/modal.style.d.ts +2 -2
  167. package/dist/types/components/native-accordion/native-accordion.d.ts +2 -2
  168. package/dist/types/components/native-accordion/use-native-accordion.d.ts +2 -2
  169. package/dist/types/components/native-popover/native-popover.d.ts +4 -4
  170. package/dist/types/components/native-select/native-select.d.ts +2 -4
  171. package/dist/types/components/native-select/use-native-select.d.ts +0 -1
  172. package/dist/types/components/native-table/native-table.d.ts +4 -4
  173. package/dist/types/components/notice/notice.style.d.ts +1 -1
  174. package/dist/types/components/notice/use-notice.d.ts +0 -3
  175. package/dist/types/components/number-input/number-input.d.ts +2 -3
  176. package/dist/types/components/number-input/number-input.style.d.ts +1 -1
  177. package/dist/types/components/number-input/use-number-input.d.ts +0 -1
  178. package/dist/types/components/pagination/pagination.d.ts +2 -3
  179. package/dist/types/components/pagination/use-pagination.d.ts +2 -2
  180. package/dist/types/components/password-input/password-input.d.ts +2 -3
  181. package/dist/types/components/password-input/strength-meter.d.ts +2 -2
  182. package/dist/types/components/password-input/strength-meter.style.d.ts +1 -1
  183. package/dist/types/components/password-input/use-password-input.d.ts +2 -3
  184. package/dist/types/components/picture/picture.d.ts +0 -1
  185. package/dist/types/components/pin-input/pin-input.d.ts +2 -4
  186. package/dist/types/components/pin-input/use-pin-input.d.ts +7 -8
  187. package/dist/types/components/popover/popover.d.ts +4 -5
  188. package/dist/types/components/progress/progress.d.ts +4 -4
  189. package/dist/types/components/progress/use-progress.d.ts +706 -706
  190. package/dist/types/components/qr-code/qr-code.d.ts +2 -2
  191. package/dist/types/components/radio/radio-group.d.ts +0 -2
  192. package/dist/types/components/radio/radio.d.ts +5 -6
  193. package/dist/types/components/radio/radio.style.d.ts +1 -1
  194. package/dist/types/components/radio/use-radio-group.d.ts +2 -3
  195. package/dist/types/components/radio/use-radio.d.ts +0 -1
  196. package/dist/types/components/radio-card/radio-card-group.d.ts +0 -3
  197. package/dist/types/components/radio-card/radio-card.d.ts +5 -7
  198. package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
  199. package/dist/types/components/rating/use-rating.d.ts +7 -8
  200. package/dist/types/components/reorder/reorder.d.ts +2 -3
  201. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  202. package/dist/types/components/reorder/use-reorder.d.ts +3 -3
  203. package/dist/types/components/resizable/resizable.d.ts +2 -2
  204. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  205. package/dist/types/components/resizable/use-resizable.d.ts +2 -2
  206. package/dist/types/components/ripple/ripple.d.ts +2 -3
  207. package/dist/types/components/ripple/use-ripple.d.ts +2 -2
  208. package/dist/types/components/rotate/rotate.d.ts +2 -3
  209. package/dist/types/components/saturation-slider/saturation-slider.d.ts +2 -2
  210. package/dist/types/components/saturation-slider/use-saturation-slider.d.ts +2 -3
  211. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  212. package/dist/types/components/segmented-control/segmented-control.d.ts +2 -3
  213. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  214. package/dist/types/components/segmented-control/use-segmented-control.d.ts +9 -10
  215. package/dist/types/components/select/select.d.ts +2 -4
  216. package/dist/types/components/select/select.style.d.ts +1 -1
  217. package/dist/types/components/select/use-select.d.ts +4 -6
  218. package/dist/types/components/separator/separator.d.ts +2 -2
  219. package/dist/types/components/sidebar/sidebar.d.ts +2 -7
  220. package/dist/types/components/sidebar/use-sidebar.d.ts +9 -9
  221. package/dist/types/components/simple-grid/simple-grid.d.ts +2 -3
  222. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  223. package/dist/types/components/slide/slide.d.ts +2 -3
  224. package/dist/types/components/slide-fade/slide-fade.d.ts +2 -3
  225. package/dist/types/components/slider/slider.d.ts +2 -2
  226. package/dist/types/components/slider/use-slider.d.ts +2 -3
  227. package/dist/types/components/snacks/snacks.d.ts +0 -2
  228. package/dist/types/components/snacks/use-snacks.d.ts +0 -1
  229. package/dist/types/components/stack/h-stack.d.ts +2 -2
  230. package/dist/types/components/stack/stack.d.ts +2 -2
  231. package/dist/types/components/stack/v-stack.d.ts +2 -2
  232. package/dist/types/components/stack/z-stack.d.ts +2 -2
  233. package/dist/types/components/stat/stat.d.ts +2 -2
  234. package/dist/types/components/status/status.d.ts +2 -2
  235. package/dist/types/components/status/status.style.d.ts +2 -2
  236. package/dist/types/components/steps/steps.d.ts +2 -2
  237. package/dist/types/components/steps/steps.style.d.ts +1 -1
  238. package/dist/types/components/steps/use-steps.d.ts +10 -10
  239. package/dist/types/components/switch/switch.d.ts +2 -2
  240. package/dist/types/components/switch/use-switch.d.ts +0 -1
  241. package/dist/types/components/table/table.d.ts +2 -4
  242. package/dist/types/components/tabs/tabs.d.ts +2 -2
  243. package/dist/types/components/tabs/tabs.style.d.ts +1 -1
  244. package/dist/types/components/tabs/use-tabs.d.ts +16 -16
  245. package/dist/types/components/tag/tag.d.ts +2 -2
  246. package/dist/types/components/tag/tag.style.d.ts +1 -1
  247. package/dist/types/components/text/text.d.ts +2 -2
  248. package/dist/types/components/textarea/textarea.d.ts +2 -4
  249. package/dist/types/components/textarea/use-autosize.d.ts +2 -2
  250. package/dist/types/components/timeline/timeline.d.ts +5 -5
  251. package/dist/types/components/timeline/timeline.style.d.ts +1 -1
  252. package/dist/types/components/tip/tip.d.ts +0 -3
  253. package/dist/types/components/toggle/toggle-group.d.ts +1 -1
  254. package/dist/types/components/toggle/toggle.d.ts +5 -7
  255. package/dist/types/components/toggle/use-toggle-group.d.ts +2 -2
  256. package/dist/types/components/toggle/use-toggle.d.ts +2 -3
  257. package/dist/types/components/tooltip/tooltip.d.ts +4 -5
  258. package/dist/types/components/tree/tree.d.ts +2 -6
  259. package/dist/types/components/tree/tree.style.d.ts +1 -1
  260. package/dist/types/components/tree/use-tree.d.ts +184 -185
  261. package/dist/types/components/visually-hidden/visually-hidden.d.ts +2 -2
  262. package/dist/types/components/wrap/wrap.d.ts +2 -3
  263. package/dist/types/core/components/create-component.d.ts +21 -10
  264. package/dist/types/core/components/index.d.ts +2 -2
  265. package/dist/types/core/components/index.types.d.ts +1 -0
  266. package/dist/types/core/components/use-component-style.d.ts +2 -0
  267. package/dist/types/core/components/utils.d.ts +1 -0
  268. package/dist/types/core/constant.d.ts +1 -0
  269. package/dist/types/core/css/calc.d.ts +1 -0
  270. package/dist/types/core/css/config.d.ts +1 -0
  271. package/dist/types/core/css/css.d.ts +1 -0
  272. package/dist/types/core/css/index.types.d.ts +1 -0
  273. package/dist/types/core/css/styles.d.ts +1 -0
  274. package/dist/types/core/css/token.d.ts +1 -0
  275. package/dist/types/core/css/use-css.d.ts +1 -0
  276. package/dist/types/core/css/utils.d.ts +2 -0
  277. package/dist/types/core/generated-theme-tokens.types.d.ts +1 -0
  278. package/dist/types/core/index.d.ts +4 -2
  279. package/dist/types/core/system/color-mode-provider.d.ts +2 -2
  280. package/dist/types/core/system/config.d.ts +1 -0
  281. package/dist/types/core/system/create-system.d.ts +1 -0
  282. package/dist/types/core/system/factory.d.ts +1 -0
  283. package/dist/types/core/system/index.types.d.ts +1 -0
  284. package/dist/types/core/system/storage-script.d.ts +3 -3
  285. package/dist/types/core/system/styled.d.ts +3 -2
  286. package/dist/types/core/system/system-provider.d.ts +2 -2
  287. package/dist/types/core/system/var.d.ts +2 -0
  288. package/dist/types/hooks/use-async-callback/index.d.ts +0 -1
  289. package/dist/types/hooks/use-breakpoint/use-breakpoint-state.d.ts +2 -2
  290. package/dist/types/hooks/use-clickable/index.d.ts +2 -2
  291. package/dist/types/hooks/use-clipboard/index.d.ts +2 -2
  292. package/dist/types/hooks/use-combobox/index.d.ts +12 -13
  293. package/dist/types/hooks/use-counter/index.d.ts +2 -2
  294. package/dist/types/hooks/use-descendants/index.d.ts +2 -2
  295. package/dist/types/hooks/use-field-sizing/index.d.ts +2 -2
  296. package/dist/types/hooks/use-hover/index.d.ts +2 -2
  297. package/dist/types/index.d.ts +3 -109
  298. package/dist/types/providers/i18n-provider/i18n-provider.d.ts +3 -3
  299. package/dist/types/providers/ui-provider/ui-provider.d.ts +2 -3
  300. package/dist/types/utils/children.d.ts +2 -2
  301. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"avatar-group.js","names":[],"sources":["../../../../src/components/avatar/avatar-group.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { AvatarStyle } from \"./avatar.style\"\nimport type { UseAvatarGroupProps } from \"./use-avatar-group\"\nimport { useMemo } from \"react\"\nimport { styled } from \"../../core\"\nimport {\n Avatar,\n AvatarPropsContext,\n component,\n useRootComponentProps,\n} from \"./avatar\"\nimport { useAvatarGroup } from \"./use-avatar-group\"\n\nexport interface AvatarGroupRootProps\n extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvatarGroupProps {}\n\n/**\n * `Avatar` is a component that displays a profile picture or an icon with initials representing a user.\n *\n * @see https://yamada-ui.com/docs/components/avatar\n */\nexport const AvatarGroupRoot = component<\"div\", AvatarGroupRootProps>(\n (props) => {\n const [, { colorScheme, size, variant, shape, ...rest }] =\n useRootComponentProps(props, \"group\", {\n transferProps: [\"variant\", \"colorScheme\", \"size\", \"shape\"],\n })\n const { children, excess, getRootProps } = useAvatarGroup(rest)\n const context = useMemo(\n () => ({ colorScheme, size, variant, shape }),\n [variant, size, colorScheme, shape],\n )\n\n return (\n <AvatarPropsContext value={context}>\n <styled.div {...getRootProps()}>\n {excess > 0 ? <Avatar fallback={`+${excess}`} /> : null}\n {children}\n </styled.div>\n </AvatarPropsContext>\n )\n },\n \"group\",\n)()\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,MAAa,kBAAkB,WAC5B,UAAU;CACT,MAAM,GAAG,EAAE,aAAa,MAAM,SAAS,OAAO,GAAG,UAC/C,sBAAsB,OAAO,SAAS,EACpC,eAAe;EAAC;EAAW;EAAe;EAAQ;EAAQ,EAC3D,CAAC;CACJ,MAAM,EAAE,UAAU,QAAQ,iBAAiB,eAAe,KAAK;AAM/D,QACE,oBAAC;EAAmB,OANN,eACP;GAAE;GAAa;GAAM;GAAS;GAAO,GAC5C;GAAC;GAAS;GAAM;GAAa;GAAM,CACpC;YAIG,qBAAC,OAAO;GAAI,GAAI,cAAc;cAC3B,SAAS,IAAI,oBAAC,UAAO,UAAU,IAAI,WAAY,GAAG,MAClD;IACU;GACM;GAGzB,QACD,EAAE"}
1
+ {"version":3,"file":"avatar-group.js","names":[],"sources":["../../../../src/components/avatar/avatar-group.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { AvatarStyle } from \"./avatar.style\"\nimport type { UseAvatarGroupProps } from \"./use-avatar-group\"\nimport { useMemo } from \"react\"\nimport { styled } from \"../../core\"\nimport {\n Avatar,\n AvatarPropsContext,\n component,\n useRootComponentProps,\n} from \"./avatar\"\nimport { useAvatarGroup } from \"./use-avatar-group\"\n\nexport interface AvatarGroupRootProps\n extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvatarGroupProps {}\n\n/**\n * `Avatar` is a component that displays a profile picture or an icon with initials representing a user.\n *\n * @see https://yamada-ui.com/docs/components/avatar\n */\nexport const AvatarGroupRoot = component<\"div\", AvatarGroupRootProps>(\n (props) => {\n const [\n ,\n { colorScheme, size, variant, shape, suppressHydrationWarning, ...rest },\n ] = useRootComponentProps(props, \"group\", {\n transferProps: [\"variant\", \"colorScheme\", \"size\", \"shape\"],\n })\n const { children, excess, getRootProps } = useAvatarGroup(rest)\n const context = useMemo(\n () => ({\n colorScheme,\n size,\n variant,\n shape,\n suppressHydrationWarning,\n }),\n [variant, size, colorScheme, shape, suppressHydrationWarning],\n )\n\n return (\n <AvatarPropsContext value={context}>\n <styled.div\n suppressHydrationWarning={suppressHydrationWarning}\n {...getRootProps()}\n >\n {excess > 0 ? <Avatar fallback={`+${excess}`} /> : null}\n {children}\n </styled.div>\n </AvatarPropsContext>\n )\n },\n \"group\",\n)()\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,MAAa,kBAAkB,WAC5B,UAAU;CACT,MAAM,GAEJ,EAAE,aAAa,MAAM,SAAS,OAAO,0BAA0B,GAAG,UAChE,sBAAsB,OAAO,SAAS,EACxC,eAAe;EAAC;EAAW;EAAe;EAAQ;EAAQ,EAC3D,CAAC;CACF,MAAM,EAAE,UAAU,QAAQ,iBAAiB,eAAe,KAAK;AAY/D,QACE,oBAAC;EAAmB,OAZN,eACP;GACL;GACA;GACA;GACA;GACA;GACD,GACD;GAAC;GAAS;GAAM;GAAa;GAAO;GAAyB,CAC9D;YAIG,qBAAC,OAAO;GACoB;GAC1B,GAAI,cAAc;cAEjB,SAAS,IAAI,oBAAC,UAAO,UAAU,IAAI,WAAY,GAAG,MAClD;IACU;GACM;GAGzB,QACD,EAAE"}
@@ -14,7 +14,7 @@ import { jsx } from "react/jsx-runtime";
14
14
  * @see https://yamada-ui.com/docs/components/checkbox
15
15
  */
16
16
  const CheckboxGroupRoot = component((props) => {
17
- const [, { colorScheme, size, variant, checkedIcon, children, disabled, errorBorderColor, focusBorderColor, invalid, items = [], readOnly, shape, ...rest }] = useRootComponentProps(props, "group", { transferProps: [
17
+ const [, { colorScheme, size, variant, checkedIcon, children, disabled, errorBorderColor, focusBorderColor, invalid, items = [], readOnly, shape, suppressHydrationWarning, ...rest }] = useRootComponentProps(props, "group", { transferProps: [
18
18
  "variant",
19
19
  "colorScheme",
20
20
  "size",
@@ -40,7 +40,8 @@ const CheckboxGroupRoot = component((props) => {
40
40
  focusBorderColor,
41
41
  invalid,
42
42
  readOnly,
43
- shape
43
+ shape,
44
+ suppressHydrationWarning
44
45
  }), [
45
46
  variant,
46
47
  size,
@@ -51,7 +52,8 @@ const CheckboxGroupRoot = component((props) => {
51
52
  readOnly,
52
53
  errorBorderColor,
53
54
  focusBorderColor,
54
- checkedIcon
55
+ checkedIcon,
56
+ suppressHydrationWarning
55
57
  ]),
56
58
  children: /* @__PURE__ */ jsx(CheckboxGroupContext, {
57
59
  value: useMemo(() => ({
@@ -69,7 +71,7 @@ const CheckboxGroupRoot = component((props) => {
69
71
  ]),
70
72
  children: /* @__PURE__ */ jsx(Group, {
71
73
  orientation: "vertical",
72
- ...getRootProps(),
74
+ ...getRootProps({ suppressHydrationWarning }),
73
75
  children: computedChildren
74
76
  })
75
77
  })
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-group.js","names":["rest","value"],"sources":["../../../../src/components/checkbox/checkbox-group.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { GroupProps } from \"../group\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { CheckboxProps } from \"./checkbox\"\nimport type { CheckboxStyle } from \"./checkbox.style\"\nimport type { UseCheckboxGroupProps } from \"./use-checkbox-group\"\nimport { useMemo } from \"react\"\nimport { Group } from \"../group\"\nimport {\n Checkbox,\n CheckboxPropsContext,\n component,\n useRootComponentProps,\n} from \"./checkbox\"\nimport { CheckboxGroupContext, useCheckboxGroup } from \"./use-checkbox-group\"\n\nexport interface CheckboxGroupItem<\n Y extends string = string,\n> extends CheckboxProps<Y> {\n label: ReactNode\n}\n\nexport interface CheckboxGroupRootProps<Y extends string = string>\n extends\n Omit<\n WithoutThemeProps<GroupProps, CheckboxStyle>,\n \"defaultValue\" | \"onChange\" | \"value\"\n >,\n ThemeProps<CheckboxStyle>,\n UseCheckboxGroupProps<Y>,\n UseInputBorderProps,\n Pick<CheckboxProps, \"checkedIcon\"> {\n /**\n * If provided, generate options based on items.\n *\n * @default []\n */\n items?: CheckboxGroupItem<Y>[]\n}\n\n/**\n * `CheckboxGroup` is a component that groups `Checkbox` components.\n *\n * @see https://yamada-ui.com/docs/components/checkbox\n */\nexport const CheckboxGroupRoot = component<\"div\", CheckboxGroupRootProps>(\n (props) => {\n const [\n ,\n {\n colorScheme,\n size,\n variant,\n checkedIcon,\n children,\n disabled,\n errorBorderColor,\n focusBorderColor,\n invalid,\n items = [],\n readOnly,\n shape,\n ...rest\n },\n ] = useRootComponentProps(props, \"group\", {\n transferProps: [\"variant\", \"colorScheme\", \"size\", \"shape\"],\n })\n const { max, value, getInputProps, getLabelProps, getRootProps, onChange } =\n useCheckboxGroup(rest)\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items.map(({ label, value, ...rest }, index) => (\n <Checkbox key={value ?? index} value={value} {...rest}>\n {label}\n </Checkbox>\n ))\n }, [items, children])\n const context = useMemo(\n () => ({\n colorScheme,\n size,\n variant,\n checkedIcon,\n disabled,\n errorBorderColor,\n focusBorderColor,\n invalid,\n readOnly,\n shape,\n }),\n [\n variant,\n size,\n colorScheme,\n shape,\n disabled,\n invalid,\n readOnly,\n errorBorderColor,\n focusBorderColor,\n checkedIcon,\n ],\n )\n const groupContext = useMemo(\n () => ({ max, value, getInputProps, getLabelProps, onChange }),\n [max, value, getInputProps, getLabelProps, onChange],\n )\n\n return (\n <CheckboxPropsContext value={context}>\n <CheckboxGroupContext value={groupContext}>\n <Group orientation=\"vertical\" {...getRootProps()}>\n {computedChildren}\n </Group>\n </CheckboxGroupContext>\n </CheckboxPropsContext>\n )\n },\n \"group\",\n)() as GenericsComponent<{\n <Y extends string = string>(props: CheckboxGroupRootProps<Y>): ReactElement\n}>\n\nexport { Checkbox as CheckboxGroupItem }\n"],"mappings":";;;;;;;;;;;;;;;AAoDA,MAAa,oBAAoB,WAC9B,UAAU;CACT,MAAM,GAEJ,EACE,aACA,MACA,SACA,aACA,UACA,UACA,kBACA,kBACA,SACA,QAAQ,EAAE,EACV,UACA,OACA,GAAG,UAEH,sBAAsB,OAAO,SAAS,EACxC,eAAe;EAAC;EAAW;EAAe;EAAQ;EAAQ,EAC3D,CAAC;CACF,MAAM,EAAE,KAAK,OAAO,eAAe,eAAe,cAAc,aAC9D,iBAAiB,KAAK;CACxB,MAAM,mBAAmB,cAAc;AACrC,MAAI,SAAU,QAAO;AAErB,SAAO,MAAM,KAAK,EAAE,OAAO,gBAAO,GAAGA,UAAQ,UAC3C,oBAAC;GAA8B,OAAOC;GAAO,GAAID;aAC9C;KADYC,WAAS,MAEb,CACX;IACD,CAAC,OAAO,SAAS,CAAC;AAgCrB,QACE,oBAAC;EAAqB,OAhCR,eACP;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;YAQG,oBAAC;GAAqB,OAPL,eACZ;IAAE;IAAK;IAAO;IAAe;IAAe;IAAU,GAC7D;IAAC;IAAK;IAAO;IAAe;IAAe;IAAS,CACrD;aAKK,oBAAC;IAAM,aAAY;IAAW,GAAI,cAAc;cAC7C;KACK;IACa;GACF;GAG3B,QACD,EAAE"}
1
+ {"version":3,"file":"checkbox-group.js","names":["rest","value"],"sources":["../../../../src/components/checkbox/checkbox-group.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { GroupProps } from \"../group\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { CheckboxProps } from \"./checkbox\"\nimport type { CheckboxStyle } from \"./checkbox.style\"\nimport type { UseCheckboxGroupProps } from \"./use-checkbox-group\"\nimport { useMemo } from \"react\"\nimport { Group } from \"../group\"\nimport {\n Checkbox,\n CheckboxPropsContext,\n component,\n useRootComponentProps,\n} from \"./checkbox\"\nimport { CheckboxGroupContext, useCheckboxGroup } from \"./use-checkbox-group\"\n\nexport interface CheckboxGroupItem<\n Y extends string = string,\n> extends CheckboxProps<Y> {\n label: ReactNode\n}\n\nexport interface CheckboxGroupRootProps<Y extends string = string>\n extends\n Omit<\n WithoutThemeProps<GroupProps, CheckboxStyle>,\n \"defaultValue\" | \"onChange\" | \"value\"\n >,\n ThemeProps<CheckboxStyle>,\n UseCheckboxGroupProps<Y>,\n UseInputBorderProps,\n Pick<CheckboxProps, \"checkedIcon\"> {\n /**\n * If provided, generate options based on items.\n *\n * @default []\n */\n items?: CheckboxGroupItem<Y>[]\n}\n\n/**\n * `CheckboxGroup` is a component that groups `Checkbox` components.\n *\n * @see https://yamada-ui.com/docs/components/checkbox\n */\nexport const CheckboxGroupRoot = component<\"div\", CheckboxGroupRootProps>(\n (props) => {\n const [\n ,\n {\n colorScheme,\n size,\n variant,\n checkedIcon,\n children,\n disabled,\n errorBorderColor,\n focusBorderColor,\n invalid,\n items = [],\n readOnly,\n shape,\n suppressHydrationWarning,\n ...rest\n },\n ] = useRootComponentProps(props, \"group\", {\n transferProps: [\"variant\", \"colorScheme\", \"size\", \"shape\"],\n })\n const { max, value, getInputProps, getLabelProps, getRootProps, onChange } =\n useCheckboxGroup(rest)\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items.map(({ label, value, ...rest }, index) => (\n <Checkbox key={value ?? index} value={value} {...rest}>\n {label}\n </Checkbox>\n ))\n }, [items, children])\n const context = useMemo(\n () => ({\n colorScheme,\n size,\n variant,\n checkedIcon,\n disabled,\n errorBorderColor,\n focusBorderColor,\n invalid,\n readOnly,\n shape,\n suppressHydrationWarning,\n }),\n [\n variant,\n size,\n colorScheme,\n shape,\n disabled,\n invalid,\n readOnly,\n errorBorderColor,\n focusBorderColor,\n checkedIcon,\n suppressHydrationWarning,\n ],\n )\n const groupContext = useMemo(\n () => ({ max, value, getInputProps, getLabelProps, onChange }),\n [max, value, getInputProps, getLabelProps, onChange],\n )\n\n return (\n <CheckboxPropsContext value={context}>\n <CheckboxGroupContext value={groupContext}>\n <Group\n orientation=\"vertical\"\n {...getRootProps({ suppressHydrationWarning })}\n >\n {computedChildren}\n </Group>\n </CheckboxGroupContext>\n </CheckboxPropsContext>\n )\n },\n \"group\",\n)() as GenericsComponent<{\n <Y extends string = string>(props: CheckboxGroupRootProps<Y>): ReactElement\n}>\n\nexport { Checkbox as CheckboxGroupItem }\n"],"mappings":";;;;;;;;;;;;;;;AAoDA,MAAa,oBAAoB,WAC9B,UAAU;CACT,MAAM,GAEJ,EACE,aACA,MACA,SACA,aACA,UACA,UACA,kBACA,kBACA,SACA,QAAQ,EAAE,EACV,UACA,OACA,0BACA,GAAG,UAEH,sBAAsB,OAAO,SAAS,EACxC,eAAe;EAAC;EAAW;EAAe;EAAQ;EAAQ,EAC3D,CAAC;CACF,MAAM,EAAE,KAAK,OAAO,eAAe,eAAe,cAAc,aAC9D,iBAAiB,KAAK;CACxB,MAAM,mBAAmB,cAAc;AACrC,MAAI,SAAU,QAAO;AAErB,SAAO,MAAM,KAAK,EAAE,OAAO,gBAAO,GAAGA,UAAQ,UAC3C,oBAAC;GAA8B,OAAOC;GAAO,GAAID;aAC9C;KADYC,WAAS,MAEb,CACX;IACD,CAAC,OAAO,SAAS,CAAC;AAkCrB,QACE,oBAAC;EAAqB,OAlCR,eACP;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;YAQG,oBAAC;GAAqB,OAPL,eACZ;IAAE;IAAK;IAAO;IAAe;IAAe;IAAU,GAC7D;IAAC;IAAK;IAAO;IAAe;IAAe;IAAS,CACrD;aAKK,oBAAC;IACC,aAAY;IACZ,GAAI,aAAa,EAAE,0BAA0B,CAAC;cAE7C;KACK;IACa;GACF;GAG3B,QACD,EAAE"}
@@ -15,7 +15,7 @@ import { jsx } from "react/jsx-runtime";
15
15
  * @see https://yamada-ui.com/docs/components/checkbox-card
16
16
  */
17
17
  const CheckboxCardGroupRoot = component((props) => {
18
- const [, { colorScheme, size, variant, checkedIcon, children, disabled, errorBorderColor, focusBorderColor, invalid, items = [], justify, readOnly, shape, withIndicator, ...rest }] = useRootComponentProps(props, "group", { transferProps: [
18
+ const [, { colorScheme, size, variant, checkedIcon, children, disabled, errorBorderColor, focusBorderColor, invalid, items = [], justify, readOnly, shape, suppressHydrationWarning, withIndicator, ...rest }] = useRootComponentProps(props, "group", { transferProps: [
19
19
  "variant",
20
20
  "colorScheme",
21
21
  "size",
@@ -44,6 +44,7 @@ const CheckboxCardGroupRoot = component((props) => {
44
44
  justify,
45
45
  readOnly,
46
46
  shape,
47
+ suppressHydrationWarning,
47
48
  withIndicator
48
49
  }), [
49
50
  colorScheme,
@@ -57,7 +58,8 @@ const CheckboxCardGroupRoot = component((props) => {
57
58
  focusBorderColor,
58
59
  invalid,
59
60
  readOnly,
60
- shape
61
+ shape,
62
+ suppressHydrationWarning
61
63
  ]),
62
64
  children: /* @__PURE__ */ jsx(CheckboxGroupContext, {
63
65
  value: useMemo(() => ({
@@ -74,7 +76,7 @@ const CheckboxCardGroupRoot = component((props) => {
74
76
  onChange
75
77
  ]),
76
78
  children: /* @__PURE__ */ jsx(Group, {
77
- ...getRootProps(),
79
+ ...getRootProps({ suppressHydrationWarning }),
78
80
  children: computedChildren
79
81
  })
80
82
  })
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-card-group.js","names":["rest","value"],"sources":["../../../../src/components/checkbox-card/checkbox-card-group.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement } from \"react\"\nimport type {\n GenericsComponent,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { UseCheckboxGroupProps } from \"../checkbox\"\nimport type { GroupProps } from \"../group\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { CheckboxCardRootProps } from \"./checkbox-card\"\nimport type { CheckboxCardStyle } from \"./checkbox-card.style\"\nimport { useMemo } from \"react\"\nimport { CheckboxGroupContext, useCheckboxGroup } from \"../checkbox\"\nimport { Group } from \"../group\"\nimport {\n CheckboxCardPropsContext,\n CheckboxCardRoot,\n component,\n useRootComponentProps,\n} from \"./checkbox-card\"\n\nexport interface CheckboxCardGroupItem<\n Y extends string = string,\n> extends CheckboxCardRootProps<Y> {}\n\nexport interface CheckboxCardGroupRootProps<Y extends string = string>\n extends\n Omit<\n WithoutThemeProps<GroupProps, CheckboxCardStyle>,\n \"defaultValue\" | \"onChange\" | \"value\"\n >,\n ThemeProps<CheckboxCardStyle>,\n UseCheckboxGroupProps<Y>,\n UseInputBorderProps,\n Pick<CheckboxCardRootProps, \"checkedIcon\" | \"withIndicator\"> {\n /**\n * If provided, generate options based on items.\n *\n * @default []\n */\n items?: CheckboxCardGroupItem<Y>[]\n}\n\n/**\n * `CheckboxCardGroup` is a component that groups `CheckboxCard` components.\n *\n * @see https://yamada-ui.com/docs/components/checkbox-card\n */\nexport const CheckboxCardGroupRoot = component<\n \"div\",\n CheckboxCardGroupRootProps\n>((props) => {\n const [\n ,\n {\n colorScheme,\n size,\n variant,\n checkedIcon,\n children,\n disabled,\n errorBorderColor,\n focusBorderColor,\n invalid,\n items = [],\n justify,\n readOnly,\n shape,\n withIndicator,\n ...rest\n },\n ] = useRootComponentProps(props, \"group\", {\n transferProps: [\n \"variant\",\n \"colorScheme\",\n \"size\",\n \"shape\",\n \"justify\",\n \"withIndicator\",\n ],\n })\n const { max, value, getInputProps, getLabelProps, getRootProps, onChange } =\n useCheckboxGroup(rest)\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items.map(({ value, ...rest }, index) => (\n <CheckboxCardRoot key={value ?? index} value={value} {...rest} />\n ))\n }, [items, children])\n const context = useMemo(\n () => ({\n colorScheme,\n size,\n variant,\n checkedIcon,\n disabled,\n errorBorderColor,\n focusBorderColor,\n invalid,\n justify,\n readOnly,\n shape,\n withIndicator,\n }),\n [\n colorScheme,\n size,\n checkedIcon,\n variant,\n disabled,\n justify,\n withIndicator,\n errorBorderColor,\n focusBorderColor,\n invalid,\n readOnly,\n shape,\n ],\n )\n const groupContext = useMemo(\n () => ({ max, value, getInputProps, getLabelProps, onChange }),\n [max, value, getInputProps, getLabelProps, onChange],\n )\n\n return (\n <CheckboxCardPropsContext value={context}>\n <CheckboxGroupContext value={groupContext}>\n <Group {...getRootProps()}>{computedChildren}</Group>\n </CheckboxGroupContext>\n </CheckboxCardPropsContext>\n )\n}, \"group\")() as GenericsComponent<{\n <Y extends string = string>(\n props: CheckboxCardGroupRootProps<Y>,\n ): ReactElement\n}>\n\nexport { CheckboxCardRoot as CheckboxCardGroupItem }\n"],"mappings":";;;;;;;;;;;;;;;;AAkDA,MAAa,wBAAwB,WAGlC,UAAU;CACX,MAAM,GAEJ,EACE,aACA,MACA,SACA,aACA,UACA,UACA,kBACA,kBACA,SACA,QAAQ,EAAE,EACV,SACA,UACA,OACA,eACA,GAAG,UAEH,sBAAsB,OAAO,SAAS,EACxC,eAAe;EACb;EACA;EACA;EACA;EACA;EACA;EACD,EACF,CAAC;CACF,MAAM,EAAE,KAAK,OAAO,eAAe,eAAe,cAAc,aAC9D,iBAAiB,KAAK;CACxB,MAAM,mBAAmB,cAAc;AACrC,MAAI,SAAU,QAAO;AAErB,SAAO,MAAM,KAAK,EAAE,gBAAO,GAAGA,UAAQ,UACpC,oBAAC;GAAsC,OAAOC;GAAO,GAAID;KAAlCC,WAAS,MAAiC,CACjE;IACD,CAAC,OAAO,SAAS,CAAC;AAoCrB,QACE,oBAAC;EAAyB,OApCZ,eACP;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;YAQG,oBAAC;GAAqB,OAPL,eACZ;IAAE;IAAK;IAAO;IAAe;IAAe;IAAU,GAC7D;IAAC;IAAK;IAAO;IAAe;IAAe;IAAS,CACrD;aAKK,oBAAC;IAAM,GAAI,cAAc;cAAG;KAAyB;IAChC;GACE;GAE5B,QAAQ,EAAE"}
1
+ {"version":3,"file":"checkbox-card-group.js","names":["rest","value"],"sources":["../../../../src/components/checkbox-card/checkbox-card-group.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement } from \"react\"\nimport type {\n GenericsComponent,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { UseCheckboxGroupProps } from \"../checkbox\"\nimport type { GroupProps } from \"../group\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { CheckboxCardRootProps } from \"./checkbox-card\"\nimport type { CheckboxCardStyle } from \"./checkbox-card.style\"\nimport { useMemo } from \"react\"\nimport { CheckboxGroupContext, useCheckboxGroup } from \"../checkbox\"\nimport { Group } from \"../group\"\nimport {\n CheckboxCardPropsContext,\n CheckboxCardRoot,\n component,\n useRootComponentProps,\n} from \"./checkbox-card\"\n\nexport interface CheckboxCardGroupItem<\n Y extends string = string,\n> extends CheckboxCardRootProps<Y> {}\n\nexport interface CheckboxCardGroupRootProps<Y extends string = string>\n extends\n Omit<\n WithoutThemeProps<GroupProps, CheckboxCardStyle>,\n \"defaultValue\" | \"onChange\" | \"value\"\n >,\n ThemeProps<CheckboxCardStyle>,\n UseCheckboxGroupProps<Y>,\n UseInputBorderProps,\n Pick<CheckboxCardRootProps, \"checkedIcon\" | \"withIndicator\"> {\n /**\n * If provided, generate options based on items.\n *\n * @default []\n */\n items?: CheckboxCardGroupItem<Y>[]\n}\n\n/**\n * `CheckboxCardGroup` is a component that groups `CheckboxCard` components.\n *\n * @see https://yamada-ui.com/docs/components/checkbox-card\n */\nexport const CheckboxCardGroupRoot = component<\n \"div\",\n CheckboxCardGroupRootProps\n>((props) => {\n const [\n ,\n {\n colorScheme,\n size,\n variant,\n checkedIcon,\n children,\n disabled,\n errorBorderColor,\n focusBorderColor,\n invalid,\n items = [],\n justify,\n readOnly,\n shape,\n suppressHydrationWarning,\n withIndicator,\n ...rest\n },\n ] = useRootComponentProps(props, \"group\", {\n transferProps: [\n \"variant\",\n \"colorScheme\",\n \"size\",\n \"shape\",\n \"justify\",\n \"withIndicator\",\n ],\n })\n const { max, value, getInputProps, getLabelProps, getRootProps, onChange } =\n useCheckboxGroup(rest)\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items.map(({ value, ...rest }, index) => (\n <CheckboxCardRoot key={value ?? index} value={value} {...rest} />\n ))\n }, [items, children])\n const context = useMemo(\n () => ({\n colorScheme,\n size,\n variant,\n checkedIcon,\n disabled,\n errorBorderColor,\n focusBorderColor,\n invalid,\n justify,\n readOnly,\n shape,\n suppressHydrationWarning,\n withIndicator,\n }),\n [\n colorScheme,\n size,\n checkedIcon,\n variant,\n disabled,\n justify,\n withIndicator,\n errorBorderColor,\n focusBorderColor,\n invalid,\n readOnly,\n shape,\n suppressHydrationWarning,\n ],\n )\n const groupContext = useMemo(\n () => ({ max, value, getInputProps, getLabelProps, onChange }),\n [max, value, getInputProps, getLabelProps, onChange],\n )\n\n return (\n <CheckboxCardPropsContext value={context}>\n <CheckboxGroupContext value={groupContext}>\n <Group {...getRootProps({ suppressHydrationWarning })}>\n {computedChildren}\n </Group>\n </CheckboxGroupContext>\n </CheckboxCardPropsContext>\n )\n}, \"group\")() as GenericsComponent<{\n <Y extends string = string>(\n props: CheckboxCardGroupRootProps<Y>,\n ): ReactElement\n}>\n\nexport { CheckboxCardRoot as CheckboxCardGroupItem }\n"],"mappings":";;;;;;;;;;;;;;;;AAkDA,MAAa,wBAAwB,WAGlC,UAAU;CACX,MAAM,GAEJ,EACE,aACA,MACA,SACA,aACA,UACA,UACA,kBACA,kBACA,SACA,QAAQ,EAAE,EACV,SACA,UACA,OACA,0BACA,eACA,GAAG,UAEH,sBAAsB,OAAO,SAAS,EACxC,eAAe;EACb;EACA;EACA;EACA;EACA;EACA;EACD,EACF,CAAC;CACF,MAAM,EAAE,KAAK,OAAO,eAAe,eAAe,cAAc,aAC9D,iBAAiB,KAAK;CACxB,MAAM,mBAAmB,cAAc;AACrC,MAAI,SAAU,QAAO;AAErB,SAAO,MAAM,KAAK,EAAE,gBAAO,GAAGA,UAAQ,UACpC,oBAAC;GAAsC,OAAOC;GAAO,GAAID;KAAlCC,WAAS,MAAiC,CACjE;IACD,CAAC,OAAO,SAAS,CAAC;AAsCrB,QACE,oBAAC;EAAyB,OAtCZ,eACP;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;YAQG,oBAAC;GAAqB,OAPL,eACZ;IAAE;IAAK;IAAO;IAAe;IAAe;IAAU,GAC7D;IAAC;IAAK;IAAO;IAAe;IAAe;IAAS,CACrD;aAKK,oBAAC;IAAM,GAAI,aAAa,EAAE,0BAA0B,CAAC;cAClD;KACK;IACa;GACE;GAE5B,QAAQ,EAAE"}
@@ -17,7 +17,7 @@ import { Fragment, useMemo, useState } from "react";
17
17
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
18
18
 
19
19
  //#region src/components/menu/menu.tsx
20
- const { ComponentContext, PropsContext: MenuPropsContext, StyleContext, useComponentContext, usePropsContext: useMenuPropsContext, withContext, useRootComponentProps } = createSlotComponent("menu", menuStyle);
20
+ const { ComponentContext, HydrationContext, PropsContext: MenuPropsContext, StyleContext, useComponentContext, usePropsContext: useMenuPropsContext, withContext, useRootComponentProps } = createSlotComponent("menu", menuStyle);
21
21
  /**
22
22
  * `Menu` is a component that displays a common dropdown menu.
23
23
  *
@@ -25,7 +25,7 @@ const { ComponentContext, PropsContext: MenuPropsContext, StyleContext, useCompo
25
25
  */
26
26
  const MenuRoot = (props) => {
27
27
  const [styleContext, mergedProps] = useRootComponentProps(props);
28
- const [{ animationScheme, initialFocusRef, offset, placement, ...popoverProps }, { children, disabled, ...rest }] = usePopoverProps(mergedProps, [
28
+ const [{ animationScheme, initialFocusRef, offset, placement, ...popoverProps }, { children, disabled, suppressHydrationWarning, ...rest }] = usePopoverProps(mergedProps, [
29
29
  "disabled",
30
30
  "open",
31
31
  "defaultOpen",
@@ -64,55 +64,58 @@ const MenuRoot = (props) => {
64
64
  ]);
65
65
  return /* @__PURE__ */ jsx(StyleContext, {
66
66
  value: styleContext,
67
- children: /* @__PURE__ */ jsx(MenuDescendantsContext, {
68
- value: descendants,
69
- children: /* @__PURE__ */ jsx(MenuContext, {
70
- value: useMemo(() => ({
71
- subMenu,
72
- subMenuDirection,
73
- onActiveDescendant,
74
- onClose,
75
- onCloseSubMenu,
76
- onOpen,
77
- onSelect
78
- }), [
79
- onClose,
80
- onOpen,
81
- onSelect,
82
- onActiveDescendant,
83
- subMenu,
84
- subMenuDirection,
85
- onCloseSubMenu
86
- ]),
87
- children: /* @__PURE__ */ jsx(MainMenuContext, {
67
+ children: /* @__PURE__ */ jsx(HydrationContext, {
68
+ value: useMemo(() => suppressHydrationWarning ? { suppressHydrationWarning } : {}, [suppressHydrationWarning]),
69
+ children: /* @__PURE__ */ jsx(MenuDescendantsContext, {
70
+ value: descendants,
71
+ children: /* @__PURE__ */ jsx(MenuContext, {
88
72
  value: useMemo(() => ({
89
- closeOnSelect,
90
- descendants,
73
+ subMenu,
74
+ subMenuDirection,
91
75
  onActiveDescendant,
92
- onCloseRef,
76
+ onClose,
77
+ onCloseSubMenu,
78
+ onOpen,
93
79
  onSelect
94
80
  }), [
95
- closeOnSelect,
96
- descendants,
81
+ onClose,
82
+ onOpen,
83
+ onSelect,
97
84
  onActiveDescendant,
98
- onCloseRef,
99
- onSelect
85
+ subMenu,
86
+ subMenuDirection,
87
+ onCloseSubMenu
100
88
  ]),
101
- children: /* @__PURE__ */ jsx(ComponentContext, {
89
+ children: /* @__PURE__ */ jsx(MainMenuContext, {
102
90
  value: useMemo(() => ({
103
- getContentProps,
104
- getContextTriggerProps,
105
- getSeparatorProps,
106
- getTriggerProps
91
+ closeOnSelect,
92
+ descendants,
93
+ onActiveDescendant,
94
+ onCloseRef,
95
+ onSelect
107
96
  }), [
108
- getContentProps,
109
- getContextTriggerProps,
110
- getSeparatorProps,
111
- getTriggerProps
97
+ closeOnSelect,
98
+ descendants,
99
+ onActiveDescendant,
100
+ onCloseRef,
101
+ onSelect
112
102
  ]),
113
- children: /* @__PURE__ */ jsx(PopoverRoot, {
114
- ...mergedPopoverProps,
115
- children
103
+ children: /* @__PURE__ */ jsx(ComponentContext, {
104
+ value: useMemo(() => ({
105
+ getContentProps,
106
+ getContextTriggerProps,
107
+ getSeparatorProps,
108
+ getTriggerProps
109
+ }), [
110
+ getContentProps,
111
+ getContextTriggerProps,
112
+ getSeparatorProps,
113
+ getTriggerProps
114
+ ]),
115
+ children: /* @__PURE__ */ jsx(PopoverRoot, {
116
+ ...mergedPopoverProps,
117
+ children
118
+ })
116
119
  })
117
120
  })
118
121
  })
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","names":["MenuRoot: FC<MenuRootProps>","Popover.Root","Popover.Trigger","Popover.Anchor","Popover.Content","rest","items","index"],"sources":["../../../../src/components/menu/menu.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { MenuStyle } from \"./menu.style\"\nimport type {\n MenuOptionGroupType,\n MenuOptionGroupValue,\n UseMenuGroupProps,\n UseMenuItemProps,\n UseMenuOptionGroupProps,\n UseMenuOptionItemProps,\n UseMenuProps,\n UseMenuReturn,\n} from \"./use-menu\"\nimport { Fragment, useMemo, useState } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { cast, handlerAll } from \"../../utils\"\nimport { CheckIcon, ChevronRightIcon, CircleSmallIcon } from \"../icon\"\nimport { Popover, usePopoverProps } from \"../popover\"\nimport { menuStyle } from \"./menu.style\"\nimport {\n MainMenuContext,\n MenuContext,\n MenuDescendantsContext,\n MenuGroupContext,\n MenuOptionGroupContext,\n useMenu,\n useMenuContext,\n useMenuGroup,\n useMenuGroupContext,\n useMenuItem,\n useMenuOptionGroup,\n useMenuOptionItem,\n} from \"./use-menu\"\n\ninterface MenuSharedItem {\n label?: ReactNode\n}\n\ninterface MenuItemWithValue extends MenuSharedItem, MenuItemProps {}\n\ninterface MenuOptionItem extends MenuSharedItem, MenuOptionItemProps {}\n\ninterface MenuItemWithSeparator extends MenuSeparatorProps {\n type: \"separator\"\n}\n\ninterface MenuItemWithRadioGroup<Y extends string = string>\n extends\n Omit<MenuItemWithItems, \"defaultValue\" | \"items\" | \"onChange\">,\n MenuOptionGroupProps<\"radio\", Y> {\n type: \"radio\"\n items?: MenuOptionItem[]\n}\n\ninterface MenuItemWithCheckboxGroup<Y extends string[] = string[]>\n extends\n Omit<MenuItemWithItems, \"defaultValue\" | \"items\" | \"onChange\">,\n MenuOptionGroupProps<\"checkbox\", Y> {\n type: \"checkbox\"\n items?: MenuOptionItem[]\n}\n\ninterface MenuItemWithItems extends MenuSharedItem, MenuGroupProps {\n hasEndSeparator?: boolean\n hasSeparator?: boolean\n hasStartSeparator?: boolean\n items?: MenuItemWithValue[]\n labelProps?: MenuLabelProps\n}\n\nexport type MenuItem =\n | MenuItemWithCheckboxGroup\n | MenuItemWithItems\n | MenuItemWithRadioGroup\n | MenuItemWithSeparator\n | MenuItemWithValue\n\ninterface ComponentContext extends Pick<\n UseMenuReturn,\n | \"getContentProps\"\n | \"getContextTriggerProps\"\n | \"getSeparatorProps\"\n | \"getTriggerProps\"\n> {}\n\nexport interface MenuRootProps\n extends\n UseMenuProps,\n Omit<\n WithoutThemeProps<Popover.RootProps, MenuStyle>,\n \"autoFocus\" | \"modal\" | \"updateRef\" | \"withCloseButton\"\n >,\n ThemeProps<MenuStyle> {\n /**\n * The placement of the popper relative to its reference.\n *\n * @default 'end-start'\n */\n placement?: Popover.RootProps[\"placement\"]\n}\n\nconst {\n ComponentContext,\n PropsContext: MenuPropsContext,\n StyleContext,\n useComponentContext,\n usePropsContext: useMenuPropsContext,\n withContext,\n useRootComponentProps,\n} = createSlotComponent<MenuRootProps, MenuStyle, ComponentContext>(\n \"menu\",\n menuStyle,\n)\n\nexport { MenuPropsContext, useMenuPropsContext }\n\n/**\n * `Menu` is a component that displays a common dropdown menu.\n *\n * @see https://yamada-ui.com/docs/components/menu\n */\nexport const MenuRoot: FC<MenuRootProps> = (props) => {\n const [styleContext, mergedProps] = useRootComponentProps(props)\n const [\n { animationScheme, initialFocusRef, offset, placement, ...popoverProps },\n { children, disabled, ...rest },\n ] = usePopoverProps(mergedProps, [\n \"disabled\",\n \"open\",\n \"defaultOpen\",\n \"onOpen\",\n \"onClose\",\n ])\n const {\n closeOnSelect,\n descendants,\n open,\n subMenu,\n subMenuDirection,\n updateRef,\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n onActiveDescendant,\n onClose,\n onCloseRef,\n onCloseSubMenu,\n onOpen,\n onSelect,\n } = useMenu({ disabled, ...rest })\n const mergedPopoverProps = useMemo<Popover.RootProps>(\n () => ({\n ...popoverProps,\n animationScheme:\n animationScheme ?? (subMenu ? \"inline-start\" : \"block-start\"),\n autoFocus: !!initialFocusRef,\n disabled,\n initialFocusRef,\n offset: offset ?? (subMenu ? [0, 0] : undefined),\n open,\n placement:\n placement ?? (subMenu ? `center-${subMenuDirection}` : \"end-start\"),\n updateRef,\n onClose,\n onOpen,\n }),\n [\n animationScheme,\n disabled,\n initialFocusRef,\n offset,\n onClose,\n onOpen,\n open,\n placement,\n popoverProps,\n subMenu,\n subMenuDirection,\n updateRef,\n ],\n )\n const menuContext = useMemo(\n () => ({\n subMenu,\n subMenuDirection,\n onActiveDescendant,\n onClose,\n onCloseSubMenu,\n onOpen,\n onSelect,\n }),\n [\n onClose,\n onOpen,\n onSelect,\n onActiveDescendant,\n subMenu,\n subMenuDirection,\n onCloseSubMenu,\n ],\n )\n const mainMenuContext = useMemo(\n () => ({\n closeOnSelect,\n descendants,\n onActiveDescendant,\n onCloseRef,\n onSelect,\n }),\n [closeOnSelect, descendants, onActiveDescendant, onCloseRef, onSelect],\n )\n const componentContext = useMemo(\n () => ({\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n }),\n [\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n ],\n )\n\n return (\n <StyleContext value={styleContext}>\n <MenuDescendantsContext value={descendants}>\n <MenuContext value={menuContext}>\n <MainMenuContext value={mainMenuContext}>\n <ComponentContext value={componentContext}>\n <Popover.Root {...mergedPopoverProps}>{children}</Popover.Root>\n </ComponentContext>\n </MainMenuContext>\n </MenuContext>\n </MenuDescendantsContext>\n </StyleContext>\n )\n}\n\nexport interface MenuTriggerProps extends Popover.TriggerProps {}\n\nexport const MenuTrigger = withContext<\"button\", MenuTriggerProps>(\n Popover.Trigger,\n \"trigger\",\n)(undefined, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return cast<HTMLProps<\"button\">>(getTriggerProps(cast<HTMLProps>(props)))\n})\n\ninterface Rect {\n left: number\n top: number\n}\n\nexport interface MenuContextTriggerProps extends HTMLProps {}\n\nexport const MenuContextTrigger = withContext<\"div\", MenuContextTriggerProps>(\n ({ children, onContextMenu, ...rest }) => {\n const [rect, setRect] = useState<Rect>({\n left: 0,\n top: 0,\n })\n const { getContextTriggerProps } = useComponentContext()\n\n return (\n <>\n <MenuAnchor>\n <styled.div style={{ position: \"fixed\", ...rect }} />\n </MenuAnchor>\n\n <styled.div\n asChild\n {...getContextTriggerProps({\n onContextMenu: handlerAll(onContextMenu, (ev) => {\n setRect({ left: ev.clientX, top: ev.clientY })\n }),\n ...rest,\n })}\n >\n {children}\n </styled.div>\n </>\n )\n },\n \"contextTrigger\",\n)()\n\nexport interface MenuAnchorProps extends Popover.AnchorProps {}\n\nexport const MenuAnchor = withContext<\"div\", MenuAnchorProps>(\n Popover.Anchor,\n \"anchor\",\n)()\n\nexport interface MenuContentProps extends Popover.ContentProps {\n /**\n * The footer of the menu.\n */\n footer?: ReactNode\n /**\n * The header of the menu.\n */\n header?: ReactNode\n /**\n * If provided, generate elements based on items.\n */\n items?: MenuItem[]\n /**\n * Props for the footer component.\n */\n footerProps?: MenuFooterProps\n /**\n * Props for the header component.\n */\n headerProps?: MenuHeaderProps\n}\n\nexport const MenuContent = withContext<\"div\", MenuContentProps>(\n Popover.Content,\n \"content\",\n)(\n undefined,\n ({\n children,\n footer,\n header,\n items = [],\n footerProps,\n headerProps,\n portalProps,\n ...rest\n }) => {\n const { subMenu } = useMenuContext()\n const { getContentProps } = useComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return (\n <>\n {header ? <MenuHeader {...headerProps}>{header}</MenuHeader> : null}\n\n {items.map((props, index) => {\n if (\"type\" in props) {\n if (props.type === \"radio\") {\n const {\n type,\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuOptionGroup type={type} {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuOptionItem key={index} {...rest}>\n {label}\n </MenuOptionItem>\n ))}\n </MenuOptionGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else if (props.type === \"checkbox\") {\n const {\n type,\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuOptionGroup type={type} {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuOptionItem key={index} {...rest}>\n {label}\n </MenuOptionItem>\n ))}\n </MenuOptionGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else {\n return <MenuSeparator key={index} />\n }\n } else if (\"items\" in props) {\n const {\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuGroup {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuItem key={index} {...rest}>\n {label}\n </MenuItem>\n ))}\n </MenuGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else if (\"value\" in props) {\n const { label, ...rest } = props\n\n return (\n <MenuItem key={index} {...rest}>\n {label}\n </MenuItem>\n )\n }\n })}\n\n {footer ? <MenuFooter {...footerProps}>{footer}</MenuFooter> : null}\n </>\n )\n }, [children, footer, footerProps, header, headerProps, items])\n\n return {\n ...getContentProps(\n cast<HTMLProps>({ ...rest, children: computedChildren }),\n ),\n portalProps: subMenu ? { ...portalProps, disabled: true } : portalProps,\n }\n },\n)\n\nexport interface MenuHeaderProps extends HTMLStyledProps {}\n\nexport const MenuHeader = withContext<\"div\", MenuHeaderProps>(\n \"div\",\n \"header\",\n)({ \"data-header\": \"\" })\n\nexport interface MenuFooterProps extends HTMLStyledProps {}\n\nexport const MenuFooter = withContext<\"div\", MenuFooterProps>(\n \"div\",\n \"footer\",\n)({ \"data-footer\": \"\" })\n\nexport interface MenuLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const MenuLabel = withContext<\"span\", MenuLabelProps>(\"span\", \"label\")(\n undefined,\n (props) => {\n const { getLabelProps } = useMenuGroupContext()\n\n return getLabelProps(props)\n },\n)\n\nexport interface MenuGroupProps extends UseMenuGroupProps, HTMLStyledProps {\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the label component.\n */\n labelProps?: MenuLabelProps\n}\n\nexport const MenuGroup = withContext<\"div\", MenuGroupProps>(\n ({ children, label, labelProps, ...rest }) => {\n const { getGroupProps, getLabelProps } = useMenuGroup(rest)\n const context = useMemo(() => ({ getLabelProps }), [getLabelProps])\n\n return (\n <MenuGroupContext value={context}>\n <styled.div {...getGroupProps()}>\n {label ? <MenuLabel {...labelProps}>{label}</MenuLabel> : null}\n {children}\n </styled.div>\n </MenuGroupContext>\n )\n },\n \"group\",\n)()\n\nexport interface MenuOptionGroupProps<\n Y extends MenuOptionGroupType = \"checkbox\",\n M extends MenuOptionGroupValue<Y> = MenuOptionGroupValue<Y>,\n>\n extends\n UseMenuOptionGroupProps<Y, M>,\n Omit<MenuGroupProps, \"defaultValue\" | \"onChange\"> {}\n\nexport const MenuOptionGroup = withContext<\"div\", MenuOptionGroupProps>(\n ({\n type: typeProp,\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n ...rest\n }) => {\n const { type, value, onChange } = useMenuOptionGroup({\n type: typeProp,\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n })\n const context = useMemo(\n () => ({ type, value, onChange }),\n [type, value, onChange],\n )\n\n return (\n <MenuOptionGroupContext value={context}>\n <MenuGroup {...rest} />\n </MenuOptionGroupContext>\n )\n },\n { name: \"OptionGroup\", slot: [\"group\", \"option\"] },\n)() as GenericsComponent<{\n <\n Y extends MenuOptionGroupType = \"checkbox\",\n M extends MenuOptionGroupValue<Y> = MenuOptionGroupValue<Y>,\n >(\n props: MenuOptionGroupProps<Y, M>,\n ): ReactElement\n}>\n\nexport interface MenuItemProps extends HTMLStyledProps, UseMenuItemProps {}\n\nexport const MenuItem = withContext<\"div\", MenuItemProps>(\n ({ children, ...rest }) => {\n const { subMenuTrigger, getItemProps } = useMenuItem(rest)\n\n return (\n <styled.div {...getItemProps()}>\n {children}\n\n {subMenuTrigger ? (\n <MenuIndicator as={ChevronRightIcon} ms=\"auto\" />\n ) : null}\n </styled.div>\n )\n },\n \"item\",\n)()\n\nexport interface MenuOptionItemProps\n extends HTMLStyledProps, UseMenuOptionItemProps {\n /**\n * The icon to be used in the menu option item.\n */\n icon?: ReactNode\n}\n\nexport const MenuOptionItem = withContext<\"div\", MenuOptionItemProps>(\n ({ children, icon, ...rest }) => {\n const { type, getIndicatorProps, getOptionItemProps } =\n useMenuOptionItem(rest)\n\n return (\n <styled.div {...getOptionItemProps()}>\n <MenuIndicator {...getIndicatorProps()}>\n {icon ||\n (type === \"radio\" ? (\n <CircleSmallIcon fill=\"currentColor\" />\n ) : (\n <CheckIcon />\n ))}\n </MenuIndicator>\n {children}\n </styled.div>\n )\n },\n { name: \"OptionItem\", slot: [\"item\", \"option\"] },\n)()\n\nexport interface MenuIndicatorProps extends HTMLStyledProps {}\n\nexport const MenuIndicator = withContext<\"div\", MenuIndicatorProps>(\n \"div\",\n \"indicator\",\n)()\n\nexport interface MenuCommandProps extends HTMLStyledProps<\"kbd\"> {}\n\nexport const MenuCommand = withContext<\"kbd\", MenuCommandProps>(\n \"kbd\",\n \"command\",\n)()\n\nexport interface MenuSeparatorProps extends HTMLStyledProps<\"hr\"> {}\n\nexport const MenuSeparator = withContext<\"hr\", MenuSeparatorProps>(\n \"hr\",\n \"separator\",\n)(undefined, (props) => {\n const { getSeparatorProps } = useComponentContext()\n\n return getSeparatorProps(props)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6GA,MAAM,EACJ,kBACA,cAAc,kBACd,cACA,qBACA,iBAAiB,qBACjB,aACA,0BACE,oBACF,QACA,UACD;;;;;;AASD,MAAaA,YAA+B,UAAU;CACpD,MAAM,CAAC,cAAc,eAAe,sBAAsB,MAAM;CAChE,MAAM,CACJ,EAAE,iBAAiB,iBAAiB,QAAQ,WAAW,GAAG,gBAC1D,EAAE,UAAU,UAAU,GAAG,UACvB,gBAAgB,aAAa;EAC/B;EACA;EACA;EACA;EACA;EACD,CAAC;CACF,MAAM,EACJ,eACA,aACA,MACA,SACA,kBACA,WACA,iBACA,wBACA,mBACA,iBACA,oBACA,SACA,YACA,gBACA,QACA,aACE,QAAQ;EAAE;EAAU,GAAG;EAAM,CAAC;CAClC,MAAM,qBAAqB,eAClB;EACL,GAAG;EACH,iBACE,oBAAoB,UAAU,iBAAiB;EACjD,WAAW,CAAC,CAAC;EACb;EACA;EACA,QAAQ,WAAW,UAAU,CAAC,GAAG,EAAE,GAAG;EACtC;EACA,WACE,cAAc,UAAU,UAAU,qBAAqB;EACzD;EACA;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AA8CD,QACE,oBAAC;EAAa,OAAO;YACnB,oBAAC;GA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AAS,CACxB;YAIG,oBAAC,aAAU,GAAI,OAAQ;GACA;GAG7B;CAAE,MAAM;CAAe,MAAM,CAAC,SAAS,SAAS;CAAE,CACnD,EAAE;AAWH,MAAa,WAAW,aACrB,EAAE,UAAU,GAAG,WAAW;CACzB,MAAM,EAAE,gBAAgB,iBAAiB,YAAY,KAAK;AAE1D,QACE,qBAAC,OAAO;EAAI,GAAI,cAAc;aAC3B,UAEA,iBACC,oBAAC;GAAc,IAAI;GAAkB,IAAG;IAAS,GAC/C;GACO;GAGjB,OACD,EAAE;AAUH,MAAa,iBAAiB,aAC3B,EAAE,UAAU,MAAM,GAAG,WAAW;CAC/B,MAAM,EAAE,MAAM,mBAAmB,uBAC/B,kBAAkB,KAAK;AAEzB,QACE,qBAAC,OAAO;EAAI,GAAI,oBAAoB;aAClC,oBAAC;GAAc,GAAI,mBAAmB;aACnC,SACE,SAAS,UACR,oBAAC,mBAAgB,MAAK,iBAAiB,GAEvC,oBAAC,cAAY;IAEH,EACf;GACU;GAGjB;CAAE,MAAM;CAAc,MAAM,CAAC,QAAQ,SAAS;CAAE,CACjD,EAAE;AAIH,MAAa,gBAAgB,YAC3B,OACA,YACD,EAAE;AAIH,MAAa,cAAc,YACzB,OACA,UACD,EAAE;AAIH,MAAa,gBAAgB,YAC3B,MACA,YACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,sBAAsB,qBAAqB;AAEnD,QAAO,kBAAkB,MAAM;EAC/B"}
1
+ {"version":3,"file":"menu.js","names":["MenuRoot: FC<MenuRootProps>","Popover.Root","Popover.Trigger","Popover.Anchor","Popover.Content","rest","items","index"],"sources":["../../../../src/components/menu/menu.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { MenuStyle } from \"./menu.style\"\nimport type {\n MenuOptionGroupType,\n MenuOptionGroupValue,\n UseMenuGroupProps,\n UseMenuItemProps,\n UseMenuOptionGroupProps,\n UseMenuOptionItemProps,\n UseMenuProps,\n UseMenuReturn,\n} from \"./use-menu\"\nimport { Fragment, useMemo, useState } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { cast, handlerAll } from \"../../utils\"\nimport { CheckIcon, ChevronRightIcon, CircleSmallIcon } from \"../icon\"\nimport { Popover, usePopoverProps } from \"../popover\"\nimport { menuStyle } from \"./menu.style\"\nimport {\n MainMenuContext,\n MenuContext,\n MenuDescendantsContext,\n MenuGroupContext,\n MenuOptionGroupContext,\n useMenu,\n useMenuContext,\n useMenuGroup,\n useMenuGroupContext,\n useMenuItem,\n useMenuOptionGroup,\n useMenuOptionItem,\n} from \"./use-menu\"\n\ninterface MenuSharedItem {\n label?: ReactNode\n}\n\ninterface MenuItemWithValue extends MenuSharedItem, MenuItemProps {}\n\ninterface MenuOptionItem extends MenuSharedItem, MenuOptionItemProps {}\n\ninterface MenuItemWithSeparator extends MenuSeparatorProps {\n type: \"separator\"\n}\n\ninterface MenuItemWithRadioGroup<Y extends string = string>\n extends\n Omit<MenuItemWithItems, \"defaultValue\" | \"items\" | \"onChange\">,\n MenuOptionGroupProps<\"radio\", Y> {\n type: \"radio\"\n items?: MenuOptionItem[]\n}\n\ninterface MenuItemWithCheckboxGroup<Y extends string[] = string[]>\n extends\n Omit<MenuItemWithItems, \"defaultValue\" | \"items\" | \"onChange\">,\n MenuOptionGroupProps<\"checkbox\", Y> {\n type: \"checkbox\"\n items?: MenuOptionItem[]\n}\n\ninterface MenuItemWithItems extends MenuSharedItem, MenuGroupProps {\n hasEndSeparator?: boolean\n hasSeparator?: boolean\n hasStartSeparator?: boolean\n items?: MenuItemWithValue[]\n labelProps?: MenuLabelProps\n}\n\nexport type MenuItem =\n | MenuItemWithCheckboxGroup\n | MenuItemWithItems\n | MenuItemWithRadioGroup\n | MenuItemWithSeparator\n | MenuItemWithValue\n\ninterface ComponentContext extends Pick<\n UseMenuReturn,\n | \"getContentProps\"\n | \"getContextTriggerProps\"\n | \"getSeparatorProps\"\n | \"getTriggerProps\"\n> {}\n\nexport interface MenuRootProps\n extends\n UseMenuProps,\n Omit<\n WithoutThemeProps<Popover.RootProps, MenuStyle>,\n \"autoFocus\" | \"modal\" | \"updateRef\" | \"withCloseButton\"\n >,\n ThemeProps<MenuStyle> {\n /**\n * The placement of the popper relative to its reference.\n *\n * @default 'end-start'\n */\n placement?: Popover.RootProps[\"placement\"]\n}\n\nconst {\n ComponentContext,\n HydrationContext,\n PropsContext: MenuPropsContext,\n StyleContext,\n useComponentContext,\n usePropsContext: useMenuPropsContext,\n withContext,\n useRootComponentProps,\n} = createSlotComponent<MenuRootProps, MenuStyle, ComponentContext>(\n \"menu\",\n menuStyle,\n)\n\nexport { MenuPropsContext, useMenuPropsContext }\n\n/**\n * `Menu` is a component that displays a common dropdown menu.\n *\n * @see https://yamada-ui.com/docs/components/menu\n */\nexport const MenuRoot: FC<MenuRootProps> = (props) => {\n const [styleContext, mergedProps] = useRootComponentProps(props)\n const [\n { animationScheme, initialFocusRef, offset, placement, ...popoverProps },\n { children, disabled, suppressHydrationWarning, ...rest },\n ] = usePopoverProps(mergedProps, [\n \"disabled\",\n \"open\",\n \"defaultOpen\",\n \"onOpen\",\n \"onClose\",\n ])\n const {\n closeOnSelect,\n descendants,\n open,\n subMenu,\n subMenuDirection,\n updateRef,\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n onActiveDescendant,\n onClose,\n onCloseRef,\n onCloseSubMenu,\n onOpen,\n onSelect,\n } = useMenu({ disabled, ...rest })\n const mergedPopoverProps = useMemo<Popover.RootProps>(\n () => ({\n ...popoverProps,\n animationScheme:\n animationScheme ?? (subMenu ? \"inline-start\" : \"block-start\"),\n autoFocus: !!initialFocusRef,\n disabled,\n initialFocusRef,\n offset: offset ?? (subMenu ? [0, 0] : undefined),\n open,\n placement:\n placement ?? (subMenu ? `center-${subMenuDirection}` : \"end-start\"),\n updateRef,\n onClose,\n onOpen,\n }),\n [\n animationScheme,\n disabled,\n initialFocusRef,\n offset,\n onClose,\n onOpen,\n open,\n placement,\n popoverProps,\n subMenu,\n subMenuDirection,\n updateRef,\n ],\n )\n const hydrationContext = useMemo(\n () => (suppressHydrationWarning ? { suppressHydrationWarning } : {}),\n [suppressHydrationWarning],\n )\n const menuContext = useMemo(\n () => ({\n subMenu,\n subMenuDirection,\n onActiveDescendant,\n onClose,\n onCloseSubMenu,\n onOpen,\n onSelect,\n }),\n [\n onClose,\n onOpen,\n onSelect,\n onActiveDescendant,\n subMenu,\n subMenuDirection,\n onCloseSubMenu,\n ],\n )\n const mainMenuContext = useMemo(\n () => ({\n closeOnSelect,\n descendants,\n onActiveDescendant,\n onCloseRef,\n onSelect,\n }),\n [closeOnSelect, descendants, onActiveDescendant, onCloseRef, onSelect],\n )\n const componentContext = useMemo(\n () => ({\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n }),\n [\n getContentProps,\n getContextTriggerProps,\n getSeparatorProps,\n getTriggerProps,\n ],\n )\n\n return (\n <StyleContext value={styleContext}>\n <HydrationContext value={hydrationContext}>\n <MenuDescendantsContext value={descendants}>\n <MenuContext value={menuContext}>\n <MainMenuContext value={mainMenuContext}>\n <ComponentContext value={componentContext}>\n <Popover.Root {...mergedPopoverProps}>{children}</Popover.Root>\n </ComponentContext>\n </MainMenuContext>\n </MenuContext>\n </MenuDescendantsContext>\n </HydrationContext>\n </StyleContext>\n )\n}\n\nexport interface MenuTriggerProps extends Popover.TriggerProps {}\n\nexport const MenuTrigger = withContext<\"button\", MenuTriggerProps>(\n Popover.Trigger,\n \"trigger\",\n)(undefined, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return cast<HTMLProps<\"button\">>(getTriggerProps(cast<HTMLProps>(props)))\n})\n\ninterface Rect {\n left: number\n top: number\n}\n\nexport interface MenuContextTriggerProps extends HTMLProps {}\n\nexport const MenuContextTrigger = withContext<\"div\", MenuContextTriggerProps>(\n ({ children, onContextMenu, ...rest }) => {\n const [rect, setRect] = useState<Rect>({\n left: 0,\n top: 0,\n })\n const { getContextTriggerProps } = useComponentContext()\n\n return (\n <>\n <MenuAnchor>\n <styled.div style={{ position: \"fixed\", ...rect }} />\n </MenuAnchor>\n\n <styled.div\n asChild\n {...getContextTriggerProps({\n onContextMenu: handlerAll(onContextMenu, (ev) => {\n setRect({ left: ev.clientX, top: ev.clientY })\n }),\n ...rest,\n })}\n >\n {children}\n </styled.div>\n </>\n )\n },\n \"contextTrigger\",\n)()\n\nexport interface MenuAnchorProps extends Popover.AnchorProps {}\n\nexport const MenuAnchor = withContext<\"div\", MenuAnchorProps>(\n Popover.Anchor,\n \"anchor\",\n)()\n\nexport interface MenuContentProps extends Popover.ContentProps {\n /**\n * The footer of the menu.\n */\n footer?: ReactNode\n /**\n * The header of the menu.\n */\n header?: ReactNode\n /**\n * If provided, generate elements based on items.\n */\n items?: MenuItem[]\n /**\n * Props for the footer component.\n */\n footerProps?: MenuFooterProps\n /**\n * Props for the header component.\n */\n headerProps?: MenuHeaderProps\n}\n\nexport const MenuContent = withContext<\"div\", MenuContentProps>(\n Popover.Content,\n \"content\",\n)(\n undefined,\n ({\n children,\n footer,\n header,\n items = [],\n footerProps,\n headerProps,\n portalProps,\n ...rest\n }) => {\n const { subMenu } = useMenuContext()\n const { getContentProps } = useComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return (\n <>\n {header ? <MenuHeader {...headerProps}>{header}</MenuHeader> : null}\n\n {items.map((props, index) => {\n if (\"type\" in props) {\n if (props.type === \"radio\") {\n const {\n type,\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuOptionGroup type={type} {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuOptionItem key={index} {...rest}>\n {label}\n </MenuOptionItem>\n ))}\n </MenuOptionGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else if (props.type === \"checkbox\") {\n const {\n type,\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuOptionGroup type={type} {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuOptionItem key={index} {...rest}>\n {label}\n </MenuOptionItem>\n ))}\n </MenuOptionGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else {\n return <MenuSeparator key={index} />\n }\n } else if (\"items\" in props) {\n const {\n hasSeparator = true,\n hasEndSeparator = hasSeparator,\n hasStartSeparator = hasSeparator,\n items = [],\n ...rest\n } = props\n\n return (\n <Fragment key={index}>\n {hasStartSeparator ? <MenuSeparator /> : null}\n\n <MenuGroup {...rest}>\n {items.map(({ label, ...rest }, index) => (\n <MenuItem key={index} {...rest}>\n {label}\n </MenuItem>\n ))}\n </MenuGroup>\n\n {hasEndSeparator ? <MenuSeparator /> : null}\n </Fragment>\n )\n } else if (\"value\" in props) {\n const { label, ...rest } = props\n\n return (\n <MenuItem key={index} {...rest}>\n {label}\n </MenuItem>\n )\n }\n })}\n\n {footer ? <MenuFooter {...footerProps}>{footer}</MenuFooter> : null}\n </>\n )\n }, [children, footer, footerProps, header, headerProps, items])\n\n return {\n ...getContentProps(\n cast<HTMLProps>({ ...rest, children: computedChildren }),\n ),\n portalProps: subMenu ? { ...portalProps, disabled: true } : portalProps,\n }\n },\n)\n\nexport interface MenuHeaderProps extends HTMLStyledProps {}\n\nexport const MenuHeader = withContext<\"div\", MenuHeaderProps>(\n \"div\",\n \"header\",\n)({ \"data-header\": \"\" })\n\nexport interface MenuFooterProps extends HTMLStyledProps {}\n\nexport const MenuFooter = withContext<\"div\", MenuFooterProps>(\n \"div\",\n \"footer\",\n)({ \"data-footer\": \"\" })\n\nexport interface MenuLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const MenuLabel = withContext<\"span\", MenuLabelProps>(\"span\", \"label\")(\n undefined,\n (props) => {\n const { getLabelProps } = useMenuGroupContext()\n\n return getLabelProps(props)\n },\n)\n\nexport interface MenuGroupProps extends UseMenuGroupProps, HTMLStyledProps {\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the label component.\n */\n labelProps?: MenuLabelProps\n}\n\nexport const MenuGroup = withContext<\"div\", MenuGroupProps>(\n ({ children, label, labelProps, ...rest }) => {\n const { getGroupProps, getLabelProps } = useMenuGroup(rest)\n const context = useMemo(() => ({ getLabelProps }), [getLabelProps])\n\n return (\n <MenuGroupContext value={context}>\n <styled.div {...getGroupProps()}>\n {label ? <MenuLabel {...labelProps}>{label}</MenuLabel> : null}\n {children}\n </styled.div>\n </MenuGroupContext>\n )\n },\n \"group\",\n)()\n\nexport interface MenuOptionGroupProps<\n Y extends MenuOptionGroupType = \"checkbox\",\n M extends MenuOptionGroupValue<Y> = MenuOptionGroupValue<Y>,\n>\n extends\n UseMenuOptionGroupProps<Y, M>,\n Omit<MenuGroupProps, \"defaultValue\" | \"onChange\"> {}\n\nexport const MenuOptionGroup = withContext<\"div\", MenuOptionGroupProps>(\n ({\n type: typeProp,\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n ...rest\n }) => {\n const { type, value, onChange } = useMenuOptionGroup({\n type: typeProp,\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n })\n const context = useMemo(\n () => ({ type, value, onChange }),\n [type, value, onChange],\n )\n\n return (\n <MenuOptionGroupContext value={context}>\n <MenuGroup {...rest} />\n </MenuOptionGroupContext>\n )\n },\n { name: \"OptionGroup\", slot: [\"group\", \"option\"] },\n)() as GenericsComponent<{\n <\n Y extends MenuOptionGroupType = \"checkbox\",\n M extends MenuOptionGroupValue<Y> = MenuOptionGroupValue<Y>,\n >(\n props: MenuOptionGroupProps<Y, M>,\n ): ReactElement\n}>\n\nexport interface MenuItemProps extends HTMLStyledProps, UseMenuItemProps {}\n\nexport const MenuItem = withContext<\"div\", MenuItemProps>(\n ({ children, ...rest }) => {\n const { subMenuTrigger, getItemProps } = useMenuItem(rest)\n\n return (\n <styled.div {...getItemProps()}>\n {children}\n\n {subMenuTrigger ? (\n <MenuIndicator as={ChevronRightIcon} ms=\"auto\" />\n ) : null}\n </styled.div>\n )\n },\n \"item\",\n)()\n\nexport interface MenuOptionItemProps\n extends HTMLStyledProps, UseMenuOptionItemProps {\n /**\n * The icon to be used in the menu option item.\n */\n icon?: ReactNode\n}\n\nexport const MenuOptionItem = withContext<\"div\", MenuOptionItemProps>(\n ({ children, icon, ...rest }) => {\n const { type, getIndicatorProps, getOptionItemProps } =\n useMenuOptionItem(rest)\n\n return (\n <styled.div {...getOptionItemProps()}>\n <MenuIndicator {...getIndicatorProps()}>\n {icon ||\n (type === \"radio\" ? (\n <CircleSmallIcon fill=\"currentColor\" />\n ) : (\n <CheckIcon />\n ))}\n </MenuIndicator>\n {children}\n </styled.div>\n )\n },\n { name: \"OptionItem\", slot: [\"item\", \"option\"] },\n)()\n\nexport interface MenuIndicatorProps extends HTMLStyledProps {}\n\nexport const MenuIndicator = withContext<\"div\", MenuIndicatorProps>(\n \"div\",\n \"indicator\",\n)()\n\nexport interface MenuCommandProps extends HTMLStyledProps<\"kbd\"> {}\n\nexport const MenuCommand = withContext<\"kbd\", MenuCommandProps>(\n \"kbd\",\n \"command\",\n)()\n\nexport interface MenuSeparatorProps extends HTMLStyledProps<\"hr\"> {}\n\nexport const MenuSeparator = withContext<\"hr\", MenuSeparatorProps>(\n \"hr\",\n \"separator\",\n)(undefined, (props) => {\n const { getSeparatorProps } = useComponentContext()\n\n return getSeparatorProps(props)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6GA,MAAM,EACJ,kBACA,kBACA,cAAc,kBACd,cACA,qBACA,iBAAiB,qBACjB,aACA,0BACE,oBACF,QACA,UACD;;;;;;AASD,MAAaA,YAA+B,UAAU;CACpD,MAAM,CAAC,cAAc,eAAe,sBAAsB,MAAM;CAChE,MAAM,CACJ,EAAE,iBAAiB,iBAAiB,QAAQ,WAAW,GAAG,gBAC1D,EAAE,UAAU,UAAU,0BAA0B,GAAG,UACjD,gBAAgB,aAAa;EAC/B;EACA;EACA;EACA;EACA;EACD,CAAC;CACF,MAAM,EACJ,eACA,aACA,MACA,SACA,kBACA,WACA,iBACA,wBACA,mBACA,iBACA,oBACA,SACA,YACA,gBACA,QACA,aACE,QAAQ;EAAE;EAAU,GAAG;EAAM,CAAC;CAClC,MAAM,qBAAqB,eAClB;EACL,GAAG;EACH,iBACE,oBAAoB,UAAU,iBAAiB;EACjD,WAAW,CAAC,CAAC;EACb;EACA;EACA,QAAQ,WAAW,UAAU,CAAC,GAAG,EAAE,GAAG;EACtC;EACA,WACE,cAAc,UAAU,UAAU,qBAAqB;EACzD;EACA;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAkDD,QACE,oBAAC;EAAa,OAAO;YACnB,oBAAC;GAAiB,OAnDG,cAChB,2BAA2B,EAAE,0BAA0B,GAAG,EAAE,EACnE,CAAC,yBAAyB,CAC3B;aAiDK,oBAAC;IAAuB,OAAO;cAC7B,oBAAC;KAAY,OAjDD,eACX;MACL;MACA;MACA;MACA;MACA;MACA;MACA;MACD,GACD;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACD,CACF;eA+BS,oBAAC;MAAgB,OA9BH,eACf;OACL;OACA;OACA;OACA;OACA;OACD,GACD;OAAC;OAAe;OAAa;OAAoB;OAAY;OAAS,CACvE;gBAsBW,oBAAC;OAAiB,OArBL,eAChB;QACL;QACA;QACA;QACA;QACD,GACD;QACE;QACA;QACA;QACA;QACD,CACF;iBASa,oBAACC;QAAa,GAAI;QAAqB;SAAwB;QAC9C;OACH;MACN;KACS;IACR;GACN;;AAMnB,MAAa,cAAc,Y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M,mBAAmB,uBAC/B,kBAAkB,KAAK;AAEzB,QACE,qBAAC,OAAO;EAAI,GAAI,oBAAoB;aAClC,oBAAC;GAAc,GAAI,mBAAmB;aACnC,SACE,SAAS,UACR,oBAAC,mBAAgB,MAAK,iBAAiB,GAEvC,oBAAC,cAAY;IAEH,EACf;GACU;GAGjB;CAAE,MAAM;CAAc,MAAM,CAAC,QAAQ,SAAS;CAAE,CACjD,EAAE;AAIH,MAAa,gBAAgB,YAC3B,OACA,YACD,EAAE;AAIH,MAAa,cAAc,YACzB,OACA,UACD,EAAE;AAIH,MAAa,gBAAgB,YAC3B,MACA,YACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,sBAAsB,qBAAqB;AAEnD,QAAO,kBAAkB,MAAM;EAC/B"}
@@ -10,38 +10,41 @@ import { useMemo } from "react";
10
10
  import { jsx } from "react/jsx-runtime";
11
11
 
12
12
  //#region src/components/native-popover/native-popover.tsx
13
- const { ComponentContext, PropsContext: NativePopoverPropsContext, StyleContext, useComponentContext, usePropsContext: useNativePopoverPropsContext, withContext, useRootComponentProps } = createSlotComponent("native-popover", nativePopoverStyle);
13
+ const { ComponentContext, HydrationContext, PropsContext: NativePopoverPropsContext, StyleContext, useComponentContext, usePropsContext: useNativePopoverPropsContext, withContext, useRootComponentProps } = createSlotComponent("native-popover", nativePopoverStyle);
14
14
  /**
15
15
  * `NativePopover` is a component that floats around an element to display information using the native HTML Popover API.
16
16
  *
17
17
  * @see https://yamada-ui.com/docs/components/native-popover
18
18
  */
19
19
  const NativePopoverRoot = (props) => {
20
- const [styleContext, { children, ...rest }] = useRootComponentProps(props);
20
+ const [styleContext, { children, suppressHydrationWarning, ...rest }] = useRootComponentProps(props);
21
21
  const { getAnchorProps, getBodyProps, getCloseTriggerProps, getContentProps, getFooterProps, getHeaderProps, getPositionerProps, getTriggerProps } = useNativePopover(rest);
22
22
  return /* @__PURE__ */ jsx(StyleContext, {
23
23
  value: styleContext,
24
- children: /* @__PURE__ */ jsx(ComponentContext, {
25
- value: useMemo(() => ({
26
- getAnchorProps,
27
- getBodyProps,
28
- getCloseTriggerProps,
29
- getContentProps,
30
- getFooterProps,
31
- getHeaderProps,
32
- getPositionerProps,
33
- getTriggerProps
34
- }), [
35
- getAnchorProps,
36
- getBodyProps,
37
- getCloseTriggerProps,
38
- getContentProps,
39
- getFooterProps,
40
- getHeaderProps,
41
- getPositionerProps,
42
- getTriggerProps
43
- ]),
44
- children
24
+ children: /* @__PURE__ */ jsx(HydrationContext, {
25
+ value: useMemo(() => suppressHydrationWarning ? { suppressHydrationWarning } : {}, [suppressHydrationWarning]),
26
+ children: /* @__PURE__ */ jsx(ComponentContext, {
27
+ value: useMemo(() => ({
28
+ getAnchorProps,
29
+ getBodyProps,
30
+ getCloseTriggerProps,
31
+ getContentProps,
32
+ getFooterProps,
33
+ getHeaderProps,
34
+ getPositionerProps,
35
+ getTriggerProps
36
+ }), [
37
+ getAnchorProps,
38
+ getBodyProps,
39
+ getCloseTriggerProps,
40
+ getContentProps,
41
+ getFooterProps,
42
+ getHeaderProps,
43
+ getPositionerProps,
44
+ getTriggerProps
45
+ ]),
46
+ children
47
+ })
45
48
  })
46
49
  });
47
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"native-popover.js","names":["NativePopoverRoot: FC<NativePopoverRootProps>"],"sources":["../../../../src/components/native-popover/native-popover.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, PropsWithChildren } from \"react\"\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { NativePopoverStyle } from \"./native-popover.style\"\nimport type {\n UseNativePopoverProps,\n UseNativePopoverReturn,\n} from \"./use-native-popover\"\nimport { useMemo } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { cast } from \"../../utils\"\nimport { nativePopoverStyle } from \"./native-popover.style\"\nimport { useNativePopover } from \"./use-native-popover\"\n\ninterface ComponentContext extends Pick<\n UseNativePopoverReturn,\n | \"getAnchorProps\"\n | \"getBodyProps\"\n | \"getCloseTriggerProps\"\n | \"getContentProps\"\n | \"getFooterProps\"\n | \"getHeaderProps\"\n | \"getPositionerProps\"\n | \"getTriggerProps\"\n> {}\n\nexport interface NativePopoverRootProps\n extends\n UseNativePopoverProps,\n ThemeProps<NativePopoverStyle>,\n PropsWithChildren {}\n\nconst {\n ComponentContext,\n PropsContext: NativePopoverPropsContext,\n StyleContext,\n useComponentContext,\n usePropsContext: useNativePopoverPropsContext,\n withContext,\n useRootComponentProps,\n} = createSlotComponent<\n NativePopoverRootProps,\n NativePopoverStyle,\n ComponentContext\n>(\"native-popover\", nativePopoverStyle)\n\nexport { NativePopoverPropsContext, useNativePopoverPropsContext }\n\n/**\n * `NativePopover` is a component that floats around an element to display information using the native HTML Popover API.\n *\n * @see https://yamada-ui.com/docs/components/native-popover\n */\nexport const NativePopoverRoot: FC<NativePopoverRootProps> = (props) => {\n const [styleContext, { children, ...rest }] = useRootComponentProps(props)\n const {\n getAnchorProps,\n getBodyProps,\n getCloseTriggerProps,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getPositionerProps,\n getTriggerProps,\n } = useNativePopover(rest)\n const componentContext = useMemo(\n () => ({\n getAnchorProps,\n getBodyProps,\n getCloseTriggerProps,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getPositionerProps,\n getTriggerProps,\n }),\n [\n getAnchorProps,\n getBodyProps,\n getCloseTriggerProps,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getPositionerProps,\n getTriggerProps,\n ],\n )\n\n return (\n <StyleContext value={styleContext}>\n <ComponentContext value={componentContext}>{children}</ComponentContext>\n </StyleContext>\n )\n}\n\nexport interface NativePopoverTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const NativePopoverTrigger = withContext<\n \"button\",\n NativePopoverTriggerProps\n>(\"button\", \"trigger\")({ asChild: true }, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return getTriggerProps(props)\n})\n\nexport interface NativePopoverAnchorProps extends HTMLStyledProps {}\n\nexport const NativePopoverAnchor = withContext<\"div\", NativePopoverAnchorProps>(\n \"div\",\n \"anchor\",\n)({ asChild: true }, (props) => {\n const { getAnchorProps } = useComponentContext()\n\n return getAnchorProps(props)\n})\n\ninterface NativePopoverPositionerProps extends HTMLStyledProps {}\n\nconst NativePopoverPositioner = withContext<\n \"div\",\n NativePopoverPositionerProps\n>(\"div\", \"positioner\")({ asChild: true }, (props) => {\n const { getPositionerProps } = useComponentContext()\n\n return getPositionerProps(props)\n})\n\nexport interface NativePopoverCloseTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const NativePopoverCloseTrigger = withContext<\n \"button\",\n NativePopoverCloseTriggerProps\n>(\"button\", { name: \"CloseTrigger\", slot: [\"trigger\", \"close\"] })(\n { asChild: true },\n (props) => {\n const { getCloseTriggerProps } = useComponentContext()\n\n return getCloseTriggerProps(props)\n },\n)\n\nexport interface NativePopoverContentProps\n extends HTMLStyledProps, PropsWithChildren {}\n\nexport const NativePopoverContent = withContext<\n \"div\",\n NativePopoverContentProps\n>(({ children, ...rest }) => {\n const { getContentProps } = useComponentContext()\n\n return (\n <NativePopoverPositioner>\n <styled.div {...getContentProps(cast<HTMLStyledProps>(rest))}>\n {children}\n </styled.div>\n </NativePopoverPositioner>\n )\n}, \"content\")({\n suppressHydrationWarning: true,\n})\n\nexport interface NativePopoverHeaderProps extends HTMLStyledProps {}\n\nexport const NativePopoverHeader = withContext<\"div\", NativePopoverHeaderProps>(\n \"div\",\n \"header\",\n)(undefined, (props) => {\n const { getHeaderProps } = useComponentContext()\n\n return getHeaderProps(props)\n})\n\nexport interface NativePopoverBodyProps extends HTMLStyledProps {}\n\nexport const NativePopoverBody = withContext<\"div\", NativePopoverBodyProps>(\n \"div\",\n \"body\",\n)(undefined, (props) => {\n const { getBodyProps } = useComponentContext()\n\n return getBodyProps(props)\n})\n\nexport interface NativePopoverFooterProps extends HTMLStyledProps {}\n\nexport const NativePopoverFooter = withContext<\"div\", NativePopoverFooterProps>(\n \"div\",\n \"footer\",\n)(undefined, (props) => {\n const { getFooterProps } = useComponentContext()\n\n return getFooterProps(props)\n})\n"],"mappings":";;;;;;;;;;;;AAiCA,MAAM,EACJ,kBACA,cAAc,2BACd,cACA,qBACA,iBAAiB,8BACjB,aACA,0BACE,oBAIF,kBAAkB,mBAAmB;;;;;;AASvC,MAAaA,qBAAiD,UAAU;CACtE,MAAM,CAAC,cAAc,EAAE,UAAU,GAAG,UAAU,sBAAsB,MAAM;CAC1E,MAAM,EACJ,gBACA,cACA,sBACA,iBACA,gBACA,gBACA,oBACA,oBACE,iBAAiB,KAAK;AAwB1B,QACE,oBAAC;EAAa,OAAO;YACnB,oBAAC;GAAiB,OAzBG,eAChB;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,GACD;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CACF;GAI+C;IAA4B;GAC3D;;AAMnB,MAAa,uBAAuB,YAGlC,UAAU,UAAU,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU;CACnD,MAAM,EAAE,oBAAoB,qBAAqB;AAEjD,QAAO,gBAAgB,MAAM;EAC7B;AAIF,MAAa,sBAAsB,YACjC,OACA,SACD,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU;CAC9B,MAAM,EAAE,mBAAmB,qBAAqB;AAEhD,QAAO,eAAe,MAAM;EAC5B;AAIF,MAAM,0BAA0B,YAG9B,OAAO,aAAa,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU;CACnD,MAAM,EAAE,uBAAuB,qBAAqB;AAEpD,QAAO,mBAAmB,MAAM;EAChC;AAIF,MAAa,4BAA4B,YAGvC,UAAU;CAAE,MAAM;CAAgB,MAAM,CAAC,WAAW,QAAQ;CAAE,CAAC,CAC/D,EAAE,SAAS,MAAM,GAChB,UAAU;CACT,MAAM,EAAE,yBAAyB,qBAAqB;AAEtD,QAAO,qBAAqB,MAAM;EAErC;AAKD,MAAa,uBAAuB,aAGjC,EAAE,UAAU,GAAG,WAAW;CAC3B,MAAM,EAAE,oBAAoB,qBAAqB;AAEjD,QACE,oBAAC,qCACC,oBAAC,OAAO;EAAI,GAAI,wCAAsC,KAAK,CAAC;EACzD;GACU,GACW;GAE3B,UAAU,CAAC,EACZ,0BAA0B,MAC3B,CAAC;AAIF,MAAa,sBAAsB,YACjC,OACA,SACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,mBAAmB,qBAAqB;AAEhD,QAAO,eAAe,MAAM;EAC5B;AAIF,MAAa,oBAAoB,YAC/B,OACA,OACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,iBAAiB,qBAAqB;AAE9C,QAAO,aAAa,MAAM;EAC1B;AAIF,MAAa,sBAAsB,YACjC,OACA,SACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,mBAAmB,qBAAqB;AAEhD,QAAO,eAAe,MAAM;EAC5B"}
1
+ {"version":3,"file":"native-popover.js","names":["NativePopoverRoot: FC<NativePopoverRootProps>"],"sources":["../../../../src/components/native-popover/native-popover.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, PropsWithChildren } from \"react\"\nimport type { HTMLProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { NativePopoverStyle } from \"./native-popover.style\"\nimport type {\n UseNativePopoverProps,\n UseNativePopoverReturn,\n} from \"./use-native-popover\"\nimport { useMemo } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { cast } from \"../../utils\"\nimport { nativePopoverStyle } from \"./native-popover.style\"\nimport { useNativePopover } from \"./use-native-popover\"\n\ninterface ComponentContext extends Pick<\n UseNativePopoverReturn,\n | \"getAnchorProps\"\n | \"getBodyProps\"\n | \"getCloseTriggerProps\"\n | \"getContentProps\"\n | \"getFooterProps\"\n | \"getHeaderProps\"\n | \"getPositionerProps\"\n | \"getTriggerProps\"\n> {}\n\nexport interface NativePopoverRootProps\n extends\n UseNativePopoverProps,\n ThemeProps<NativePopoverStyle>,\n PropsWithChildren,\n Pick<HTMLProps, \"suppressHydrationWarning\"> {}\n\nconst {\n ComponentContext,\n HydrationContext,\n PropsContext: NativePopoverPropsContext,\n StyleContext,\n useComponentContext,\n usePropsContext: useNativePopoverPropsContext,\n withContext,\n useRootComponentProps,\n} = createSlotComponent<\n NativePopoverRootProps,\n NativePopoverStyle,\n ComponentContext\n>(\"native-popover\", nativePopoverStyle)\n\nexport { NativePopoverPropsContext, useNativePopoverPropsContext }\n\n/**\n * `NativePopover` is a component that floats around an element to display information using the native HTML Popover API.\n *\n * @see https://yamada-ui.com/docs/components/native-popover\n */\nexport const NativePopoverRoot: FC<NativePopoverRootProps> = (props) => {\n const [styleContext, { children, suppressHydrationWarning, ...rest }] =\n useRootComponentProps(props)\n const {\n getAnchorProps,\n getBodyProps,\n getCloseTriggerProps,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getPositionerProps,\n getTriggerProps,\n } = useNativePopover(rest)\n const hydrationContext = useMemo(\n () => (suppressHydrationWarning ? { suppressHydrationWarning } : {}),\n [suppressHydrationWarning],\n )\n const componentContext = useMemo(\n () => ({\n getAnchorProps,\n getBodyProps,\n getCloseTriggerProps,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getPositionerProps,\n getTriggerProps,\n }),\n [\n getAnchorProps,\n getBodyProps,\n getCloseTriggerProps,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getPositionerProps,\n getTriggerProps,\n ],\n )\n\n return (\n <StyleContext value={styleContext}>\n <HydrationContext value={hydrationContext}>\n <ComponentContext value={componentContext}>{children}</ComponentContext>\n </HydrationContext>\n </StyleContext>\n )\n}\n\nexport interface NativePopoverTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const NativePopoverTrigger = withContext<\n \"button\",\n NativePopoverTriggerProps\n>(\"button\", \"trigger\")({ asChild: true }, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return getTriggerProps(props)\n})\n\nexport interface NativePopoverAnchorProps extends HTMLStyledProps {}\n\nexport const NativePopoverAnchor = withContext<\"div\", NativePopoverAnchorProps>(\n \"div\",\n \"anchor\",\n)({ asChild: true }, (props) => {\n const { getAnchorProps } = useComponentContext()\n\n return getAnchorProps(props)\n})\n\ninterface NativePopoverPositionerProps extends HTMLStyledProps {}\n\nconst NativePopoverPositioner = withContext<\n \"div\",\n NativePopoverPositionerProps\n>(\"div\", \"positioner\")({ asChild: true }, (props) => {\n const { getPositionerProps } = useComponentContext()\n\n return getPositionerProps(props)\n})\n\nexport interface NativePopoverCloseTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const NativePopoverCloseTrigger = withContext<\n \"button\",\n NativePopoverCloseTriggerProps\n>(\"button\", { name: \"CloseTrigger\", slot: [\"trigger\", \"close\"] })(\n { asChild: true },\n (props) => {\n const { getCloseTriggerProps } = useComponentContext()\n\n return getCloseTriggerProps(props)\n },\n)\n\nexport interface NativePopoverContentProps\n extends HTMLStyledProps, PropsWithChildren {}\n\nexport const NativePopoverContent = withContext<\n \"div\",\n NativePopoverContentProps\n>(({ children, ...rest }) => {\n const { getContentProps } = useComponentContext()\n\n return (\n <NativePopoverPositioner>\n <styled.div {...getContentProps(cast<HTMLStyledProps>(rest))}>\n {children}\n </styled.div>\n </NativePopoverPositioner>\n )\n}, \"content\")({\n suppressHydrationWarning: true,\n})\n\nexport interface NativePopoverHeaderProps extends HTMLStyledProps {}\n\nexport const NativePopoverHeader = withContext<\"div\", NativePopoverHeaderProps>(\n \"div\",\n \"header\",\n)(undefined, (props) => {\n const { getHeaderProps } = useComponentContext()\n\n return getHeaderProps(props)\n})\n\nexport interface NativePopoverBodyProps extends HTMLStyledProps {}\n\nexport const NativePopoverBody = withContext<\"div\", NativePopoverBodyProps>(\n \"div\",\n \"body\",\n)(undefined, (props) => {\n const { getBodyProps } = useComponentContext()\n\n return getBodyProps(props)\n})\n\nexport interface NativePopoverFooterProps extends HTMLStyledProps {}\n\nexport const NativePopoverFooter = withContext<\"div\", NativePopoverFooterProps>(\n \"div\",\n \"footer\",\n)(undefined, (props) => {\n const { getFooterProps } = useComponentContext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BAAqB,MAAM;EAErC;AAKD,MAAa,uBAAuB,aAGjC,EAAE,UAAU,GAAG,WAAW;CAC3B,MAAM,EAAE,oBAAoB,qBAAqB;AAEjD,QACE,oBAAC,qCACC,oBAAC,OAAO;EAAI,GAAI,wCAAsC,KAAK,CAAC;EACzD;GACU,GACW;GAE3B,UAAU,CAAC,EACZ,0BAA0B,MAC3B,CAAC;AAIF,MAAa,sBAAsB,YACjC,OACA,SACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,mBAAmB,qBAAqB;AAEhD,QAAO,eAAe,MAAM;EAC5B;AAIF,MAAa,oBAAoB,YAC/B,OACA,OACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,iBAAiB,qBAAqB;AAE9C,QAAO,aAAa,MAAM;EAC1B;AAIF,MAAa,sBAAsB,YACjC,OACA,SACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,mBAAmB,qBAAqB;AAEhD,QAAO,eAAe,MAAM;EAC5B"}
@@ -89,7 +89,7 @@ const usePopoverStyleProps = (props = {}) => {
89
89
  strategy
90
90
  };
91
91
  };
92
- const { ComponentContext, PropsContext: PopoverPropsContext, StyleContext, useComponentContext, usePropsContext: usePopoverPropsContext, withContext, useRootComponentProps } = createSlotComponent("popover", popoverStyle);
92
+ const { ComponentContext, HydrationContext, PropsContext: PopoverPropsContext, StyleContext, useComponentContext, usePropsContext: usePopoverPropsContext, withContext, useRootComponentProps } = createSlotComponent("popover", popoverStyle);
93
93
  /**
94
94
  * `Popover` is a component that floats around an element to display information.
95
95
  *
@@ -97,42 +97,45 @@ const { ComponentContext, PropsContext: PopoverPropsContext, StyleContext, useCo
97
97
  */
98
98
  const PopoverRoot = (props) => {
99
99
  const styleProps = usePopoverStyleProps(props);
100
- const [styleContext, { animationScheme, children, duration, ...rest }] = useRootComponentProps({
100
+ const [styleContext, { animationScheme, children, duration, suppressHydrationWarning, ...rest }] = useRootComponentProps({
101
101
  ...props,
102
102
  ...styleProps
103
103
  });
104
104
  const { open, getAnchorProps, getBodyProps, getCloseTriggerProps, getContentProps, getFooterProps, getHeaderProps, getPositionerProps, getTriggerProps, onClose } = usePopover(rest);
105
105
  return /* @__PURE__ */ jsx(StyleContext, {
106
106
  value: styleContext,
107
- children: /* @__PURE__ */ jsx(ComponentContext, {
108
- value: useMemo(() => ({
109
- animationScheme,
110
- duration,
111
- open,
112
- getAnchorProps,
113
- getBodyProps,
114
- getCloseTriggerProps,
115
- getContentProps,
116
- getFooterProps,
117
- getHeaderProps,
118
- getPositionerProps,
119
- getTriggerProps
120
- }), [
121
- open,
122
- animationScheme,
123
- duration,
124
- getAnchorProps,
125
- getBodyProps,
126
- getCloseTriggerProps,
127
- getContentProps,
128
- getFooterProps,
129
- getHeaderProps,
130
- getPositionerProps,
131
- getTriggerProps
132
- ]),
133
- children: (0, utils_exports.runIfFn)(children, {
134
- open,
135
- onClose
107
+ children: /* @__PURE__ */ jsx(HydrationContext, {
108
+ value: useMemo(() => suppressHydrationWarning ? { suppressHydrationWarning } : {}, [suppressHydrationWarning]),
109
+ children: /* @__PURE__ */ jsx(ComponentContext, {
110
+ value: useMemo(() => ({
111
+ animationScheme,
112
+ duration,
113
+ open,
114
+ getAnchorProps,
115
+ getBodyProps,
116
+ getCloseTriggerProps,
117
+ getContentProps,
118
+ getFooterProps,
119
+ getHeaderProps,
120
+ getPositionerProps,
121
+ getTriggerProps
122
+ }), [
123
+ open,
124
+ animationScheme,
125
+ duration,
126
+ getAnchorProps,
127
+ getBodyProps,
128
+ getCloseTriggerProps,
129
+ getContentProps,
130
+ getFooterProps,
131
+ getHeaderProps,
132
+ getPositionerProps,
133
+ getTriggerProps
134
+ ]),
135
+ children: (0, utils_exports.runIfFn)(children, {
136
+ open,
137
+ onClose
138
+ })
136
139
  })
137
140
  })
138
141
  });