@yamada-ui/react 2.2.6 → 2.2.7-dev-20260804111744

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 (811) hide show
  1. package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -1
  2. package/dist/cjs/components/accordion/accordion.cjs +4 -2
  3. package/dist/cjs/components/accordion/accordion.cjs.map +1 -1
  4. package/dist/cjs/components/accordion/use-accordion.cjs +1 -0
  5. package/dist/cjs/components/accordion/use-accordion.cjs.map +1 -1
  6. package/dist/cjs/components/action-bar/action-bar.cjs +1 -0
  7. package/dist/cjs/components/action-bar/action-bar.cjs.map +1 -1
  8. package/dist/cjs/components/action-bar/use-action-bar.cjs +1 -0
  9. package/dist/cjs/components/action-bar/use-action-bar.cjs.map +1 -1
  10. package/dist/cjs/components/airy/airy.cjs +1 -0
  11. package/dist/cjs/components/airy/airy.cjs.map +1 -1
  12. package/dist/cjs/components/alert/alert.cjs +5 -2
  13. package/dist/cjs/components/alert/alert.cjs.map +1 -1
  14. package/dist/cjs/components/alpha-slider/alpha-slider.cjs +1 -0
  15. package/dist/cjs/components/alpha-slider/alpha-slider.cjs.map +1 -1
  16. package/dist/cjs/components/aspect-ratio/aspect-ratio.cjs +1 -0
  17. package/dist/cjs/components/aspect-ratio/aspect-ratio.cjs.map +1 -1
  18. package/dist/cjs/components/autocomplete/autocomplete.cjs +14 -10
  19. package/dist/cjs/components/autocomplete/autocomplete.cjs.map +1 -1
  20. package/dist/cjs/components/autocomplete/use-autocomplete.cjs +1 -0
  21. package/dist/cjs/components/autocomplete/use-autocomplete.cjs.map +1 -1
  22. package/dist/cjs/components/avatar/avatar-group.cjs +13 -11
  23. package/dist/cjs/components/avatar/avatar-group.cjs.map +1 -1
  24. package/dist/cjs/components/avatar/use-avatar-group.cjs +1 -0
  25. package/dist/cjs/components/avatar/use-avatar-group.cjs.map +1 -1
  26. package/dist/cjs/components/avatar/use-avatar.cjs +1 -0
  27. package/dist/cjs/components/avatar/use-avatar.cjs.map +1 -1
  28. package/dist/cjs/components/blockquote/blockquote.cjs +1 -0
  29. package/dist/cjs/components/blockquote/blockquote.cjs.map +1 -1
  30. package/dist/cjs/components/breadcrumb/breadcrumb.cjs +1 -0
  31. package/dist/cjs/components/breadcrumb/breadcrumb.cjs.map +1 -1
  32. package/dist/cjs/components/breadcrumb/use-breadcrumb.cjs +1 -0
  33. package/dist/cjs/components/breadcrumb/use-breadcrumb.cjs.map +1 -1
  34. package/dist/cjs/components/button/button-group.cjs +1 -0
  35. package/dist/cjs/components/button/button-group.cjs.map +1 -1
  36. package/dist/cjs/components/button/button.cjs +9 -5
  37. package/dist/cjs/components/button/button.cjs.map +1 -1
  38. package/dist/cjs/components/calendar/calendar.cjs +1 -0
  39. package/dist/cjs/components/calendar/calendar.cjs.map +1 -1
  40. package/dist/cjs/components/calendar/use-calendar.cjs.map +1 -1
  41. package/dist/cjs/components/carousel/carousel.cjs +27 -25
  42. package/dist/cjs/components/carousel/carousel.cjs.map +1 -1
  43. package/dist/cjs/components/carousel/use-carousel.cjs.map +1 -1
  44. package/dist/cjs/components/chart/area-chart.cjs +6 -4
  45. package/dist/cjs/components/chart/area-chart.cjs.map +1 -1
  46. package/dist/cjs/components/chart/bar-chart.cjs +6 -4
  47. package/dist/cjs/components/chart/bar-chart.cjs.map +1 -1
  48. package/dist/cjs/components/chart/cartesian-chart.cjs +146 -139
  49. package/dist/cjs/components/chart/cartesian-chart.cjs.map +1 -1
  50. package/dist/cjs/components/chart/chart.cjs +3 -1
  51. package/dist/cjs/components/chart/chart.cjs.map +1 -1
  52. package/dist/cjs/components/chart/composed-chart.cjs +16 -14
  53. package/dist/cjs/components/chart/composed-chart.cjs.map +1 -1
  54. package/dist/cjs/components/chart/donut-chart.cjs +8 -5
  55. package/dist/cjs/components/chart/donut-chart.cjs.map +1 -1
  56. package/dist/cjs/components/chart/line-chart.cjs +6 -4
  57. package/dist/cjs/components/chart/line-chart.cjs.map +1 -1
  58. package/dist/cjs/components/chart/pie-chart.cjs +8 -5
  59. package/dist/cjs/components/chart/pie-chart.cjs.map +1 -1
  60. package/dist/cjs/components/chart/polar-chart.cjs +119 -111
  61. package/dist/cjs/components/chart/polar-chart.cjs.map +1 -1
  62. package/dist/cjs/components/chart/radar-chart.cjs +6 -4
  63. package/dist/cjs/components/chart/radar-chart.cjs.map +1 -1
  64. package/dist/cjs/components/chart/radial-chart.cjs +1 -0
  65. package/dist/cjs/components/chart/radial-chart.cjs.map +1 -1
  66. package/dist/cjs/components/chart/use-cartesian-chart.cjs +1 -0
  67. package/dist/cjs/components/chart/use-cartesian-chart.cjs.map +1 -1
  68. package/dist/cjs/components/chart/use-chart.cjs +1 -0
  69. package/dist/cjs/components/chart/use-chart.cjs.map +1 -1
  70. package/dist/cjs/components/chart/use-polar-chart.cjs +1 -0
  71. package/dist/cjs/components/chart/use-polar-chart.cjs.map +1 -1
  72. package/dist/cjs/components/checkbox/checkbox-group.cjs +39 -36
  73. package/dist/cjs/components/checkbox/checkbox-group.cjs.map +1 -1
  74. package/dist/cjs/components/checkbox/checkbox.cjs +1 -0
  75. package/dist/cjs/components/checkbox/checkbox.cjs.map +1 -1
  76. package/dist/cjs/components/checkbox/use-checkbox-group.cjs +1 -0
  77. package/dist/cjs/components/checkbox/use-checkbox-group.cjs.map +1 -1
  78. package/dist/cjs/components/checkbox/use-checkbox.cjs +3 -1
  79. package/dist/cjs/components/checkbox/use-checkbox.cjs.map +1 -1
  80. package/dist/cjs/components/checkbox-card/checkbox-card-group.cjs +43 -40
  81. package/dist/cjs/components/checkbox-card/checkbox-card-group.cjs.map +1 -1
  82. package/dist/cjs/components/checkbox-card/checkbox-card.cjs +1 -0
  83. package/dist/cjs/components/checkbox-card/checkbox-card.cjs.map +1 -1
  84. package/dist/cjs/components/circle-progress/circle-progress.cjs.map +1 -1
  85. package/dist/cjs/components/client-only/client-only.cjs +2 -1
  86. package/dist/cjs/components/client-only/client-only.cjs.map +1 -1
  87. package/dist/cjs/components/collapse/collapse.cjs +1 -0
  88. package/dist/cjs/components/collapse/collapse.cjs.map +1 -1
  89. package/dist/cjs/components/color-picker/color-picker.cjs +3 -1
  90. package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
  91. package/dist/cjs/components/color-picker/use-color-picker.cjs +1 -0
  92. package/dist/cjs/components/color-picker/use-color-picker.cjs.map +1 -1
  93. package/dist/cjs/components/color-selector/color-selector.cjs +3 -1
  94. package/dist/cjs/components/color-selector/color-selector.cjs.map +1 -1
  95. package/dist/cjs/components/color-selector/use-color-selector.cjs +1 -0
  96. package/dist/cjs/components/color-selector/use-color-selector.cjs.map +1 -1
  97. package/dist/cjs/components/color-swatch/color-swatch.cjs.map +1 -1
  98. package/dist/cjs/components/data-list/data-list.cjs +9 -5
  99. package/dist/cjs/components/data-list/data-list.cjs.map +1 -1
  100. package/dist/cjs/components/date-picker/date-picker.cjs +3 -1
  101. package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
  102. package/dist/cjs/components/date-picker/use-date-picker.cjs.map +1 -1
  103. package/dist/cjs/components/drawer/drawer.cjs +1 -0
  104. package/dist/cjs/components/drawer/drawer.cjs.map +1 -1
  105. package/dist/cjs/components/drawer/use-drawer.cjs +2 -3
  106. package/dist/cjs/components/drawer/use-drawer.cjs.map +1 -1
  107. package/dist/cjs/components/dropzone/dropzone.cjs +3 -1
  108. package/dist/cjs/components/dropzone/dropzone.cjs.map +1 -1
  109. package/dist/cjs/components/dropzone/use-dropzone.cjs +1 -0
  110. package/dist/cjs/components/dropzone/use-dropzone.cjs.map +1 -1
  111. package/dist/cjs/components/editable/editable.cjs.map +1 -1
  112. package/dist/cjs/components/editable/use-editable.cjs +1 -0
  113. package/dist/cjs/components/editable/use-editable.cjs.map +1 -1
  114. package/dist/cjs/components/fade/fade.cjs +1 -0
  115. package/dist/cjs/components/fade/fade.cjs.map +1 -1
  116. package/dist/cjs/components/fade-scale/fade-scale.cjs +1 -0
  117. package/dist/cjs/components/fade-scale/fade-scale.cjs.map +1 -1
  118. package/dist/cjs/components/field/field.cjs +1 -0
  119. package/dist/cjs/components/field/field.cjs.map +1 -1
  120. package/dist/cjs/components/field/use-field-props.cjs +1 -0
  121. package/dist/cjs/components/field/use-field-props.cjs.map +1 -1
  122. package/dist/cjs/components/fieldset/fieldset.cjs +1 -0
  123. package/dist/cjs/components/fieldset/fieldset.cjs.map +1 -1
  124. package/dist/cjs/components/file-button/use-file-button.cjs +1 -0
  125. package/dist/cjs/components/file-button/use-file-button.cjs.map +1 -1
  126. package/dist/cjs/components/file-input/file-input.cjs +3 -1
  127. package/dist/cjs/components/file-input/file-input.cjs.map +1 -1
  128. package/dist/cjs/components/file-input/use-file-input.cjs +1 -0
  129. package/dist/cjs/components/file-input/use-file-input.cjs.map +1 -1
  130. package/dist/cjs/components/flip/flip.cjs +1 -0
  131. package/dist/cjs/components/flip/flip.cjs.map +1 -1
  132. package/dist/cjs/components/float/float.cjs.map +1 -1
  133. package/dist/cjs/components/focus-lock/focus-lock.cjs.map +1 -1
  134. package/dist/cjs/components/for/for.cjs.map +1 -1
  135. package/dist/cjs/components/form/form.cjs +1 -0
  136. package/dist/cjs/components/form/form.cjs.map +1 -1
  137. package/dist/cjs/components/format/use-format-byte.cjs +1 -0
  138. package/dist/cjs/components/format/use-format-byte.cjs.map +1 -1
  139. package/dist/cjs/components/format/use-format-date-time.cjs +1 -0
  140. package/dist/cjs/components/format/use-format-date-time.cjs.map +1 -1
  141. package/dist/cjs/components/format/use-format-number.cjs +1 -0
  142. package/dist/cjs/components/format/use-format-number.cjs.map +1 -1
  143. package/dist/cjs/components/grid/grid-item.cjs.map +1 -1
  144. package/dist/cjs/components/group/group.cjs.map +1 -1
  145. package/dist/cjs/components/group/use-group.cjs +1 -0
  146. package/dist/cjs/components/group/use-group.cjs.map +1 -1
  147. package/dist/cjs/components/highlight/highlight.cjs +1 -0
  148. package/dist/cjs/components/highlight/highlight.cjs.map +1 -1
  149. package/dist/cjs/components/highlight/use-highlight.cjs +1 -0
  150. package/dist/cjs/components/highlight/use-highlight.cjs.map +1 -1
  151. package/dist/cjs/components/hue-slider/hue-slider.cjs +1 -0
  152. package/dist/cjs/components/hue-slider/hue-slider.cjs.map +1 -1
  153. package/dist/cjs/components/icon/icons/index.cjs +30 -6
  154. package/dist/cjs/components/icon/icons/index.cjs.map +1 -1
  155. package/dist/cjs/components/icon/icons/layout-freeform-icon.cjs +14 -0
  156. package/dist/cjs/components/icon/icons/layout-freeform-icon.cjs.map +1 -0
  157. package/dist/cjs/components/icon/icons/mic-audio-lines-icon.cjs +14 -0
  158. package/dist/cjs/components/icon/icons/mic-audio-lines-icon.cjs.map +1 -0
  159. package/dist/cjs/components/icon/icons/mic-signal-icon.cjs +14 -0
  160. package/dist/cjs/components/icon/icons/mic-signal-icon.cjs.map +1 -0
  161. package/dist/cjs/components/icon/icons/mosque-icon.cjs +14 -0
  162. package/dist/cjs/components/icon/icons/mosque-icon.cjs.map +1 -0
  163. package/dist/cjs/components/icon/icons/rotate-ccw-clock-icon.cjs +14 -0
  164. package/dist/cjs/components/icon/icons/rotate-ccw-clock-icon.cjs.map +1 -0
  165. package/dist/cjs/components/icon/icons/rotate-cw-fading-clock-icon.cjs +14 -0
  166. package/dist/cjs/components/icon/icons/rotate-cw-fading-clock-icon.cjs.map +1 -0
  167. package/dist/cjs/components/icon/icons/scan-square-icon.cjs +14 -0
  168. package/dist/cjs/components/icon/icons/scan-square-icon.cjs.map +1 -0
  169. package/dist/cjs/components/icon/icons/shield-keyhole-icon.cjs +14 -0
  170. package/dist/cjs/components/icon/icons/shield-keyhole-icon.cjs.map +1 -0
  171. package/dist/cjs/components/icon/icons/square-off-icon.cjs +14 -0
  172. package/dist/cjs/components/icon/icons/square-off-icon.cjs.map +1 -0
  173. package/dist/cjs/components/icon/icons/user-shield-icon.cjs +14 -0
  174. package/dist/cjs/components/icon/icons/user-shield-icon.cjs.map +1 -0
  175. package/dist/cjs/components/icon/index.cjs +20 -4
  176. package/dist/cjs/components/indicator/indicator.cjs +1 -0
  177. package/dist/cjs/components/indicator/indicator.cjs.map +1 -1
  178. package/dist/cjs/components/infinite-scroll-area/infinite-scroll-area.cjs +3 -1
  179. package/dist/cjs/components/infinite-scroll-area/infinite-scroll-area.cjs.map +1 -1
  180. package/dist/cjs/components/infinite-scroll-area/use-infinite-scroll.cjs +1 -0
  181. package/dist/cjs/components/infinite-scroll-area/use-infinite-scroll.cjs.map +1 -1
  182. package/dist/cjs/components/input/input-group.cjs +14 -12
  183. package/dist/cjs/components/input/input-group.cjs.map +1 -1
  184. package/dist/cjs/components/input/input.style.cjs.map +1 -1
  185. package/dist/cjs/components/input/use-input-border.cjs +1 -0
  186. package/dist/cjs/components/input/use-input-border.cjs.map +1 -1
  187. package/dist/cjs/components/link-box/link-box.cjs.map +1 -1
  188. package/dist/cjs/components/list/list.cjs +1 -0
  189. package/dist/cjs/components/list/list.cjs.map +1 -1
  190. package/dist/cjs/components/loading/audio.cjs.map +1 -1
  191. package/dist/cjs/components/loading/background.cjs +1 -0
  192. package/dist/cjs/components/loading/background.cjs.map +1 -1
  193. package/dist/cjs/components/loading/circles.cjs.map +1 -1
  194. package/dist/cjs/components/loading/dots.cjs.map +1 -1
  195. package/dist/cjs/components/loading/grid.cjs.map +1 -1
  196. package/dist/cjs/components/loading/loading-provider.cjs +1 -0
  197. package/dist/cjs/components/loading/loading-provider.cjs.map +1 -1
  198. package/dist/cjs/components/loading/oval.cjs.map +1 -1
  199. package/dist/cjs/components/loading/page.cjs +1 -0
  200. package/dist/cjs/components/loading/page.cjs.map +1 -1
  201. package/dist/cjs/components/loading/puff.cjs.map +1 -1
  202. package/dist/cjs/components/loading/rings.cjs.map +1 -1
  203. package/dist/cjs/components/loading/screen.cjs +1 -0
  204. package/dist/cjs/components/loading/screen.cjs.map +1 -1
  205. package/dist/cjs/components/loading/suspense.cjs +1 -0
  206. package/dist/cjs/components/loading/suspense.cjs.map +1 -1
  207. package/dist/cjs/components/loading/use-loading-component.cjs +1 -0
  208. package/dist/cjs/components/loading/use-loading-component.cjs.map +1 -1
  209. package/dist/cjs/components/menu/menu.cjs +13 -10
  210. package/dist/cjs/components/menu/menu.cjs.map +1 -1
  211. package/dist/cjs/components/menu/use-menu.cjs +1 -0
  212. package/dist/cjs/components/menu/use-menu.cjs.map +1 -1
  213. package/dist/cjs/components/modal/modal.cjs +1 -0
  214. package/dist/cjs/components/modal/modal.cjs.map +1 -1
  215. package/dist/cjs/components/modal/use-modal.cjs +1 -0
  216. package/dist/cjs/components/modal/use-modal.cjs.map +1 -1
  217. package/dist/cjs/components/motion/motion.cjs +1 -0
  218. package/dist/cjs/components/motion/motion.cjs.map +1 -1
  219. package/dist/cjs/components/motion/transition.cjs.map +1 -1
  220. package/dist/cjs/components/native-accordion/native-accordion.cjs +1 -0
  221. package/dist/cjs/components/native-accordion/native-accordion.cjs.map +1 -1
  222. package/dist/cjs/components/native-accordion/use-native-accordion.cjs +1 -0
  223. package/dist/cjs/components/native-accordion/use-native-accordion.cjs.map +1 -1
  224. package/dist/cjs/components/native-popover/native-popover.cjs +1 -0
  225. package/dist/cjs/components/native-popover/native-popover.cjs.map +1 -1
  226. package/dist/cjs/components/native-popover/use-native-popover.cjs +1 -0
  227. package/dist/cjs/components/native-popover/use-native-popover.cjs.map +1 -1
  228. package/dist/cjs/components/native-select/native-select.cjs +2 -1
  229. package/dist/cjs/components/native-select/native-select.cjs.map +1 -1
  230. package/dist/cjs/components/native-select/use-native-select.cjs +1 -0
  231. package/dist/cjs/components/native-select/use-native-select.cjs.map +1 -1
  232. package/dist/cjs/components/notice/notice-provider.cjs +1 -0
  233. package/dist/cjs/components/notice/notice-provider.cjs.map +1 -1
  234. package/dist/cjs/components/notice/notice.cjs +1 -0
  235. package/dist/cjs/components/notice/notice.cjs.map +1 -1
  236. package/dist/cjs/components/notice/use-notice.cjs +1 -0
  237. package/dist/cjs/components/notice/use-notice.cjs.map +1 -1
  238. package/dist/cjs/components/number-input/number-input.cjs +2 -1
  239. package/dist/cjs/components/number-input/number-input.cjs.map +1 -1
  240. package/dist/cjs/components/number-input/use-number-counter.cjs +1 -0
  241. package/dist/cjs/components/number-input/use-number-counter.cjs.map +1 -1
  242. package/dist/cjs/components/number-input/use-number-input.cjs +1 -0
  243. package/dist/cjs/components/number-input/use-number-input.cjs.map +1 -1
  244. package/dist/cjs/components/number-input/use-spinner.cjs +1 -0
  245. package/dist/cjs/components/number-input/use-spinner.cjs.map +1 -1
  246. package/dist/cjs/components/pagination/pagination.cjs +1 -0
  247. package/dist/cjs/components/pagination/pagination.cjs.map +1 -1
  248. package/dist/cjs/components/pagination/use-pagination.cjs +1 -0
  249. package/dist/cjs/components/pagination/use-pagination.cjs.map +1 -1
  250. package/dist/cjs/components/password-input/password-input.cjs +2 -1
  251. package/dist/cjs/components/password-input/password-input.cjs.map +1 -1
  252. package/dist/cjs/components/password-input/use-password-input.cjs +1 -0
  253. package/dist/cjs/components/password-input/use-password-input.cjs.map +1 -1
  254. package/dist/cjs/components/password-input/use-strength-meter.cjs +1 -0
  255. package/dist/cjs/components/password-input/use-strength-meter.cjs.map +1 -1
  256. package/dist/cjs/components/picture/picture.cjs +1 -0
  257. package/dist/cjs/components/picture/picture.cjs.map +1 -1
  258. package/dist/cjs/components/pin-input/pin-input.cjs +1 -0
  259. package/dist/cjs/components/pin-input/pin-input.cjs.map +1 -1
  260. package/dist/cjs/components/pin-input/use-pin-input.cjs +1 -0
  261. package/dist/cjs/components/pin-input/use-pin-input.cjs.map +1 -1
  262. package/dist/cjs/components/popover/popover.cjs +1 -0
  263. package/dist/cjs/components/popover/popover.cjs.map +1 -1
  264. package/dist/cjs/components/popover/use-popover.cjs +1 -0
  265. package/dist/cjs/components/popover/use-popover.cjs.map +1 -1
  266. package/dist/cjs/components/portal/portal.cjs +1 -0
  267. package/dist/cjs/components/portal/portal.cjs.map +1 -1
  268. package/dist/cjs/components/progress/progress.cjs.map +1 -1
  269. package/dist/cjs/components/progress/use-progress.cjs +1 -0
  270. package/dist/cjs/components/progress/use-progress.cjs.map +1 -1
  271. package/dist/cjs/components/qr-code/qr-code.cjs +1 -0
  272. package/dist/cjs/components/qr-code/qr-code.cjs.map +1 -1
  273. package/dist/cjs/components/qr-code/use-qr-code.cjs +1 -0
  274. package/dist/cjs/components/qr-code/use-qr-code.cjs.map +1 -1
  275. package/dist/cjs/components/radio/radio-group.cjs +37 -34
  276. package/dist/cjs/components/radio/radio-group.cjs.map +1 -1
  277. package/dist/cjs/components/radio/radio.cjs +1 -0
  278. package/dist/cjs/components/radio/radio.cjs.map +1 -1
  279. package/dist/cjs/components/radio/use-radio-group.cjs +1 -0
  280. package/dist/cjs/components/radio/use-radio-group.cjs.map +1 -1
  281. package/dist/cjs/components/radio/use-radio.cjs +3 -1
  282. package/dist/cjs/components/radio/use-radio.cjs.map +1 -1
  283. package/dist/cjs/components/radio-card/radio-card-group.cjs +41 -38
  284. package/dist/cjs/components/radio-card/radio-card-group.cjs.map +1 -1
  285. package/dist/cjs/components/radio-card/radio-card.cjs +1 -0
  286. package/dist/cjs/components/radio-card/radio-card.cjs.map +1 -1
  287. package/dist/cjs/components/rating/rating.cjs +1 -0
  288. package/dist/cjs/components/rating/rating.cjs.map +1 -1
  289. package/dist/cjs/components/rating/use-rating.cjs +1 -0
  290. package/dist/cjs/components/rating/use-rating.cjs.map +1 -1
  291. package/dist/cjs/components/reorder/use-reorder.cjs +1 -0
  292. package/dist/cjs/components/reorder/use-reorder.cjs.map +1 -1
  293. package/dist/cjs/components/resizable/resizable.cjs +13 -10
  294. package/dist/cjs/components/resizable/resizable.cjs.map +1 -1
  295. package/dist/cjs/components/resizable/use-resizable.cjs +1 -0
  296. package/dist/cjs/components/resizable/use-resizable.cjs.map +1 -1
  297. package/dist/cjs/components/ripple/ripple.cjs.map +1 -1
  298. package/dist/cjs/components/ripple/use-ripple.cjs +1 -0
  299. package/dist/cjs/components/ripple/use-ripple.cjs.map +1 -1
  300. package/dist/cjs/components/rotate/rotate.cjs +1 -0
  301. package/dist/cjs/components/rotate/rotate.cjs.map +1 -1
  302. package/dist/cjs/components/saturation-slider/saturation-slider.cjs +1 -0
  303. package/dist/cjs/components/saturation-slider/saturation-slider.cjs.map +1 -1
  304. package/dist/cjs/components/saturation-slider/use-saturation-slider.cjs +1 -0
  305. package/dist/cjs/components/saturation-slider/use-saturation-slider.cjs.map +1 -1
  306. package/dist/cjs/components/scroll-area/use-scroll-area.cjs +1 -0
  307. package/dist/cjs/components/scroll-area/use-scroll-area.cjs.map +1 -1
  308. package/dist/cjs/components/segmented-control/segmented-control.cjs +3 -1
  309. package/dist/cjs/components/segmented-control/segmented-control.cjs.map +1 -1
  310. package/dist/cjs/components/segmented-control/use-segmented-control.cjs +1 -0
  311. package/dist/cjs/components/segmented-control/use-segmented-control.cjs.map +1 -1
  312. package/dist/cjs/components/select/select.cjs +14 -10
  313. package/dist/cjs/components/select/select.cjs.map +1 -1
  314. package/dist/cjs/components/select/use-select.cjs +1 -0
  315. package/dist/cjs/components/select/use-select.cjs.map +1 -1
  316. package/dist/cjs/components/show/show.cjs +1 -0
  317. package/dist/cjs/components/show/show.cjs.map +1 -1
  318. package/dist/cjs/components/sidebar/sidebar.cjs +6 -3
  319. package/dist/cjs/components/sidebar/sidebar.cjs.map +1 -1
  320. package/dist/cjs/components/sidebar/use-sidebar.cjs +1 -0
  321. package/dist/cjs/components/sidebar/use-sidebar.cjs.map +1 -1
  322. package/dist/cjs/components/simple-grid/simple-grid.cjs +1 -0
  323. package/dist/cjs/components/simple-grid/simple-grid.cjs.map +1 -1
  324. package/dist/cjs/components/skeleton/skeleton.cjs.map +1 -1
  325. package/dist/cjs/components/slide/slide.cjs +1 -0
  326. package/dist/cjs/components/slide/slide.cjs.map +1 -1
  327. package/dist/cjs/components/slide-fade/slide-fade.cjs +1 -0
  328. package/dist/cjs/components/slide-fade/slide-fade.cjs.map +1 -1
  329. package/dist/cjs/components/slider/slider.cjs +3 -1
  330. package/dist/cjs/components/slider/slider.cjs.map +1 -1
  331. package/dist/cjs/components/slider/use-slider.cjs +3 -1
  332. package/dist/cjs/components/slider/use-slider.cjs.map +1 -1
  333. package/dist/cjs/components/slot/slot.cjs +1 -0
  334. package/dist/cjs/components/slot/slot.cjs.map +1 -1
  335. package/dist/cjs/components/snacks/snacks.cjs +1 -0
  336. package/dist/cjs/components/snacks/snacks.cjs.map +1 -1
  337. package/dist/cjs/components/snacks/use-snacks.cjs +1 -0
  338. package/dist/cjs/components/snacks/use-snacks.cjs.map +1 -1
  339. package/dist/cjs/components/stack/stack.cjs +1 -0
  340. package/dist/cjs/components/stack/stack.cjs.map +1 -1
  341. package/dist/cjs/components/stack/z-stack.cjs +5 -2
  342. package/dist/cjs/components/stack/z-stack.cjs.map +1 -1
  343. package/dist/cjs/components/steps/steps.cjs +51 -47
  344. package/dist/cjs/components/steps/steps.cjs.map +1 -1
  345. package/dist/cjs/components/steps/use-steps.cjs +1 -0
  346. package/dist/cjs/components/steps/use-steps.cjs.map +1 -1
  347. package/dist/cjs/components/switch/switch.cjs.map +1 -1
  348. package/dist/cjs/components/switch/use-switch.cjs +1 -0
  349. package/dist/cjs/components/switch/use-switch.cjs.map +1 -1
  350. package/dist/cjs/components/table/table.cjs +51 -49
  351. package/dist/cjs/components/table/table.cjs.map +1 -1
  352. package/dist/cjs/components/tabs/tabs.cjs +23 -20
  353. package/dist/cjs/components/tabs/tabs.cjs.map +1 -1
  354. package/dist/cjs/components/tabs/use-tabs.cjs +1 -0
  355. package/dist/cjs/components/tabs/use-tabs.cjs.map +1 -1
  356. package/dist/cjs/components/tag/tag.cjs +1 -0
  357. package/dist/cjs/components/tag/tag.cjs.map +1 -1
  358. package/dist/cjs/components/textarea/use-autosize.cjs +1 -0
  359. package/dist/cjs/components/textarea/use-autosize.cjs.map +1 -1
  360. package/dist/cjs/components/textarea/use-textarea.cjs +1 -0
  361. package/dist/cjs/components/textarea/use-textarea.cjs.map +1 -1
  362. package/dist/cjs/components/timeline/timeline.cjs +1 -0
  363. package/dist/cjs/components/timeline/timeline.cjs.map +1 -1
  364. package/dist/cjs/components/tip/tip.cjs.map +1 -1
  365. package/dist/cjs/components/toggle/toggle-group.cjs +27 -24
  366. package/dist/cjs/components/toggle/toggle-group.cjs.map +1 -1
  367. package/dist/cjs/components/toggle/use-toggle-group.cjs +1 -0
  368. package/dist/cjs/components/toggle/use-toggle-group.cjs.map +1 -1
  369. package/dist/cjs/components/toggle/use-toggle.cjs +1 -0
  370. package/dist/cjs/components/toggle/use-toggle.cjs.map +1 -1
  371. package/dist/cjs/components/tooltip/tooltip.cjs.map +1 -1
  372. package/dist/cjs/components/tooltip/use-tooltip.cjs +1 -0
  373. package/dist/cjs/components/tooltip/use-tooltip.cjs.map +1 -1
  374. package/dist/cjs/components/tree/tree.cjs +1 -0
  375. package/dist/cjs/components/tree/tree.cjs.map +1 -1
  376. package/dist/cjs/components/tree/use-tree.cjs +1 -0
  377. package/dist/cjs/components/tree/use-tree.cjs.map +1 -1
  378. package/dist/cjs/core/components/create-component.cjs +5 -2
  379. package/dist/cjs/core/components/create-component.cjs.map +1 -1
  380. package/dist/cjs/core/components/props.cjs.map +1 -1
  381. package/dist/cjs/core/components/use-component-style.cjs +11 -6
  382. package/dist/cjs/core/components/use-component-style.cjs.map +1 -1
  383. package/dist/cjs/core/components/utils.cjs.map +1 -1
  384. package/dist/cjs/core/css/animation.cjs.map +1 -1
  385. package/dist/cjs/core/css/at-rule.cjs.map +1 -1
  386. package/dist/cjs/core/css/calc.cjs.map +1 -1
  387. package/dist/cjs/core/css/color-mix.cjs.map +1 -1
  388. package/dist/cjs/core/css/color-scheme.cjs.map +1 -1
  389. package/dist/cjs/core/css/config.cjs.map +1 -1
  390. package/dist/cjs/core/css/css.cjs +5 -3
  391. package/dist/cjs/core/css/css.cjs.map +1 -1
  392. package/dist/cjs/core/css/gradient.cjs.map +1 -1
  393. package/dist/cjs/core/css/merge-css.cjs.map +1 -1
  394. package/dist/cjs/core/css/style.cjs.map +1 -1
  395. package/dist/cjs/core/css/use-css.cjs +1 -0
  396. package/dist/cjs/core/css/use-css.cjs.map +1 -1
  397. package/dist/cjs/core/css/use-inject-vars.cjs +1 -0
  398. package/dist/cjs/core/css/use-inject-vars.cjs.map +1 -1
  399. package/dist/cjs/core/css/utils.cjs.map +1 -1
  400. package/dist/cjs/core/system/breakpoint.cjs.map +1 -1
  401. package/dist/cjs/core/system/color-mode-provider.cjs +1 -0
  402. package/dist/cjs/core/system/color-mode-provider.cjs.map +1 -1
  403. package/dist/cjs/core/system/create-system.cjs.map +1 -1
  404. package/dist/cjs/core/system/environment-provider.cjs +1 -0
  405. package/dist/cjs/core/system/environment-provider.cjs.map +1 -1
  406. package/dist/cjs/core/system/layer.cjs.map +1 -1
  407. package/dist/cjs/core/system/storage-script.cjs.map +1 -1
  408. package/dist/cjs/core/system/styled.cjs.map +1 -1
  409. package/dist/cjs/core/system/system-provider.cjs +1 -0
  410. package/dist/cjs/core/system/system-provider.cjs.map +1 -1
  411. package/dist/cjs/core/system/theme-provider.cjs +5 -3
  412. package/dist/cjs/core/system/theme-provider.cjs.map +1 -1
  413. package/dist/cjs/core/system/use-system-color-mode.cjs +1 -0
  414. package/dist/cjs/core/system/use-system-color-mode.cjs.map +1 -1
  415. package/dist/cjs/core/system/var.cjs +2 -1
  416. package/dist/cjs/core/system/var.cjs.map +1 -1
  417. package/dist/cjs/hooks/use-animation/index.cjs +4 -2
  418. package/dist/cjs/hooks/use-animation/index.cjs.map +1 -1
  419. package/dist/cjs/hooks/use-async/index.cjs +1 -0
  420. package/dist/cjs/hooks/use-async/index.cjs.map +1 -1
  421. package/dist/cjs/hooks/use-async-callback/index.cjs +1 -0
  422. package/dist/cjs/hooks/use-async-callback/index.cjs.map +1 -1
  423. package/dist/cjs/hooks/use-boolean/index.cjs +1 -0
  424. package/dist/cjs/hooks/use-boolean/index.cjs.map +1 -1
  425. package/dist/cjs/hooks/use-breakpoint/use-breakpoint-effect.cjs +1 -0
  426. package/dist/cjs/hooks/use-breakpoint/use-breakpoint-effect.cjs.map +1 -1
  427. package/dist/cjs/hooks/use-breakpoint/use-breakpoint-state.cjs +3 -1
  428. package/dist/cjs/hooks/use-breakpoint/use-breakpoint-state.cjs.map +1 -1
  429. package/dist/cjs/hooks/use-breakpoint/use-breakpoint-value.cjs +1 -0
  430. package/dist/cjs/hooks/use-breakpoint/use-breakpoint-value.cjs.map +1 -1
  431. package/dist/cjs/hooks/use-breakpoint/use-breakpoint.cjs +1 -0
  432. package/dist/cjs/hooks/use-breakpoint/use-breakpoint.cjs.map +1 -1
  433. package/dist/cjs/hooks/use-clickable/index.cjs +1 -0
  434. package/dist/cjs/hooks/use-clickable/index.cjs.map +1 -1
  435. package/dist/cjs/hooks/use-clipboard/index.cjs.map +1 -1
  436. package/dist/cjs/hooks/use-combobox/index.cjs.map +1 -1
  437. package/dist/cjs/hooks/use-controllable-state/index.cjs +1 -0
  438. package/dist/cjs/hooks/use-controllable-state/index.cjs.map +1 -1
  439. package/dist/cjs/hooks/use-counter/index.cjs +1 -0
  440. package/dist/cjs/hooks/use-counter/index.cjs.map +1 -1
  441. package/dist/cjs/hooks/use-descendants/index.cjs +1 -0
  442. package/dist/cjs/hooks/use-descendants/index.cjs.map +1 -1
  443. package/dist/cjs/hooks/use-disclosure/use-disclosure.cjs +1 -0
  444. package/dist/cjs/hooks/use-disclosure/use-disclosure.cjs.map +1 -1
  445. package/dist/cjs/hooks/use-disclosure/use-promise-disclosure.cjs +1 -0
  446. package/dist/cjs/hooks/use-disclosure/use-promise-disclosure.cjs.map +1 -1
  447. package/dist/cjs/hooks/use-event-listener/index.cjs +1 -0
  448. package/dist/cjs/hooks/use-event-listener/index.cjs.map +1 -1
  449. package/dist/cjs/hooks/use-eye-dropper/index.cjs +1 -0
  450. package/dist/cjs/hooks/use-eye-dropper/index.cjs.map +1 -1
  451. package/dist/cjs/hooks/use-field-sizing/index.cjs +1 -0
  452. package/dist/cjs/hooks/use-field-sizing/index.cjs.map +1 -1
  453. package/dist/cjs/hooks/use-focus/index.cjs +3 -1
  454. package/dist/cjs/hooks/use-focus/index.cjs.map +1 -1
  455. package/dist/cjs/hooks/use-hover/index.cjs +1 -0
  456. package/dist/cjs/hooks/use-hover/index.cjs.map +1 -1
  457. package/dist/cjs/hooks/use-idle/index.cjs +1 -0
  458. package/dist/cjs/hooks/use-idle/index.cjs.map +1 -1
  459. package/dist/cjs/hooks/use-interval/index.cjs +1 -0
  460. package/dist/cjs/hooks/use-interval/index.cjs.map +1 -1
  461. package/dist/cjs/hooks/use-lazy-mount/index.cjs +1 -0
  462. package/dist/cjs/hooks/use-lazy-mount/index.cjs.map +1 -1
  463. package/dist/cjs/hooks/use-local-storage/index.cjs +1 -0
  464. package/dist/cjs/hooks/use-local-storage/index.cjs.map +1 -1
  465. package/dist/cjs/hooks/use-media-query/index.cjs +1 -0
  466. package/dist/cjs/hooks/use-media-query/index.cjs.map +1 -1
  467. package/dist/cjs/hooks/use-mounted/index.cjs +1 -0
  468. package/dist/cjs/hooks/use-mounted/index.cjs.map +1 -1
  469. package/dist/cjs/hooks/use-online/index.cjs +1 -0
  470. package/dist/cjs/hooks/use-online/index.cjs.map +1 -1
  471. package/dist/cjs/hooks/use-os/index.cjs.map +1 -1
  472. package/dist/cjs/hooks/use-outside-click/index.cjs +1 -0
  473. package/dist/cjs/hooks/use-outside-click/index.cjs.map +1 -1
  474. package/dist/cjs/hooks/use-pan-event/index.cjs +1 -0
  475. package/dist/cjs/hooks/use-pan-event/index.cjs.map +1 -1
  476. package/dist/cjs/hooks/use-popper/index.cjs +1 -0
  477. package/dist/cjs/hooks/use-popper/index.cjs.map +1 -1
  478. package/dist/cjs/hooks/use-previous/index.cjs +1 -0
  479. package/dist/cjs/hooks/use-previous/index.cjs.map +1 -1
  480. package/dist/cjs/hooks/use-processing/index.cjs +1 -0
  481. package/dist/cjs/hooks/use-processing/index.cjs.map +1 -1
  482. package/dist/cjs/hooks/use-resize-observer/index.cjs +1 -0
  483. package/dist/cjs/hooks/use-resize-observer/index.cjs.map +1 -1
  484. package/dist/cjs/hooks/use-timeout/index.cjs +1 -0
  485. package/dist/cjs/hooks/use-timeout/index.cjs.map +1 -1
  486. package/dist/cjs/hooks/use-value/index.cjs +1 -0
  487. package/dist/cjs/hooks/use-value/index.cjs.map +1 -1
  488. package/dist/cjs/hooks/use-window-event/index.cjs +1 -0
  489. package/dist/cjs/hooks/use-window-event/index.cjs.map +1 -1
  490. package/dist/cjs/index.cjs +30 -6
  491. package/dist/cjs/providers/i18n-provider/i18n-provider.cjs.map +1 -1
  492. package/dist/cjs/providers/ui-provider/ui-provider.cjs.map +1 -1
  493. package/dist/cjs/utils/children.cjs.map +1 -1
  494. package/dist/cjs/utils/context.cjs.map +1 -1
  495. package/dist/cjs/utils/dom.cjs.map +1 -1
  496. package/dist/cjs/utils/ref.cjs.map +1 -1
  497. package/dist/cjs/utils/ssr.cjs +1 -0
  498. package/dist/cjs/utils/ssr.cjs.map +1 -1
  499. package/dist/cjs/utils/store.cjs +1 -0
  500. package/dist/cjs/utils/store.cjs.map +1 -1
  501. package/dist/esm/components/accordion/accordion.js +3 -2
  502. package/dist/esm/components/accordion/accordion.js.map +1 -1
  503. package/dist/esm/components/accordion/use-accordion.js.map +1 -1
  504. package/dist/esm/components/action-bar/action-bar.js.map +1 -1
  505. package/dist/esm/components/action-bar/use-action-bar.js.map +1 -1
  506. package/dist/esm/components/airy/airy.js.map +1 -1
  507. package/dist/esm/components/alert/alert.js +4 -2
  508. package/dist/esm/components/alert/alert.js.map +1 -1
  509. package/dist/esm/components/alpha-slider/alpha-slider.js.map +1 -1
  510. package/dist/esm/components/aspect-ratio/aspect-ratio.js.map +1 -1
  511. package/dist/esm/components/autocomplete/autocomplete.js +13 -10
  512. package/dist/esm/components/autocomplete/autocomplete.js.map +1 -1
  513. package/dist/esm/components/autocomplete/use-autocomplete.js.map +1 -1
  514. package/dist/esm/components/avatar/avatar-group.js +12 -11
  515. package/dist/esm/components/avatar/avatar-group.js.map +1 -1
  516. package/dist/esm/components/avatar/use-avatar-group.js.map +1 -1
  517. package/dist/esm/components/avatar/use-avatar.js.map +1 -1
  518. package/dist/esm/components/breadcrumb/use-breadcrumb.js.map +1 -1
  519. package/dist/esm/components/button/button.js +8 -5
  520. package/dist/esm/components/button/button.js.map +1 -1
  521. package/dist/esm/components/calendar/calendar.js.map +1 -1
  522. package/dist/esm/components/calendar/use-calendar.js.map +1 -1
  523. package/dist/esm/components/carousel/carousel.js +26 -25
  524. package/dist/esm/components/carousel/carousel.js.map +1 -1
  525. package/dist/esm/components/carousel/use-carousel.js.map +1 -1
  526. package/dist/esm/components/chart/area-chart.js +5 -4
  527. package/dist/esm/components/chart/area-chart.js.map +1 -1
  528. package/dist/esm/components/chart/bar-chart.js +5 -4
  529. package/dist/esm/components/chart/bar-chart.js.map +1 -1
  530. package/dist/esm/components/chart/cartesian-chart.js +145 -139
  531. package/dist/esm/components/chart/cartesian-chart.js.map +1 -1
  532. package/dist/esm/components/chart/chart.js +2 -1
  533. package/dist/esm/components/chart/chart.js.map +1 -1
  534. package/dist/esm/components/chart/composed-chart.js +15 -14
  535. package/dist/esm/components/chart/composed-chart.js.map +1 -1
  536. package/dist/esm/components/chart/donut-chart.js +7 -5
  537. package/dist/esm/components/chart/donut-chart.js.map +1 -1
  538. package/dist/esm/components/chart/line-chart.js +5 -4
  539. package/dist/esm/components/chart/line-chart.js.map +1 -1
  540. package/dist/esm/components/chart/pie-chart.js +7 -5
  541. package/dist/esm/components/chart/pie-chart.js.map +1 -1
  542. package/dist/esm/components/chart/polar-chart.js +118 -111
  543. package/dist/esm/components/chart/polar-chart.js.map +1 -1
  544. package/dist/esm/components/chart/radar-chart.js +5 -4
  545. package/dist/esm/components/chart/radar-chart.js.map +1 -1
  546. package/dist/esm/components/chart/use-cartesian-chart.js.map +1 -1
  547. package/dist/esm/components/chart/use-chart.js.map +1 -1
  548. package/dist/esm/components/chart/use-polar-chart.js.map +1 -1
  549. package/dist/esm/components/checkbox/checkbox-group.js +38 -36
  550. package/dist/esm/components/checkbox/checkbox-group.js.map +1 -1
  551. package/dist/esm/components/checkbox/use-checkbox-group.js.map +1 -1
  552. package/dist/esm/components/checkbox/use-checkbox.js +2 -1
  553. package/dist/esm/components/checkbox/use-checkbox.js.map +1 -1
  554. package/dist/esm/components/checkbox-card/checkbox-card-group.js +42 -40
  555. package/dist/esm/components/checkbox-card/checkbox-card-group.js.map +1 -1
  556. package/dist/esm/components/circle-progress/circle-progress.js.map +1 -1
  557. package/dist/esm/components/client-only/client-only.js +2 -1
  558. package/dist/esm/components/client-only/client-only.js.map +1 -1
  559. package/dist/esm/components/collapse/collapse.js.map +1 -1
  560. package/dist/esm/components/color-picker/color-picker.js +2 -1
  561. package/dist/esm/components/color-picker/color-picker.js.map +1 -1
  562. package/dist/esm/components/color-picker/use-color-picker.js.map +1 -1
  563. package/dist/esm/components/color-selector/color-selector.js +2 -1
  564. package/dist/esm/components/color-selector/color-selector.js.map +1 -1
  565. package/dist/esm/components/color-selector/use-color-selector.js.map +1 -1
  566. package/dist/esm/components/color-swatch/color-swatch.js.map +1 -1
  567. package/dist/esm/components/data-list/data-list.js +8 -5
  568. package/dist/esm/components/data-list/data-list.js.map +1 -1
  569. package/dist/esm/components/date-picker/date-picker.js +2 -1
  570. package/dist/esm/components/date-picker/date-picker.js.map +1 -1
  571. package/dist/esm/components/date-picker/use-date-picker.js.map +1 -1
  572. package/dist/esm/components/drawer/drawer.js.map +1 -1
  573. package/dist/esm/components/drawer/use-drawer.js +1 -3
  574. package/dist/esm/components/drawer/use-drawer.js.map +1 -1
  575. package/dist/esm/components/dropzone/dropzone.js +2 -1
  576. package/dist/esm/components/dropzone/dropzone.js.map +1 -1
  577. package/dist/esm/components/dropzone/use-dropzone.js.map +1 -1
  578. package/dist/esm/components/editable/editable.js.map +1 -1
  579. package/dist/esm/components/editable/use-editable.js.map +1 -1
  580. package/dist/esm/components/field/field.js.map +1 -1
  581. package/dist/esm/components/field/use-field-props.js.map +1 -1
  582. package/dist/esm/components/fieldset/fieldset.js.map +1 -1
  583. package/dist/esm/components/file-input/file-input.js +2 -1
  584. package/dist/esm/components/file-input/file-input.js.map +1 -1
  585. package/dist/esm/components/file-input/use-file-input.js.map +1 -1
  586. package/dist/esm/components/flip/flip.js.map +1 -1
  587. package/dist/esm/components/float/float.js.map +1 -1
  588. package/dist/esm/components/focus-lock/focus-lock.js.map +1 -1
  589. package/dist/esm/components/for/for.js.map +1 -1
  590. package/dist/esm/components/form/form.js.map +1 -1
  591. package/dist/esm/components/grid/grid-item.js.map +1 -1
  592. package/dist/esm/components/group/group.js.map +1 -1
  593. package/dist/esm/components/group/use-group.js.map +1 -1
  594. package/dist/esm/components/highlight/use-highlight.js.map +1 -1
  595. package/dist/esm/components/icon/icons/index.js +21 -5
  596. package/dist/esm/components/icon/icons/index.js.map +1 -1
  597. package/dist/esm/components/icon/icons/layout-freeform-icon.js +14 -0
  598. package/dist/esm/components/icon/icons/layout-freeform-icon.js.map +1 -0
  599. package/dist/esm/components/icon/icons/mic-audio-lines-icon.js +14 -0
  600. package/dist/esm/components/icon/icons/mic-audio-lines-icon.js.map +1 -0
  601. package/dist/esm/components/icon/icons/mic-signal-icon.js +14 -0
  602. package/dist/esm/components/icon/icons/mic-signal-icon.js.map +1 -0
  603. package/dist/esm/components/icon/icons/mosque-icon.js +14 -0
  604. package/dist/esm/components/icon/icons/mosque-icon.js.map +1 -0
  605. package/dist/esm/components/icon/icons/rotate-ccw-clock-icon.js +14 -0
  606. package/dist/esm/components/icon/icons/rotate-ccw-clock-icon.js.map +1 -0
  607. package/dist/esm/components/icon/icons/rotate-cw-fading-clock-icon.js +14 -0
  608. package/dist/esm/components/icon/icons/rotate-cw-fading-clock-icon.js.map +1 -0
  609. package/dist/esm/components/icon/icons/scan-square-icon.js +14 -0
  610. package/dist/esm/components/icon/icons/scan-square-icon.js.map +1 -0
  611. package/dist/esm/components/icon/icons/shield-keyhole-icon.js +14 -0
  612. package/dist/esm/components/icon/icons/shield-keyhole-icon.js.map +1 -0
  613. package/dist/esm/components/icon/icons/square-off-icon.js +14 -0
  614. package/dist/esm/components/icon/icons/square-off-icon.js.map +1 -0
  615. package/dist/esm/components/icon/icons/user-shield-icon.js +14 -0
  616. package/dist/esm/components/icon/icons/user-shield-icon.js.map +1 -0
  617. package/dist/esm/components/icon/index.js +11 -3
  618. package/dist/esm/components/indicator/indicator.js.map +1 -1
  619. package/dist/esm/components/infinite-scroll-area/infinite-scroll-area.js +2 -1
  620. package/dist/esm/components/infinite-scroll-area/infinite-scroll-area.js.map +1 -1
  621. package/dist/esm/components/input/input-group.js +13 -12
  622. package/dist/esm/components/input/input-group.js.map +1 -1
  623. package/dist/esm/components/input/input.style.js.map +1 -1
  624. package/dist/esm/components/link-box/link-box.js.map +1 -1
  625. package/dist/esm/components/loading/audio.js.map +1 -1
  626. package/dist/esm/components/loading/circles.js.map +1 -1
  627. package/dist/esm/components/loading/dots.js.map +1 -1
  628. package/dist/esm/components/loading/grid.js.map +1 -1
  629. package/dist/esm/components/loading/loading-provider.js.map +1 -1
  630. package/dist/esm/components/loading/oval.js.map +1 -1
  631. package/dist/esm/components/loading/puff.js.map +1 -1
  632. package/dist/esm/components/loading/rings.js.map +1 -1
  633. package/dist/esm/components/loading/use-loading-component.js.map +1 -1
  634. package/dist/esm/components/menu/menu.js +12 -10
  635. package/dist/esm/components/menu/menu.js.map +1 -1
  636. package/dist/esm/components/menu/use-menu.js.map +1 -1
  637. package/dist/esm/components/modal/modal.js.map +1 -1
  638. package/dist/esm/components/modal/use-modal.js.map +1 -1
  639. package/dist/esm/components/motion/motion.js.map +1 -1
  640. package/dist/esm/components/motion/transition.js.map +1 -1
  641. package/dist/esm/components/native-accordion/use-native-accordion.js.map +1 -1
  642. package/dist/esm/components/native-popover/native-popover.js.map +1 -1
  643. package/dist/esm/components/native-popover/use-native-popover.js.map +1 -1
  644. package/dist/esm/components/native-select/native-select.js +2 -1
  645. package/dist/esm/components/native-select/native-select.js.map +1 -1
  646. package/dist/esm/components/native-select/use-native-select.js.map +1 -1
  647. package/dist/esm/components/notice/notice.js.map +1 -1
  648. package/dist/esm/components/notice/use-notice.js.map +1 -1
  649. package/dist/esm/components/number-input/number-input.js +2 -1
  650. package/dist/esm/components/number-input/number-input.js.map +1 -1
  651. package/dist/esm/components/number-input/use-number-counter.js.map +1 -1
  652. package/dist/esm/components/number-input/use-number-input.js.map +1 -1
  653. package/dist/esm/components/pagination/pagination.js.map +1 -1
  654. package/dist/esm/components/pagination/use-pagination.js.map +1 -1
  655. package/dist/esm/components/password-input/password-input.js +2 -1
  656. package/dist/esm/components/password-input/password-input.js.map +1 -1
  657. package/dist/esm/components/password-input/use-password-input.js.map +1 -1
  658. package/dist/esm/components/password-input/use-strength-meter.js.map +1 -1
  659. package/dist/esm/components/picture/picture.js.map +1 -1
  660. package/dist/esm/components/pin-input/use-pin-input.js.map +1 -1
  661. package/dist/esm/components/popover/popover.js.map +1 -1
  662. package/dist/esm/components/popover/use-popover.js.map +1 -1
  663. package/dist/esm/components/portal/portal.js.map +1 -1
  664. package/dist/esm/components/progress/progress.js.map +1 -1
  665. package/dist/esm/components/progress/use-progress.js.map +1 -1
  666. package/dist/esm/components/radio/radio-group.js +36 -34
  667. package/dist/esm/components/radio/radio-group.js.map +1 -1
  668. package/dist/esm/components/radio/use-radio-group.js.map +1 -1
  669. package/dist/esm/components/radio/use-radio.js +2 -1
  670. package/dist/esm/components/radio/use-radio.js.map +1 -1
  671. package/dist/esm/components/radio-card/radio-card-group.js +40 -38
  672. package/dist/esm/components/radio-card/radio-card-group.js.map +1 -1
  673. package/dist/esm/components/rating/rating.js.map +1 -1
  674. package/dist/esm/components/rating/use-rating.js.map +1 -1
  675. package/dist/esm/components/reorder/use-reorder.js.map +1 -1
  676. package/dist/esm/components/resizable/resizable.js +12 -10
  677. package/dist/esm/components/resizable/resizable.js.map +1 -1
  678. package/dist/esm/components/resizable/use-resizable.js.map +1 -1
  679. package/dist/esm/components/ripple/ripple.js.map +1 -1
  680. package/dist/esm/components/ripple/use-ripple.js.map +1 -1
  681. package/dist/esm/components/rotate/rotate.js.map +1 -1
  682. package/dist/esm/components/saturation-slider/use-saturation-slider.js.map +1 -1
  683. package/dist/esm/components/scroll-area/use-scroll-area.js.map +1 -1
  684. package/dist/esm/components/segmented-control/segmented-control.js +2 -1
  685. package/dist/esm/components/segmented-control/segmented-control.js.map +1 -1
  686. package/dist/esm/components/segmented-control/use-segmented-control.js.map +1 -1
  687. package/dist/esm/components/select/select.js +13 -10
  688. package/dist/esm/components/select/select.js.map +1 -1
  689. package/dist/esm/components/select/use-select.js.map +1 -1
  690. package/dist/esm/components/show/show.js.map +1 -1
  691. package/dist/esm/components/sidebar/sidebar.js +5 -3
  692. package/dist/esm/components/sidebar/sidebar.js.map +1 -1
  693. package/dist/esm/components/sidebar/use-sidebar.js.map +1 -1
  694. package/dist/esm/components/simple-grid/simple-grid.js.map +1 -1
  695. package/dist/esm/components/skeleton/skeleton.js.map +1 -1
  696. package/dist/esm/components/slider/slider.js +2 -1
  697. package/dist/esm/components/slider/slider.js.map +1 -1
  698. package/dist/esm/components/slider/use-slider.js +2 -1
  699. package/dist/esm/components/slider/use-slider.js.map +1 -1
  700. package/dist/esm/components/snacks/snacks.js.map +1 -1
  701. package/dist/esm/components/stack/stack.js.map +1 -1
  702. package/dist/esm/components/stack/z-stack.js +4 -2
  703. package/dist/esm/components/stack/z-stack.js.map +1 -1
  704. package/dist/esm/components/steps/steps.js +50 -47
  705. package/dist/esm/components/steps/steps.js.map +1 -1
  706. package/dist/esm/components/steps/use-steps.js.map +1 -1
  707. package/dist/esm/components/switch/switch.js.map +1 -1
  708. package/dist/esm/components/switch/use-switch.js.map +1 -1
  709. package/dist/esm/components/table/table.js +50 -49
  710. package/dist/esm/components/table/table.js.map +1 -1
  711. package/dist/esm/components/tabs/tabs.js +22 -20
  712. package/dist/esm/components/tabs/tabs.js.map +1 -1
  713. package/dist/esm/components/tabs/use-tabs.js.map +1 -1
  714. package/dist/esm/components/tag/tag.js.map +1 -1
  715. package/dist/esm/components/textarea/use-autosize.js.map +1 -1
  716. package/dist/esm/components/timeline/timeline.js.map +1 -1
  717. package/dist/esm/components/tip/tip.js.map +1 -1
  718. package/dist/esm/components/toggle/toggle-group.js +26 -24
  719. package/dist/esm/components/toggle/toggle-group.js.map +1 -1
  720. package/dist/esm/components/toggle/use-toggle-group.js.map +1 -1
  721. package/dist/esm/components/toggle/use-toggle.js.map +1 -1
  722. package/dist/esm/components/tooltip/tooltip.js.map +1 -1
  723. package/dist/esm/components/tooltip/use-tooltip.js.map +1 -1
  724. package/dist/esm/components/tree/tree.js.map +1 -1
  725. package/dist/esm/components/tree/use-tree.js.map +1 -1
  726. package/dist/esm/core/components/create-component.js +4 -2
  727. package/dist/esm/core/components/create-component.js.map +1 -1
  728. package/dist/esm/core/components/props.js.map +1 -1
  729. package/dist/esm/core/components/use-component-style.js +10 -6
  730. package/dist/esm/core/components/use-component-style.js.map +1 -1
  731. package/dist/esm/core/components/utils.js.map +1 -1
  732. package/dist/esm/core/css/animation.js.map +1 -1
  733. package/dist/esm/core/css/at-rule.js.map +1 -1
  734. package/dist/esm/core/css/calc.js.map +1 -1
  735. package/dist/esm/core/css/color-mix.js.map +1 -1
  736. package/dist/esm/core/css/color-scheme.js.map +1 -1
  737. package/dist/esm/core/css/config.js.map +1 -1
  738. package/dist/esm/core/css/css.js +5 -3
  739. package/dist/esm/core/css/css.js.map +1 -1
  740. package/dist/esm/core/css/gradient.js.map +1 -1
  741. package/dist/esm/core/css/merge-css.js.map +1 -1
  742. package/dist/esm/core/css/style.js.map +1 -1
  743. package/dist/esm/core/css/use-css.js.map +1 -1
  744. package/dist/esm/core/css/utils.js.map +1 -1
  745. package/dist/esm/core/system/breakpoint.js.map +1 -1
  746. package/dist/esm/core/system/color-mode-provider.js.map +1 -1
  747. package/dist/esm/core/system/create-system.js.map +1 -1
  748. package/dist/esm/core/system/environment-provider.js.map +1 -1
  749. package/dist/esm/core/system/layer.js.map +1 -1
  750. package/dist/esm/core/system/storage-script.js.map +1 -1
  751. package/dist/esm/core/system/styled.js.map +1 -1
  752. package/dist/esm/core/system/theme-provider.js +4 -3
  753. package/dist/esm/core/system/theme-provider.js.map +1 -1
  754. package/dist/esm/core/system/use-system-color-mode.js.map +1 -1
  755. package/dist/esm/core/system/var.js +2 -1
  756. package/dist/esm/core/system/var.js.map +1 -1
  757. package/dist/esm/hooks/use-animation/index.js +3 -2
  758. package/dist/esm/hooks/use-animation/index.js.map +1 -1
  759. package/dist/esm/hooks/use-breakpoint/use-breakpoint-state.js +2 -1
  760. package/dist/esm/hooks/use-breakpoint/use-breakpoint-state.js.map +1 -1
  761. package/dist/esm/hooks/use-breakpoint/use-breakpoint.js.map +1 -1
  762. package/dist/esm/hooks/use-clickable/index.js.map +1 -1
  763. package/dist/esm/hooks/use-clipboard/index.js.map +1 -1
  764. package/dist/esm/hooks/use-combobox/index.js.map +1 -1
  765. package/dist/esm/hooks/use-controllable-state/index.js.map +1 -1
  766. package/dist/esm/hooks/use-counter/index.js.map +1 -1
  767. package/dist/esm/hooks/use-descendants/index.js.map +1 -1
  768. package/dist/esm/hooks/use-event-listener/index.js.map +1 -1
  769. package/dist/esm/hooks/use-focus/index.js +2 -1
  770. package/dist/esm/hooks/use-focus/index.js.map +1 -1
  771. package/dist/esm/hooks/use-local-storage/index.js.map +1 -1
  772. package/dist/esm/hooks/use-os/index.js.map +1 -1
  773. package/dist/esm/hooks/use-outside-click/index.js.map +1 -1
  774. package/dist/esm/hooks/use-pan-event/index.js.map +1 -1
  775. package/dist/esm/hooks/use-resize-observer/index.js.map +1 -1
  776. package/dist/esm/hooks/use-value/index.js.map +1 -1
  777. package/dist/esm/index.js +21 -5
  778. package/dist/esm/providers/i18n-provider/i18n-provider.js.map +1 -1
  779. package/dist/esm/providers/ui-provider/ui-provider.js.map +1 -1
  780. package/dist/types/components/chart/polar-chart.style.d.ts +1 -1
  781. package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
  782. package/dist/types/components/color-selector/color-selector.style.d.ts +2 -2
  783. package/dist/types/components/drawer/drawer.style.d.ts +2 -2
  784. package/dist/types/components/file-input/file-input.style.d.ts +1 -1
  785. package/dist/types/components/icon/icons/index.d.ts +12 -4
  786. package/dist/types/components/icon/icons/index.types.d.ts +1 -1
  787. package/dist/types/components/icon/icons/layout-freeform-icon.d.ts +13 -0
  788. package/dist/types/components/icon/icons/mic-audio-lines-icon.d.ts +13 -0
  789. package/dist/types/components/icon/icons/mic-signal-icon.d.ts +13 -0
  790. package/dist/types/components/icon/icons/mosque-icon.d.ts +13 -0
  791. package/dist/types/components/icon/icons/rotate-ccw-clock-icon.d.ts +13 -0
  792. package/dist/types/components/icon/icons/rotate-cw-fading-clock-icon.d.ts +13 -0
  793. package/dist/types/components/icon/icons/scan-square-icon.d.ts +13 -0
  794. package/dist/types/components/icon/icons/shield-keyhole-icon.d.ts +13 -0
  795. package/dist/types/components/icon/icons/{history-icon.d.ts → square-off-icon.d.ts} +5 -5
  796. package/dist/types/components/icon/icons/user-shield-icon.d.ts +13 -0
  797. package/dist/types/components/icon/index.d.ts +11 -3
  798. package/dist/types/components/modal/modal.style.d.ts +2 -2
  799. package/dist/types/components/notice/notice.style.d.ts +1 -1
  800. package/dist/types/components/tag/tag.style.d.ts +1 -1
  801. package/dist/types/index.d.ts +12 -4
  802. package/package.json +9 -9
  803. package/dist/cjs/components/icon/icons/history-icon.cjs +0 -14
  804. package/dist/cjs/components/icon/icons/history-icon.cjs.map +0 -1
  805. package/dist/cjs/components/icon/icons/podcast-icon.cjs +0 -14
  806. package/dist/cjs/components/icon/icons/podcast-icon.cjs.map +0 -1
  807. package/dist/esm/components/icon/icons/history-icon.js +0 -14
  808. package/dist/esm/components/icon/icons/history-icon.js.map +0 -1
  809. package/dist/esm/components/icon/icons/podcast-icon.js +0 -14
  810. package/dist/esm/components/icon/icons/podcast-icon.js.map +0 -1
  811. package/dist/types/components/icon/icons/podcast-icon.d.ts +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.cjs","names":["createContext","createSlotComponent","sidebarStyle","useBreakpointValue","useValue","useSidebar","SidebarDescendantsContext","SidebarContext","styled","useSidebarContext","useSplitChildren","mergeProps","useSidebarGroup","useIncludesChildren","useValidChildren","useLoadingComponent","useSidebarItem","SidebarItemContext","Tooltip","Collapse","ChevronRightIcon","Children"],"sources":["../../../../src/components/sidebar/sidebar.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, PropsWithChildren, ReactNode } from \"react\"\nimport type {\n Breakpoint,\n ExtractStyleValue,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type { ReactNodeOrFunction } from \"../../utils\"\nimport type { CollapseProps } from \"../collapse\"\nimport type { Loading } from \"../loading\"\nimport type { WithTransitionProps } from \"../motion\"\nimport type {\n UseSidebarGroupProps,\n UseSidebarGroupReturn,\n UseSidebarItemProps,\n UseSidebarItemReturn,\n UseSidebarProps,\n UseSidebarReturn,\n} from \"./use-sidebar\"\nimport {\n Children,\n cloneElement,\n isValidElement,\n useCallback,\n useMemo,\n} from \"react\"\nimport { createSlotComponent, mergeProps, styled } from \"../../core\"\nimport { useBreakpointValue } from \"../../hooks/use-breakpoint\"\nimport { useValue } from \"../../hooks/use-value\"\nimport {\n cast,\n createContext,\n dataAttr,\n isObject,\n isString,\n runIfFn,\n useIncludesChildren,\n useSplitChildren,\n useValidChildren,\n} from \"../../utils\"\nimport { Collapse } from \"../collapse\"\nimport { Drawer } from \"../drawer\"\nimport { ChevronRightIcon } from \"../icon\"\nimport { useLoadingComponent } from \"../loading\"\nimport { Tooltip, type TooltipProps } from \"../tooltip\"\nimport { sidebarStyle, type SidebarStyle } from \"./sidebar.style\"\nimport {\n SidebarContext,\n SidebarDescendantsContext,\n SidebarItemContext,\n useSidebar,\n useSidebarContext,\n useSidebarGroup,\n useSidebarItem,\n} from \"./use-sidebar\"\n\ninterface SidebarItemCallBackProps {\n disabled?: boolean\n expanded?: boolean\n}\n\ntype SidebarItemReactNode =\n | ReactNodeOrFunction<SidebarItemCallBackProps>\n | {\n group: ReactNodeOrFunction<SidebarItemCallBackProps>\n item?: ReactNodeOrFunction<SidebarItemCallBackProps>\n }\n | {\n item: ReactNodeOrFunction<SidebarItemCallBackProps>\n group?: ReactNodeOrFunction<SidebarItemCallBackProps>\n }\n\ninterface SidebarItemSharedRenderProps\n extends\n Pick<SidebarItemProps, \"label\">,\n Pick<\n UseSidebarItemReturn,\n | \"expanded\"\n | \"expandedValue\"\n | \"onExpandedChange\"\n | \"onSelectedChange\"\n | \"selected\"\n | \"selectedValue\"\n | \"value\"\n > {\n itemProps: HTMLStyledProps<\"li\">\n linkProps: HTMLStyledProps<\"a\">\n triggerProps: HTMLStyledProps<\"button\">\n endElement?: ReactNode\n startElement?: ReactNode\n}\n\ninterface SidebarItemRenderProps\n extends\n PropsWithChildren,\n Omit<SidebarItemSharedRenderProps, \"endElement\" | \"startElement\">,\n Pick<\n UseSidebarItemReturn,\n | \"group\"\n | \"groupLoading\"\n | \"groupOpen\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n > {\n endElement: { group?: ReactNode; item?: ReactNode }\n startElement: { group?: ReactNode; item?: ReactNode }\n indicator?: ReactNode\n link?: ReactNode\n trigger?: ReactNode\n}\n\ninterface SidebarItemLinkRenderProps extends Omit<\n SidebarItemSharedRenderProps,\n \"itemProps\" | \"triggerProps\"\n> {}\n\ninterface SidebarItemTriggerRenderProps\n extends\n Omit<SidebarItemSharedRenderProps, \"itemProps\" | \"linkProps\">,\n Pick<\n UseSidebarItemReturn,\n | \"groupLoading\"\n | \"groupOpen\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n > {\n indicator?: ReactNode\n}\n\ninterface SidebarItemRender {\n item?: ReactNodeOrFunction<SidebarItemRenderProps>\n link?: ReactNodeOrFunction<SidebarItemLinkRenderProps>\n trigger?: ReactNodeOrFunction<SidebarItemTriggerRenderProps>\n}\n\ninterface SidebarGroup extends Omit<SidebarGroupProps, \"children\" | \"value\"> {\n children: SidebarItemWithValue[]\n group: true\n}\n\nexport interface SidebarItemWithValue extends Omit<\n SidebarItemProps,\n \"children\"\n> {\n children?: SidebarItemWithValue[]\n}\n\nexport type SidebarItem = SidebarGroup | SidebarItemWithValue\n\nconst createKey = (props: SidebarItem, index: number) => {\n return \"value\" in props ? props.value || index : index\n}\n\nconst getReactNodeOrFunction = (\n type: \"group\" | \"item\",\n custom?: SidebarItemReactNode,\n root?: SidebarItemReactNode,\n): ReactNodeOrFunction<SidebarItemCallBackProps> => {\n if (isObject(custom) && (\"group\" in custom || \"item\" in custom))\n return custom[type]\n else if (custom) return custom\n else if (isObject(root) && (\"group\" in root || \"item\" in root))\n return root[type]\n else return root\n}\n\ninterface ComponentContext extends Pick<\n UseSidebarReturn,\n | \"getContentProps\"\n | \"getFooterProps\"\n | \"getHeaderProps\"\n | \"getSidePanelProps\"\n | \"getTriggerProps\"\n> {\n breakpoint: ExtractStyleValue<NonNullable<SidebarRootProps[\"breakpoint\"]>>\n mode: ExtractStyleValue<NonNullable<SidebarRootProps[\"mode\"]>>\n placement: ExtractStyleValue<NonNullable<SidebarRootProps[\"placement\"]>>\n}\n\ninterface GroupComponentContext\n extends\n Pick<SidebarGroupProps, \"contentProps\" | \"labelProps\">,\n Pick<UseSidebarGroupReturn, \"getContentProps\" | \"getLabelProps\"> {}\n\nconst [GroupComponentContext, useGroupComponentContext] =\n createContext<GroupComponentContext>({ name: \"GroupComponentContext\" })\n\ninterface ItemComponentContext {\n contentProps: SidebarItemContentProps\n endElementProps: SidebarItemEndElementProps\n indicatorProps: SidebarItemIndicatorProps\n labelProps: SidebarItemLabelProps\n startElementProps: SidebarItemStartElementProps\n tooltipProps: SidebarItemTooltipProps\n}\n\nconst [ItemComponentContext, useItemComponentContext] =\n createContext<ItemComponentContext>({ name: \"ItemComponentContext\" })\n\ninterface SidePanelComponentContext extends Pick<\n SidebarSidePanelProps,\n | \"animated\"\n | \"contentProps\"\n | \"endElement\"\n | \"endElementProps\"\n | \"footerProps\"\n | \"groupContentProps\"\n | \"groupProps\"\n | \"handleProps\"\n | \"headerProps\"\n | \"indicator\"\n | \"indicatorHidden\"\n | \"indicatorProps\"\n | \"itemContentProps\"\n | \"itemProps\"\n | \"items\"\n | \"labelProps\"\n | \"linkProps\"\n | \"loadingScheme\"\n | \"menuProps\"\n | \"render\"\n | \"startElement\"\n | \"startElementProps\"\n | \"tooltipProps\"\n | \"triggerProps\"\n> {}\n\nconst [SidePanelComponentContext, useSidePanelComponentContext] =\n createContext<SidePanelComponentContext>({\n name: \"SidePanelComponentContext\",\n })\n\nexport interface SidebarRootProps\n extends\n HTMLStyledProps<\"div\">,\n ThemeProps<SidebarStyle>,\n Omit<UseSidebarProps, \"mobile\"> {\n /**\n * The breakpoint to use for the sidebar. If `false`, the sidebar will be always visible.\n *\n * @default 'md'\n */\n breakpoint?: Exclude<Breakpoint, \"base\"> | false\n}\n\nconst {\n ComponentContext,\n PropsContext: SidebarPropsContext,\n useComponentContext,\n usePropsContext: useSidebarPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<SidebarRootProps, SidebarStyle, ComponentContext>(\n \"sidebar\",\n sidebarStyle,\n)\n\nexport { SidebarPropsContext, useSidebarPropsContext }\n\n/**\n * `Sidebar` is a component that is used to display a list of items in a sidebar.\n *\n * @see https://yamada-ui.com/docs/components/sidebar\n */\nexport const SidebarRoot = withProvider<\n \"div\",\n SidebarRootProps,\n \"mode\" | \"placement\"\n>(\n ({\n breakpoint = \"md\",\n mode: modeProp = \"offcanvas\",\n placement: placementProp = \"start\",\n ...rest\n }) => {\n const mobile =\n useBreakpointValue<boolean | undefined>(\n breakpoint ? { [breakpoint]: true } : { base: false },\n ) ?? false\n const mode = useValue(modeProp)\n const placement = useValue(placementProp)\n const {\n descendants,\n expandedValue,\n open,\n selectedValue,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getRootProps,\n getSidePanelProps,\n getTriggerProps,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n } = useSidebar({ mobile, ...rest })\n const context = useMemo(\n () => ({\n expandedValue,\n mobile,\n open,\n selectedValue,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n }),\n [\n mobile,\n expandedValue,\n open,\n selectedValue,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n ],\n )\n const componentContext = useMemo(\n () => ({\n breakpoint,\n mode,\n placement,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getSidePanelProps,\n getTriggerProps,\n }),\n [\n breakpoint,\n mode,\n placement,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getSidePanelProps,\n getTriggerProps,\n ],\n )\n\n return (\n <SidebarDescendantsContext value={descendants}>\n <SidebarContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.div data-group {...getRootProps()} />\n </ComponentContext>\n </SidebarContext>\n </SidebarDescendantsContext>\n )\n },\n \"root\",\n { transferProps: [\"mode\", \"placement\"] },\n)()\n\nexport interface SidebarMainPanelProps extends HTMLStyledProps {}\n\nexport const SidebarMainPanel = withContext<\"div\", SidebarMainPanelProps>(\n \"div\",\n \"mainPanel\",\n)()\n\nexport interface SidebarTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarTrigger = withContext<\"button\", SidebarTriggerProps>(\n \"button\",\n \"trigger\",\n)(undefined, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return { asChild: true, ...getTriggerProps(props) }\n})\n\nexport interface SidebarSidePanelProps\n extends\n Omit<HTMLStyledProps<\"aside\">, \"content\">,\n Pick<SidebarContentProps, \"items\">,\n Pick<\n SidebarItemProps,\n | \"animated\"\n | \"endElement\"\n | \"endElementProps\"\n | \"indicator\"\n | \"indicatorProps\"\n | \"labelProps\"\n | \"linkProps\"\n | \"loadingScheme\"\n | \"render\"\n | \"startElement\"\n | \"startElementProps\"\n | \"tooltipProps\"\n | \"triggerProps\"\n > {\n /**\n * The content of the sidebar.\n */\n content?: ReactNode\n /**\n * The footer of the sidebar.\n */\n footer?: ReactNode\n /**\n * The header of the sidebar.\n */\n header?: ReactNode\n /**\n * If `true`, hide the tree indicator icon for all items.\n *\n * @default false\n */\n indicatorHidden?: boolean\n /**\n * If `true`, the sidebar will be rendered with a handle.\n *\n * @default true\n */\n withHandle?: boolean\n /**\n * Props for the content component.\n */\n contentProps?: SidebarContentProps\n /**\n * Props for the drawer component.\n */\n drawerProps?: Omit<\n Drawer.RootProps,\n | \"body\"\n | \"cancel\"\n | \"children\"\n | \"footer\"\n | \"header\"\n | \"middle\"\n | \"onCancel\"\n | \"onClose\"\n | \"onMiddle\"\n | \"onOpen\"\n | \"onSuccess\"\n | \"open\"\n | \"success\"\n | \"title\"\n | \"trigger\"\n >\n /**\n * Props for the footer component.\n */\n footerProps?: SidebarFooterProps\n /**\n * Props for the group content component.\n */\n groupContentProps?: Omit<SidebarGroupContentProps, \"children\">\n /**\n * Props for the group component.\n */\n groupProps?: Omit<SidebarGroupProps, \"children\" | \"label\" | \"value\">\n /**\n * Props for the handle component.\n */\n handleProps?: SidebarHandleProps\n /**\n * Props for the header component.\n */\n headerProps?: SidebarHeaderProps\n /**\n * Props for the item content component.\n */\n itemContentProps?: SidebarItemContentProps\n /**\n * Props for the item component.\n */\n itemProps?: Omit<\n SidebarItemProps,\n \"children\" | \"items\" | \"label\" | \"open\" | \"value\"\n >\n /**\n * Props for the menu component.\n *\n * @default 'md'\n */\n menuProps?: SidebarMenuProps\n}\n\nexport const SidebarSidePanel = withContext<\"aside\", SidebarSidePanelProps>(\n ({\n animated = true,\n children,\n content,\n endElement,\n footer,\n header,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n render,\n startElement,\n withHandle = true,\n contentProps,\n drawerProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ...rest\n }) => {\n const { mobile, open, onClose } = useSidebarContext()\n const { breakpoint, placement, getSidePanelProps } = useComponentContext()\n const [\n omittedChildren,\n customHeader,\n customContent,\n customFooter,\n customHandle,\n ] = useSplitChildren(\n children,\n SidebarHeader,\n SidebarContent,\n SidebarFooter,\n SidebarHandle,\n )\n const context = useMemo(\n () => ({\n animated,\n endElement,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n render,\n startElement,\n contentProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n }),\n [\n animated,\n endElement,\n indicator,\n indicatorHidden,\n items,\n render,\n loadingScheme,\n startElement,\n contentProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ],\n )\n\n return (\n <SidePanelComponentContext value={context}>\n {mobile ? (\n <Drawer.Root\n size=\"sm\"\n autoFocus={false}\n duration={!animated ? 0 : undefined}\n open={open}\n placement={`inline-${placement}`}\n withCloseButton={false}\n portalProps={{ disabled: true }}\n onClose={onClose}\n {...drawerProps}\n >\n <Drawer.Content>\n {customHeader ??\n (header ? <SidebarHeader>{header}</SidebarHeader> : null)}\n\n {customContent ??\n (content || items ? (\n <SidebarContent>{content}</SidebarContent>\n ) : null)}\n\n {customFooter ??\n (footer ? <SidebarFooter>{footer}</SidebarFooter> : null)}\n </Drawer.Content>\n </Drawer.Root>\n ) : (\n <>\n <SidebarGap\n data-animated={dataAttr(animated)}\n display={\n breakpoint\n ? { base: undefined, [breakpoint]: \"none\" }\n : undefined\n }\n />\n\n <styled.aside\n data-animated={dataAttr(animated)}\n data-group\n display={\n breakpoint\n ? { base: undefined, [breakpoint]: \"none\" }\n : undefined\n }\n {...getSidePanelProps(rest)}\n >\n {customHeader ??\n (header ? <SidebarHeader>{header}</SidebarHeader> : null)}\n {customContent ??\n (content || items ? (\n <SidebarContent>{content}</SidebarContent>\n ) : null)}\n {customFooter ??\n (footer ? <SidebarFooter>{footer}</SidebarFooter> : null)}\n {customHandle ?? (withHandle ? <SidebarHandle /> : null)}\n\n {omittedChildren}\n </styled.aside>\n </>\n )}\n </SidePanelComponentContext>\n )\n },\n \"sidePanel\",\n)()\n\ninterface SidebarGapProps extends HTMLStyledProps<\"div\"> {}\n\nconst SidebarGap = withContext<\"div\", SidebarGapProps>(\"div\", \"gap\")()\n\nexport interface SidebarHeaderProps extends HTMLStyledProps<\"header\"> {}\n\nexport const SidebarHeader = withContext<\"header\", SidebarHeaderProps>(\n \"header\",\n \"header\",\n)(undefined, (props) => {\n const { getHeaderProps } = useComponentContext()\n const { headerProps } = useSidePanelComponentContext()\n\n return getHeaderProps(mergeProps(headerProps, props)())\n})\n\nexport interface SidebarFooterProps extends HTMLStyledProps<\"footer\"> {}\n\nexport const SidebarFooter = withContext<\"footer\", SidebarFooterProps>(\n \"footer\",\n \"footer\",\n)(undefined, (props) => {\n const { getFooterProps } = useComponentContext()\n const { footerProps } = useSidePanelComponentContext()\n\n return getFooterProps(mergeProps(footerProps, props)())\n})\n\nexport interface SidebarContentProps extends HTMLStyledProps<\"ul\"> {\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItem[]\n}\n\nexport const SidebarContent = withContext<\"ul\", SidebarContentProps>(\n ({ children, items, ...rest }) => {\n const { getContentProps } = useComponentContext()\n const { items: rootItems, contentProps } = useSidePanelComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return (items ?? rootItems)?.map((props, index) => {\n const key = createKey(props, index)\n\n if (\"group\" in props) {\n const { children, group: _, ...rest } = props\n\n return <SidebarGroup key={key} items={children} {...rest} />\n } else {\n const { children, ...rest } = props\n\n return <SidebarItem key={key} items={children} {...rest} />\n }\n })\n }, [children, items, rootItems])\n\n return (\n <styled.ul {...getContentProps(mergeProps(contentProps, rest)())}>\n {computedChildren}\n </styled.ul>\n )\n },\n \"content\",\n)()\n\nexport interface SidebarHandleProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarHandle = withContext<\"button\", SidebarHandleProps>(\n (props) => {\n const { handleProps } = useSidePanelComponentContext()\n\n return (\n <SidebarTrigger {...mergeProps(handleProps, props)()}>\n <styled.button tabIndex={-1} />\n </SidebarTrigger>\n )\n },\n \"handle\",\n)()\n\nexport interface SidebarGroupProps\n extends\n Omit<HTMLStyledProps<\"li\">, \"content\" | \"value\">,\n UseSidebarGroupProps {\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItemWithValue[]\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the content component.\n */\n contentProps?: Omit<SidebarGroupContentProps, \"children\">\n /**\n * Props for the label component.\n */\n labelProps?: HTMLStyledProps<\"span\">\n}\n\nexport const SidebarGroup = withContext<\"li\", SidebarGroupProps>(\n ({\n children,\n items,\n label,\n value: valueProp = isString(label) ? label : undefined,\n contentProps,\n labelProps,\n ...rest\n }) => {\n const { groupProps } = useSidePanelComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [children, items])\n const [omittedChildren, customLabel, customContent] = useSplitChildren(\n computedChildren,\n SidebarGroupLabel,\n SidebarGroupContent,\n )\n const { getContentProps, getLabelProps, getRootProps } = useSidebarGroup({\n ...mergeProps(groupProps, rest)(),\n value: valueProp,\n })\n const context = useMemo(\n () => ({ contentProps, getContentProps, getLabelProps, labelProps }),\n [getLabelProps, labelProps, getContentProps, contentProps],\n )\n\n return (\n <GroupComponentContext value={context}>\n <styled.li {...getRootProps()}>\n {customLabel ??\n (label ? <SidebarGroupLabel>{label}</SidebarGroupLabel> : null)}\n {customContent ?? (\n <SidebarGroupContent>{omittedChildren}</SidebarGroupContent>\n )}\n </styled.li>\n </GroupComponentContext>\n )\n },\n \"group\",\n)()\n\nexport interface SidebarGroupLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SidebarGroupLabel = withContext<\"span\", SidebarGroupLabelProps>(\n \"span\",\n \"groupLabel\",\n)(undefined, (props) => {\n const { getLabelProps, labelProps } = useGroupComponentContext()\n\n return getLabelProps(mergeProps(labelProps, props)())\n})\n\nexport interface SidebarGroupContentProps extends HTMLStyledProps<\"div\"> {}\n\nexport const SidebarGroupContent = withContext<\"div\", SidebarGroupContentProps>(\n \"div\",\n \"groupContent\",\n)(undefined, ({ children, ...rest }) => {\n const validChildren = useValidChildren(children)\n const list = useIncludesChildren(validChildren, SidebarItem)\n const { groupContentProps } = useSidePanelComponentContext()\n const { contentProps, getContentProps } = useGroupComponentContext()\n\n return {\n as: list ? \"ul\" : \"div\",\n children,\n ...getContentProps(mergeProps(groupContentProps, contentProps, rest)()),\n }\n})\n\nexport interface SidebarMenuProps extends HTMLStyledProps<\"div\"> {}\n\nexport const SidebarMenu = withContext<\"div\", SidebarMenuProps>(\"div\", \"menu\")(\n undefined,\n (props) => {\n const { menuProps } = useSidePanelComponentContext()\n\n return { \"data-menu\": \"\", ...mergeProps(menuProps, props)() }\n },\n)\n\nexport interface SidebarMenuButtonProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarMenuButton = withContext<\"button\", SidebarMenuButtonProps>(\n \"button\",\n [\"menu\", \"button\"],\n)(undefined, (props) => {\n const { open } = useSidebarContext()\n const { mode } = useComponentContext()\n const { menuProps } = useSidePanelComponentContext()\n const offcanvas = mode === \"offcanvas\"\n const { disabled, ...rest } = mergeProps(menuProps, props)()\n\n return {\n \"data-menu\": \"\",\n disabled,\n ...rest,\n tabIndex: (!offcanvas || open) && !disabled ? 0 : -1,\n }\n})\n\nexport interface SidebarItemProps\n extends\n Omit<HTMLStyledProps<\"li\">, \"value\">,\n Omit<UseSidebarItemProps, \"asyncChildren\"> {\n /**\n * The label to display in the item.\n */\n label: ReactNode\n /**\n * If `true`, the sidebar item will be animated.\n *\n * @default true\n */\n animated?: boolean\n /**\n * The element to display at the end of the item.\n */\n endElement?: SidebarItemReactNode\n /**\n * The sidebar item indicator icon to use.\n */\n indicator?: ReactNodeOrFunction<SidebarItemCallBackProps>\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItemWithValue[]\n /**\n * The loading scheme.\n *\n * @default 'oval'\n */\n loadingScheme?: Loading.Scheme\n /**\n * If provided, the sidebar item will be rendered with custom components.\n */\n render?: SidebarItemRender\n /**\n * The element to display at the start of the item.\n */\n startElement?: SidebarItemReactNode\n /**\n * Props for the content component.\n */\n contentProps?: Omit<SidebarItemContentProps, \"children\">\n /**\n * Props for the end component.\n */\n endElementProps?: SidebarItemEndElementProps\n /**\n * Props for the indicator component.\n */\n indicatorProps?: SidebarItemIndicatorProps\n /**\n * Props for the label component.\n */\n labelProps?: SidebarItemLabelProps\n /**\n * Props for the link component.\n */\n linkProps?: SidebarItemLinkProps\n /**\n * Props for the start component.\n */\n startElementProps?: SidebarItemStartElementProps\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: Omit<SidebarItemTooltipProps, \"children\" | \"content\">\n /**\n * Props for the trigger component.\n */\n triggerProps?: SidebarItemTriggerProps\n /**\n * If provided, the sidebar item will be rendered as an async sidebar item.\n */\n asyncChildren?: () => Promise<SidebarItemWithValue[]>\n}\n\nexport const SidebarItem = withContext<\"li\", SidebarItemProps>(\n ({\n animated: animatedProp,\n asyncChildren: asyncChildrenProp,\n children: childrenProp,\n endElement,\n indicator: indicatorProp,\n items,\n label,\n loadingScheme,\n render,\n startElement,\n contentProps,\n endElementProps,\n indicatorProps,\n labelProps,\n linkProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ...rest\n }) => {\n const { mode } = useComponentContext()\n const offcanvas = mode === \"offcanvas\"\n const componentContext = useSidePanelComponentContext()\n const Loading = useLoadingComponent(\n loadingScheme ?? componentContext.loadingScheme ?? \"oval\",\n )\n const computedChildren = useMemo(() => {\n if (childrenProp) return childrenProp\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [childrenProp, items])\n const asyncChildren = useCallback(async () => {\n const items = await asyncChildrenProp?.()\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [asyncChildrenProp])\n const {\n branchOpen,\n children,\n disabled,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n open,\n selected,\n selectedValue,\n value,\n getContentProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n getLinkProps,\n getTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n } = useSidebarItem({\n ...mergeProps(componentContext.itemProps, rest)(),\n asyncChildren: asyncChildrenProp ? asyncChildren : undefined,\n children: computedChildren,\n })\n const animated = animatedProp ?? componentContext.animated ?? true\n const tabIndex = offcanvas\n ? open && expanded && !disabled\n ? 0\n : -1\n : expanded && !disabled\n ? 0\n : -1\n const callbackProps = useMemo(\n () => ({ disabled, expanded: groupOpen }),\n [disabled, groupOpen],\n )\n const mergedTriggerProps = useMemo(() => {\n return getTriggerProps({\n tabIndex,\n ...mergeProps(componentContext.triggerProps, triggerProps)(),\n }) as SidebarItemTriggerProps\n }, [getTriggerProps, tabIndex, componentContext.triggerProps, triggerProps])\n const mergedLinkProps = useMemo(() => {\n return getLinkProps({\n tabIndex,\n ...mergeProps(componentContext.linkProps, linkProps)(),\n }) as SidebarItemLinkProps\n }, [getLinkProps, tabIndex, componentContext.linkProps, linkProps])\n const indicator = useMemo<ReactNode>(\n () => runIfFn(indicatorProp ?? componentContext.indicator, callbackProps),\n [indicatorProp, componentContext.indicator, callbackProps],\n )\n const groupStartElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"group\",\n startElement,\n componentContext.startElement,\n ),\n callbackProps,\n ),\n [startElement, componentContext.startElement, callbackProps],\n )\n const groupEndElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"group\",\n endElement,\n componentContext.endElement,\n ),\n callbackProps,\n ),\n [endElement, componentContext.endElement, callbackProps],\n )\n const itemStartElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"item\",\n startElement,\n componentContext.startElement,\n ),\n callbackProps,\n ),\n [startElement, componentContext.startElement, callbackProps],\n )\n const itemEndElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"item\",\n endElement,\n componentContext.endElement,\n ),\n callbackProps,\n ),\n [endElement, componentContext.endElement, callbackProps],\n )\n const trigger = useMemo<ReactNode>(\n () =>\n runIfFn(render?.trigger ?? componentContext.render?.trigger, {\n endElement: groupEndElement,\n expanded,\n expandedValue,\n groupLoading,\n groupOpen,\n indicator,\n label,\n selected,\n selectedValue,\n startElement: groupStartElement,\n value,\n triggerProps: mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }),\n [\n render?.trigger,\n componentContext.render?.trigger,\n groupEndElement,\n expanded,\n expandedValue,\n groupLoading,\n groupOpen,\n indicator,\n label,\n selected,\n selectedValue,\n groupStartElement,\n value,\n mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n ],\n )\n const link = useMemo<ReactNode>(\n () =>\n runIfFn(render?.link ?? componentContext.render?.link, {\n endElement: itemEndElement,\n expanded,\n expandedValue,\n label,\n selected,\n selectedValue,\n startElement: itemStartElement,\n value,\n linkProps: mergedLinkProps,\n onExpandedChange,\n onSelectedChange,\n }),\n [\n render?.link,\n componentContext.render?.link,\n itemEndElement,\n expanded,\n expandedValue,\n label,\n selected,\n selectedValue,\n itemStartElement,\n value,\n mergedLinkProps,\n onExpandedChange,\n onSelectedChange,\n ],\n )\n const item = useMemo<ReactNode>(\n () =>\n runIfFn(render?.item ?? componentContext.render?.item, {\n children,\n endElement: { group: groupEndElement, item: itemEndElement },\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n indicator,\n label,\n link,\n selected,\n selectedValue,\n startElement: { group: groupStartElement, item: itemStartElement },\n trigger,\n value,\n itemProps: getItemProps() as HTMLStyledProps<\"li\">,\n linkProps: mergedLinkProps,\n triggerProps: mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }),\n [\n render?.item,\n componentContext.render?.item,\n children,\n groupEndElement,\n itemEndElement,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n indicator,\n label,\n link,\n selected,\n selectedValue,\n groupStartElement,\n itemStartElement,\n trigger,\n value,\n getItemProps,\n mergedLinkProps,\n mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n ],\n )\n const context = useMemo(\n () => ({ branchOpen, groupOpen }),\n [branchOpen, groupOpen],\n )\n const itemComponentContext = useMemo(\n () => ({\n contentProps: {\n duration: !animated ? 0 : undefined,\n open: groupOpen,\n ...getContentProps(\n mergeProps(componentContext.itemContentProps, contentProps)(),\n ),\n },\n endElementProps: mergeProps(\n componentContext.endElementProps,\n endElementProps,\n )(),\n indicatorProps: getIndicatorProps({\n \"data-animated\": dataAttr(animated),\n ...mergeProps(componentContext.indicatorProps, indicatorProps)(),\n }) as SidebarItemIndicatorProps,\n labelProps: getLabelProps(\n mergeProps(componentContext.labelProps, labelProps)(),\n ) as SidebarItemLabelProps,\n startElementProps: mergeProps(\n componentContext.startElementProps,\n startElementProps,\n )(),\n tooltipProps: {\n content: label,\n disabled: open,\n ...mergeProps(componentContext.tooltipProps, tooltipProps)(),\n },\n }),\n [\n animated,\n componentContext.endElementProps,\n componentContext.indicatorProps,\n componentContext.itemContentProps,\n componentContext.labelProps,\n componentContext.startElementProps,\n componentContext.tooltipProps,\n contentProps,\n endElementProps,\n getContentProps,\n getIndicatorProps,\n getLabelProps,\n groupOpen,\n indicatorProps,\n label,\n labelProps,\n open,\n startElementProps,\n tooltipProps,\n ],\n )\n\n return (\n <SidebarItemContext value={context}>\n <ItemComponentContext value={itemComponentContext}>\n {item ?? (\n <styled.li {...getItemProps()}>\n {group ? (\n <>\n {trigger ?? (\n <SidebarItemTrigger {...mergedTriggerProps}>\n {groupStartElement ? (\n <SidebarItemStartElement>\n {groupStartElement}\n </SidebarItemStartElement>\n ) : null}\n {label ? (\n <SidebarItemLabel>{label}</SidebarItemLabel>\n ) : null}\n {groupEndElement ? (\n <SidebarItemEndElement>\n {groupEndElement}\n </SidebarItemEndElement>\n ) : null}\n <SidebarItemIndicator>\n {groupLoading ? (\n <Loading />\n ) : (\n runIfFn(indicator, callbackProps)\n )}\n </SidebarItemIndicator>\n </SidebarItemTrigger>\n )}\n\n <SidebarItemContent>{children}</SidebarItemContent>\n </>\n ) : (\n (link ?? (\n <SidebarItemLink {...mergedLinkProps}>\n {itemStartElement ? (\n <SidebarItemStartElement>\n {itemStartElement}\n </SidebarItemStartElement>\n ) : null}\n {label ? (\n <SidebarItemLabel>{label}</SidebarItemLabel>\n ) : null}\n {itemEndElement ? (\n <SidebarItemEndElement>\n {itemEndElement}\n </SidebarItemEndElement>\n ) : null}\n </SidebarItemLink>\n ))\n )}\n </styled.li>\n )}\n </ItemComponentContext>\n </SidebarItemContext>\n )\n },\n \"item\",\n)()\n\ninterface SidebarItemTooltipProps extends TooltipProps {}\n\nconst SidebarItemTooltip: FC<SidebarItemTooltipProps> = (props) => {\n const { tooltipProps } = useItemComponentContext()\n const { children, disabled, ...rest } = mergeProps(tooltipProps, props)()\n const { mode, placement } = useComponentContext()\n const offcanvas = mode === \"offcanvas\"\n\n if (offcanvas || disabled) return children\n else\n return (\n <Tooltip\n closeOnClick={false}\n gutter={16}\n placement={`center-${placement === \"start\" ? \"end\" : \"start\"}`}\n {...rest}\n >\n {children}\n </Tooltip>\n )\n}\n\nexport interface SidebarItemTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarItemTrigger = withContext<\n \"button\",\n SidebarItemTriggerProps\n>((props) => {\n return (\n <SidebarItemTooltip>\n <styled.button {...props} />\n </SidebarItemTooltip>\n )\n}, \"itemTrigger\")()\n\nexport interface SidebarItemLinkProps extends HTMLStyledProps<\"a\"> {}\n\nexport const SidebarItemLink = withContext<\"a\", SidebarItemLinkProps>(\n (props) => {\n return (\n <SidebarItemTooltip>\n <styled.a {...props} />\n </SidebarItemTooltip>\n )\n },\n \"itemLink\",\n)()\n\nexport interface SidebarItemContentProps\n extends\n Omit<HTMLStyledProps<\"ul\">, \"transition\">,\n Pick<CollapseProps, \"animationOpacity\" | keyof WithTransitionProps> {}\n\nexport const SidebarItemContent = withContext<\"ul\", SidebarItemContentProps>(\n (props) => {\n const { contentProps } = useItemComponentContext()\n\n return (\n <Collapse\n as=\"ul\"\n {...cast<CollapseProps>(mergeProps(contentProps, props)())}\n />\n )\n },\n \"itemContent\",\n)()\n\nexport interface SidebarItemIndicatorProps extends HTMLStyledProps<\"svg\"> {}\n\nexport const SidebarItemIndicator = withContext<\n \"svg\",\n SidebarItemIndicatorProps\n>(({ children = <ChevronRightIcon />, ...rest }) => {\n const { indicatorHidden } = useSidePanelComponentContext()\n\n if (indicatorHidden) return null\n\n if (isValidElement<HTMLProps<\"svg\">>(children))\n return cloneElement(children, { ...rest, ...children.props })\n\n return Children.count(children) > 1 ? Children.only(null) : null\n}, \"itemIndicator\")(undefined, (props) => {\n const { indicatorProps } = useItemComponentContext()\n\n return mergeProps(indicatorProps, props)()\n})\n\nexport interface SidebarItemStartElementProps extends HTMLStyledProps {}\n\nexport const SidebarItemStartElement = withContext<\n \"div\",\n SidebarItemStartElementProps\n>(\"div\", {\n name: \"ItemStartElement\",\n slot: [\"itemElement\", \"start\"],\n})(undefined, (props) => {\n const { startElementProps } = useItemComponentContext()\n\n return mergeProps(startElementProps, props)()\n})\n\nexport interface SidebarItemEndElementProps extends HTMLStyledProps {}\n\nexport const SidebarItemEndElement = withContext<\n \"div\",\n SidebarItemEndElementProps\n>(\"div\", {\n name: \"ItemEndElement\",\n slot: [\"itemElement\", \"end\"],\n})(undefined, (props) => {\n const { endElementProps } = useItemComponentContext()\n\n return mergeProps(endElementProps, props)()\n})\n\nexport interface SidebarItemLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SidebarItemLabel = withContext<\"span\", SidebarItemLabelProps>(\n \"span\",\n \"itemLabel\",\n)(undefined, (props) => {\n const { labelProps } = useItemComponentContext()\n\n return mergeProps(labelProps, props)()\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0JA,MAAM,aAAa,OAAoB,UAAkB;CACvD,OAAO,WAAW,QAAQ,MAAM,SAAS,QAAQ;AACnD;AAEA,MAAM,0BACJ,MACA,QACA,SACkD;CAClD,KAAA,GAAA,oBAAA,cAAA,SAAA,CAAa,MAAM,MAAM,WAAW,UAAU,UAAU,SACtD,OAAO,OAAO;MACX,IAAI,QAAQ,OAAO;MACnB,KAAA,GAAA,oBAAA,cAAA,SAAA,CAAa,IAAI,MAAM,WAAW,QAAQ,UAAU,OACvD,OAAO,KAAK;MACT,OAAO;AACd;AAoBA,MAAM,CAAC,uBAAuB,4BAC5BA,gBAAAA,cAAqC,EAAE,MAAM,wBAAwB,CAAC;AAWxE,MAAM,CAAC,sBAAsB,2BAC3BA,gBAAAA,cAAoC,EAAE,MAAM,uBAAuB,CAAC;AA8BtE,MAAM,CAAC,2BAA2B,gCAChCA,gBAAAA,cAAyC,EACvC,MAAM,4BACR,CAAC;AAeH,MAAM,EACJ,kBACA,cAAc,qBACd,qBACA,iBAAiB,wBACjB,aACA,iBACEC,yBAAAA,oBACF,WACAC,sBAAAA,YACF;;;;;;AASA,MAAa,cAAc,cAKxB,EACC,aAAa,MACb,MAAM,WAAW,aACjB,WAAW,gBAAgB,SAC3B,GAAG,WACC;CACJ,MAAM,SACJC,6BAAAA,mBAC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,mBAAmB,aAC7B,EACC,WAAW,MACX,UACA,SACA,YACA,QACA,QACA,WACA,iBACA,OACA,eACA,QACA,cACA,aAAa,MACb,cACA,aACA,iBACA,aACA,mBACA,YACA,aACA,aACA,gBACA,kBACA,WACA,YACA,WACA,WACA,mBACA,cACA,cACA,GAAG,WACC;CACJ,MAAM,EAAE,QAAQ,MAAM,YAAYC,oBAAAA,kBAAkB;CACpD,MAAM,EAAE,YAAY,WAAW,sBAAsB,oBAAoB;CACzE,MAAM,CACJ,iBACA,cACA,eACA,cACA,gBACEC,iBAAAA,iBACF,UACA,eACA,gBACA,eACA,aACF;CACA,MAAM,WAAA,GAAA,MAAA,QAAA,QACG;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,IACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,2BAAD;EAA2B,OAAO;EAC/B,UAAA,SACC,iBAAA,GAAA,kBAAA,IAAA,CAAA,eAAA,YAAA;GACE,MAAK;GACL,WAAW;GACX,UAAU,CAAC,WAAW,IAAI,KAAA;GACpB;GACN,WAAW,UAAU;GACrB,iBAAiB;GACjB,aAAa,EAAE,UAAU,KAAK;GACrB;GACT,GAAI;GAEJ,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAA,eAAA,eAAA,EAAA,UAAA;IACG,iBACE,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAD,EAAA,UAAgB,OAAsB,CAAA,IAAI;IAErD,kBACE,WAAW,QACV,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD,EAAA,UAAiB,QAAwB,CAAA,IACvC;IAEL,iBACE,SAAS,iBAAA,GAAA,kBAAA,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A,iBAAiB,UACnB,GACA,aACF,GACF;EAAC;EAAY,iBAAiB;EAAY;CAAa,CACzD;CACA,MAAM,WAAA,GAAA,MAAA,QAAA,QAAA,GAAA,oBAAA,cAAA,QAAA,CAEM,QAAQ,WAAW,iBAAiB,QAAQ,SAAS;EAC3D,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;CACF,CAAC,GACH;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CACA,MAAM,QAAA,GAAA,MAAA,QAAA,QAAA,GAAA,oBAAA,cAAA,QAAA,CAEM,QAAQ,QAAQ,iBAAiB,QAAQ,MAAM;EACrD,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA,WAAW;EACX;EACA;CACF,CAAC,GACH;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CACA,MAAM,QAAA,GAAA,MAAA,QAAA,QAAA,GAAA,oBAAA,cAAA,QAAA,CAEM,QAAQ,QAAQ,iBAAiB,QAAQ,MAAM;EACrD;EACA,YAAY;GAAE,OAAO;GAAiB,MAAM;EAAe;EAC3D;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;GAAE,OAAO;GAAmB,MAAM;EAAiB;EACjE;EACA;EACA,WAAW,aAAa;EACxB,WAAW;EACX,cAAc;EACd;EACA;EACA;EACA;EACA;CACF,CAAC,GACH;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CACA,MAAM,WA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OAAOV,cAAAA,WAAW,gBAAgB,KAAK,CAAC,CAAC;AAC3C,CAAC;AAID,MAAa,0BAA0B,YAGrC,OAAO;CACP,MAAM;CACN,MAAM,CAAC,eAAe,OAAO;AAC/B,CAAC,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,sBAAsB,wBAAwB;CAEtD,OAAOA,cAAAA,WAAW,mBAAmB,KAAK,CAAC,CAAC;AAC9C,CAAC;AAID,MAAa,wBAAwB,YAGnC,OAAO;CACP,MAAM;CACN,MAAM,CAAC,eAAe,KAAK;AAC7B,CAAC,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,oBAAoB,wBAAwB;CAEpD,OAAOA,cAAAA,WAAW,iBAAiB,KAAK,CAAC,CAAC;AAC5C,CAAC;AAID,MAAa,mBAAmB,YAC9B,QACA,WACF,CAAC,CAAC,KAAA,IAAY,UAAU;CACtB,MAAM,EAAE,eAAe,wBAAwB;CAE/C,OAAOA,cAAAA,WAAW,YAAY,KAAK,CAAC,CAAC;AACvC,CAAC"}
1
+ {"version":3,"file":"sidebar.cjs","names":["createContext","createSlotComponent","sidebarStyle","useBreakpointValue","useValue","useSidebar","useMemo","SidebarDescendantsContext","SidebarContext","styled","useSidebarContext","useSplitChildren","mergeProps","useSidebarGroup","useValidChildren","useIncludesChildren","useLoadingComponent","useCallback","useSidebarItem","SidebarItemContext","Tooltip","Collapse","ChevronRightIcon","isValidElement","cloneElement","Children"],"sources":["../../../../src/components/sidebar/sidebar.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, PropsWithChildren, ReactNode } from \"react\"\nimport type {\n Breakpoint,\n ExtractStyleValue,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type { ReactNodeOrFunction } from \"../../utils\"\nimport type { CollapseProps } from \"../collapse\"\nimport type { Loading } from \"../loading\"\nimport type { WithTransitionProps } from \"../motion\"\nimport type {\n UseSidebarGroupProps,\n UseSidebarGroupReturn,\n UseSidebarItemProps,\n UseSidebarItemReturn,\n UseSidebarProps,\n UseSidebarReturn,\n} from \"./use-sidebar\"\nimport {\n Children,\n cloneElement,\n isValidElement,\n useCallback,\n useMemo,\n} from \"react\"\nimport { createSlotComponent, mergeProps, styled } from \"../../core\"\nimport { useBreakpointValue } from \"../../hooks/use-breakpoint\"\nimport { useValue } from \"../../hooks/use-value\"\nimport {\n cast,\n createContext,\n dataAttr,\n isObject,\n isString,\n runIfFn,\n useIncludesChildren,\n useSplitChildren,\n useValidChildren,\n} from \"../../utils\"\nimport { Collapse } from \"../collapse\"\nimport { Drawer } from \"../drawer\"\nimport { ChevronRightIcon } from \"../icon\"\nimport { useLoadingComponent } from \"../loading\"\nimport { Tooltip, type TooltipProps } from \"../tooltip\"\nimport { sidebarStyle, type SidebarStyle } from \"./sidebar.style\"\nimport {\n SidebarContext,\n SidebarDescendantsContext,\n SidebarItemContext,\n useSidebar,\n useSidebarContext,\n useSidebarGroup,\n useSidebarItem,\n} from \"./use-sidebar\"\n\ninterface SidebarItemCallBackProps {\n disabled?: boolean\n expanded?: boolean\n}\n\ntype SidebarItemReactNode =\n | ReactNodeOrFunction<SidebarItemCallBackProps>\n | {\n group: ReactNodeOrFunction<SidebarItemCallBackProps>\n item?: ReactNodeOrFunction<SidebarItemCallBackProps>\n }\n | {\n item: ReactNodeOrFunction<SidebarItemCallBackProps>\n group?: ReactNodeOrFunction<SidebarItemCallBackProps>\n }\n\ninterface SidebarItemSharedRenderProps\n extends\n Pick<SidebarItemProps, \"label\">,\n Pick<\n UseSidebarItemReturn,\n | \"expanded\"\n | \"expandedValue\"\n | \"onExpandedChange\"\n | \"onSelectedChange\"\n | \"selected\"\n | \"selectedValue\"\n | \"value\"\n > {\n itemProps: HTMLStyledProps<\"li\">\n linkProps: HTMLStyledProps<\"a\">\n triggerProps: HTMLStyledProps<\"button\">\n endElement?: ReactNode\n startElement?: ReactNode\n}\n\ninterface SidebarItemRenderProps\n extends\n PropsWithChildren,\n Omit<SidebarItemSharedRenderProps, \"endElement\" | \"startElement\">,\n Pick<\n UseSidebarItemReturn,\n | \"group\"\n | \"groupLoading\"\n | \"groupOpen\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n > {\n endElement: { group?: ReactNode; item?: ReactNode }\n startElement: { group?: ReactNode; item?: ReactNode }\n indicator?: ReactNode\n link?: ReactNode\n trigger?: ReactNode\n}\n\ninterface SidebarItemLinkRenderProps extends Omit<\n SidebarItemSharedRenderProps,\n \"itemProps\" | \"triggerProps\"\n> {}\n\ninterface SidebarItemTriggerRenderProps\n extends\n Omit<SidebarItemSharedRenderProps, \"itemProps\" | \"linkProps\">,\n Pick<\n UseSidebarItemReturn,\n | \"groupLoading\"\n | \"groupOpen\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n > {\n indicator?: ReactNode\n}\n\ninterface SidebarItemRender {\n item?: ReactNodeOrFunction<SidebarItemRenderProps>\n link?: ReactNodeOrFunction<SidebarItemLinkRenderProps>\n trigger?: ReactNodeOrFunction<SidebarItemTriggerRenderProps>\n}\n\ninterface SidebarGroup extends Omit<SidebarGroupProps, \"children\" | \"value\"> {\n children: SidebarItemWithValue[]\n group: true\n}\n\nexport interface SidebarItemWithValue extends Omit<\n SidebarItemProps,\n \"children\"\n> {\n children?: SidebarItemWithValue[]\n}\n\nexport type SidebarItem = SidebarGroup | SidebarItemWithValue\n\nconst createKey = (props: SidebarItem, index: number) => {\n return \"value\" in props ? props.value || index : index\n}\n\nconst getReactNodeOrFunction = (\n type: \"group\" | \"item\",\n custom?: SidebarItemReactNode,\n root?: SidebarItemReactNode,\n): ReactNodeOrFunction<SidebarItemCallBackProps> => {\n if (isObject(custom) && (\"group\" in custom || \"item\" in custom))\n return custom[type]\n else if (custom) return custom\n else if (isObject(root) && (\"group\" in root || \"item\" in root))\n return root[type]\n else return root\n}\n\ninterface ComponentContext extends Pick<\n UseSidebarReturn,\n | \"getContentProps\"\n | \"getFooterProps\"\n | \"getHeaderProps\"\n | \"getSidePanelProps\"\n | \"getTriggerProps\"\n> {\n breakpoint: ExtractStyleValue<NonNullable<SidebarRootProps[\"breakpoint\"]>>\n mode: ExtractStyleValue<NonNullable<SidebarRootProps[\"mode\"]>>\n placement: ExtractStyleValue<NonNullable<SidebarRootProps[\"placement\"]>>\n}\n\ninterface GroupComponentContext\n extends\n Pick<SidebarGroupProps, \"contentProps\" | \"labelProps\">,\n Pick<UseSidebarGroupReturn, \"getContentProps\" | \"getLabelProps\"> {}\n\nconst [GroupComponentContext, useGroupComponentContext] =\n createContext<GroupComponentContext>({ name: \"GroupComponentContext\" })\n\ninterface ItemComponentContext {\n contentProps: SidebarItemContentProps\n endElementProps: SidebarItemEndElementProps\n indicatorProps: SidebarItemIndicatorProps\n labelProps: SidebarItemLabelProps\n startElementProps: SidebarItemStartElementProps\n tooltipProps: SidebarItemTooltipProps\n}\n\nconst [ItemComponentContext, useItemComponentContext] =\n createContext<ItemComponentContext>({ name: \"ItemComponentContext\" })\n\ninterface SidePanelComponentContext extends Pick<\n SidebarSidePanelProps,\n | \"animated\"\n | \"contentProps\"\n | \"endElement\"\n | \"endElementProps\"\n | \"footerProps\"\n | \"groupContentProps\"\n | \"groupProps\"\n | \"handleProps\"\n | \"headerProps\"\n | \"indicator\"\n | \"indicatorHidden\"\n | \"indicatorProps\"\n | \"itemContentProps\"\n | \"itemProps\"\n | \"items\"\n | \"labelProps\"\n | \"linkProps\"\n | \"loadingScheme\"\n | \"menuProps\"\n | \"render\"\n | \"startElement\"\n | \"startElementProps\"\n | \"tooltipProps\"\n | \"triggerProps\"\n> {}\n\nconst [SidePanelComponentContext, useSidePanelComponentContext] =\n createContext<SidePanelComponentContext>({\n name: \"SidePanelComponentContext\",\n })\n\nexport interface SidebarRootProps\n extends\n HTMLStyledProps<\"div\">,\n ThemeProps<SidebarStyle>,\n Omit<UseSidebarProps, \"mobile\"> {\n /**\n * The breakpoint to use for the sidebar. If `false`, the sidebar will be always visible.\n *\n * @default 'md'\n */\n breakpoint?: Exclude<Breakpoint, \"base\"> | false\n}\n\nconst {\n ComponentContext,\n PropsContext: SidebarPropsContext,\n useComponentContext,\n usePropsContext: useSidebarPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<SidebarRootProps, SidebarStyle, ComponentContext>(\n \"sidebar\",\n sidebarStyle,\n)\n\nexport { SidebarPropsContext, useSidebarPropsContext }\n\n/**\n * `Sidebar` is a component that is used to display a list of items in a sidebar.\n *\n * @see https://yamada-ui.com/docs/components/sidebar\n */\nexport const SidebarRoot = withProvider<\n \"div\",\n SidebarRootProps,\n \"mode\" | \"placement\"\n>(\n ({\n breakpoint = \"md\",\n mode: modeProp = \"offcanvas\",\n placement: placementProp = \"start\",\n ...rest\n }) => {\n const mobile =\n useBreakpointValue<boolean | undefined>(\n breakpoint ? { [breakpoint]: true } : { base: false },\n ) ?? false\n const mode = useValue(modeProp)\n const placement = useValue(placementProp)\n const {\n descendants,\n expandedValue,\n open,\n selectedValue,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getRootProps,\n getSidePanelProps,\n getTriggerProps,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n } = useSidebar({ mobile, ...rest })\n const context = useMemo(\n () => ({\n expandedValue,\n mobile,\n open,\n selectedValue,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n }),\n [\n mobile,\n expandedValue,\n open,\n selectedValue,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n ],\n )\n const componentContext = useMemo(\n () => ({\n breakpoint,\n mode,\n placement,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getSidePanelProps,\n getTriggerProps,\n }),\n [\n breakpoint,\n mode,\n placement,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getSidePanelProps,\n getTriggerProps,\n ],\n )\n\n return (\n <SidebarDescendantsContext value={descendants}>\n <SidebarContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.div data-group {...getRootProps()} />\n </ComponentContext>\n </SidebarContext>\n </SidebarDescendantsContext>\n )\n },\n \"root\",\n { transferProps: [\"mode\", \"placement\"] },\n)()\n\nexport interface SidebarMainPanelProps extends HTMLStyledProps {}\n\nexport const SidebarMainPanel = withContext<\"div\", SidebarMainPanelProps>(\n \"div\",\n \"mainPanel\",\n)()\n\nexport interface SidebarTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarTrigger = withContext<\"button\", SidebarTriggerProps>(\n \"button\",\n \"trigger\",\n)(undefined, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return { asChild: true, ...getTriggerProps(props) }\n})\n\nexport interface SidebarSidePanelProps\n extends\n Omit<HTMLStyledProps<\"aside\">, \"content\">,\n Pick<SidebarContentProps, \"items\">,\n Pick<\n SidebarItemProps,\n | \"animated\"\n | \"endElement\"\n | \"endElementProps\"\n | \"indicator\"\n | \"indicatorProps\"\n | \"labelProps\"\n | \"linkProps\"\n | \"loadingScheme\"\n | \"render\"\n | \"startElement\"\n | \"startElementProps\"\n | \"tooltipProps\"\n | \"triggerProps\"\n > {\n /**\n * The content of the sidebar.\n */\n content?: ReactNode\n /**\n * The footer of the sidebar.\n */\n footer?: ReactNode\n /**\n * The header of the sidebar.\n */\n header?: ReactNode\n /**\n * If `true`, hide the tree indicator icon for all items.\n *\n * @default false\n */\n indicatorHidden?: boolean\n /**\n * If `true`, the sidebar will be rendered with a handle.\n *\n * @default true\n */\n withHandle?: boolean\n /**\n * Props for the content component.\n */\n contentProps?: SidebarContentProps\n /**\n * Props for the drawer component.\n */\n drawerProps?: Omit<\n Drawer.RootProps,\n | \"body\"\n | \"cancel\"\n | \"children\"\n | \"footer\"\n | \"header\"\n | \"middle\"\n | \"onCancel\"\n | \"onClose\"\n | \"onMiddle\"\n | \"onOpen\"\n | \"onSuccess\"\n | \"open\"\n | \"success\"\n | \"title\"\n | \"trigger\"\n >\n /**\n * Props for the footer component.\n */\n footerProps?: SidebarFooterProps\n /**\n * Props for the group content component.\n */\n groupContentProps?: Omit<SidebarGroupContentProps, \"children\">\n /**\n * Props for the group component.\n */\n groupProps?: Omit<SidebarGroupProps, \"children\" | \"label\" | \"value\">\n /**\n * Props for the handle component.\n */\n handleProps?: SidebarHandleProps\n /**\n * Props for the header component.\n */\n headerProps?: SidebarHeaderProps\n /**\n * Props for the item content component.\n */\n itemContentProps?: SidebarItemContentProps\n /**\n * Props for the item component.\n */\n itemProps?: Omit<\n SidebarItemProps,\n \"children\" | \"items\" | \"label\" | \"open\" | \"value\"\n >\n /**\n * Props for the menu component.\n *\n * @default 'md'\n */\n menuProps?: SidebarMenuProps\n}\n\nexport const SidebarSidePanel = withContext<\"aside\", SidebarSidePanelProps>(\n ({\n animated = true,\n children,\n content,\n endElement,\n footer,\n header,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n render,\n startElement,\n withHandle = true,\n contentProps,\n drawerProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ...rest\n }) => {\n const { mobile, open, onClose } = useSidebarContext()\n const { breakpoint, placement, getSidePanelProps } = useComponentContext()\n const [\n omittedChildren,\n customHeader,\n customContent,\n customFooter,\n customHandle,\n ] = useSplitChildren(\n children,\n SidebarHeader,\n SidebarContent,\n SidebarFooter,\n SidebarHandle,\n )\n const context = useMemo(\n () => ({\n animated,\n endElement,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n render,\n startElement,\n contentProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n }),\n [\n animated,\n endElement,\n indicator,\n indicatorHidden,\n items,\n render,\n loadingScheme,\n startElement,\n contentProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ],\n )\n\n return (\n <SidePanelComponentContext value={context}>\n {mobile ? (\n <Drawer.Root\n size=\"sm\"\n autoFocus={false}\n duration={!animated ? 0 : undefined}\n open={open}\n placement={`inline-${placement}`}\n withCloseButton={false}\n portalProps={{ disabled: true }}\n onClose={onClose}\n {...drawerProps}\n >\n <Drawer.Content>\n {customHeader ??\n (header ? <SidebarHeader>{header}</SidebarHeader> : null)}\n\n {customContent ??\n (content || items ? (\n <SidebarContent>{content}</SidebarContent>\n ) : null)}\n\n {customFooter ??\n (footer ? <SidebarFooter>{footer}</SidebarFooter> : null)}\n </Drawer.Content>\n </Drawer.Root>\n ) : (\n <>\n <SidebarGap\n data-animated={dataAttr(animated)}\n display={\n breakpoint\n ? { base: undefined, [breakpoint]: \"none\" }\n : undefined\n }\n />\n\n <styled.aside\n data-animated={dataAttr(animated)}\n data-group\n display={\n breakpoint\n ? { base: undefined, [breakpoint]: \"none\" }\n : undefined\n }\n {...getSidePanelProps(rest)}\n >\n {customHeader ??\n (header ? <SidebarHeader>{header}</SidebarHeader> : null)}\n {customContent ??\n (content || items ? (\n <SidebarContent>{content}</SidebarContent>\n ) : null)}\n {customFooter ??\n (footer ? <SidebarFooter>{footer}</SidebarFooter> : null)}\n {customHandle ?? (withHandle ? <SidebarHandle /> : null)}\n\n {omittedChildren}\n </styled.aside>\n </>\n )}\n </SidePanelComponentContext>\n )\n },\n \"sidePanel\",\n)()\n\ninterface SidebarGapProps extends HTMLStyledProps<\"div\"> {}\n\nconst SidebarGap = withContext<\"div\", SidebarGapProps>(\"div\", \"gap\")()\n\nexport interface SidebarHeaderProps extends HTMLStyledProps<\"header\"> {}\n\nexport const SidebarHeader = withContext<\"header\", SidebarHeaderProps>(\n \"header\",\n \"header\",\n)(undefined, (props) => {\n const { getHeaderProps } = useComponentContext()\n const { headerProps } = useSidePanelComponentContext()\n\n return getHeaderProps(mergeProps(headerProps, props)())\n})\n\nexport interface SidebarFooterProps extends HTMLStyledProps<\"footer\"> {}\n\nexport const SidebarFooter = withContext<\"footer\", SidebarFooterProps>(\n \"footer\",\n \"footer\",\n)(undefined, (props) => {\n const { getFooterProps } = useComponentContext()\n const { footerProps } = useSidePanelComponentContext()\n\n return getFooterProps(mergeProps(footerProps, props)())\n})\n\nexport interface SidebarContentProps extends HTMLStyledProps<\"ul\"> {\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItem[]\n}\n\nexport const SidebarContent = withContext<\"ul\", SidebarContentProps>(\n ({ children, items, ...rest }) => {\n const { getContentProps } = useComponentContext()\n const { items: rootItems, contentProps } = useSidePanelComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return (items ?? rootItems)?.map((props, index) => {\n const key = createKey(props, index)\n\n if (\"group\" in props) {\n const { children, group: _, ...rest } = props\n\n return <SidebarGroup key={key} items={children} {...rest} />\n } else {\n const { children, ...rest } = props\n\n return <SidebarItem key={key} items={children} {...rest} />\n }\n })\n }, [children, items, rootItems])\n\n return (\n <styled.ul {...getContentProps(mergeProps(contentProps, rest)())}>\n {computedChildren}\n </styled.ul>\n )\n },\n \"content\",\n)()\n\nexport interface SidebarHandleProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarHandle = withContext<\"button\", SidebarHandleProps>(\n (props) => {\n const { handleProps } = useSidePanelComponentContext()\n\n return (\n <SidebarTrigger {...mergeProps(handleProps, props)()}>\n <styled.button tabIndex={-1} />\n </SidebarTrigger>\n )\n },\n \"handle\",\n)()\n\nexport interface SidebarGroupProps\n extends\n Omit<HTMLStyledProps<\"li\">, \"content\" | \"value\">,\n UseSidebarGroupProps {\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItemWithValue[]\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the content component.\n */\n contentProps?: Omit<SidebarGroupContentProps, \"children\">\n /**\n * Props for the label component.\n */\n labelProps?: HTMLStyledProps<\"span\">\n}\n\nexport const SidebarGroup = withContext<\"li\", SidebarGroupProps>(\n ({\n children,\n items,\n label,\n value: valueProp = isString(label) ? label : undefined,\n contentProps,\n labelProps,\n ...rest\n }) => {\n const { groupProps } = useSidePanelComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [children, items])\n const [omittedChildren, customLabel, customContent] = useSplitChildren(\n computedChildren,\n SidebarGroupLabel,\n SidebarGroupContent,\n )\n const { getContentProps, getLabelProps, getRootProps } = useSidebarGroup({\n ...mergeProps(groupProps, rest)(),\n value: valueProp,\n })\n const context = useMemo(\n () => ({ contentProps, getContentProps, getLabelProps, labelProps }),\n [getLabelProps, labelProps, getContentProps, contentProps],\n )\n\n return (\n <GroupComponentContext value={context}>\n <styled.li {...getRootProps()}>\n {customLabel ??\n (label ? <SidebarGroupLabel>{label}</SidebarGroupLabel> : null)}\n {customContent ?? (\n <SidebarGroupContent>{omittedChildren}</SidebarGroupContent>\n )}\n </styled.li>\n </GroupComponentContext>\n )\n },\n \"group\",\n)()\n\nexport interface SidebarGroupLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SidebarGroupLabel = withContext<\"span\", SidebarGroupLabelProps>(\n \"span\",\n \"groupLabel\",\n)(undefined, (props) => {\n const { getLabelProps, labelProps } = useGroupComponentContext()\n\n return getLabelProps(mergeProps(labelProps, props)())\n})\n\nexport interface SidebarGroupContentProps extends HTMLStyledProps<\"div\"> {}\n\nexport const SidebarGroupContent = withContext<\"div\", SidebarGroupContentProps>(\n \"div\",\n \"groupContent\",\n)(undefined, ({ children, ...rest }) => {\n const validChildren = useValidChildren(children)\n const list = useIncludesChildren(validChildren, SidebarItem)\n const { groupContentProps } = useSidePanelComponentContext()\n const { contentProps, getContentProps } = useGroupComponentContext()\n\n return {\n as: list ? \"ul\" : \"div\",\n children,\n ...getContentProps(mergeProps(groupContentProps, contentProps, rest)()),\n }\n})\n\nexport interface SidebarMenuProps extends HTMLStyledProps<\"div\"> {}\n\nexport const SidebarMenu = withContext<\"div\", SidebarMenuProps>(\"div\", \"menu\")(\n undefined,\n (props) => {\n const { menuProps } = useSidePanelComponentContext()\n\n return { \"data-menu\": \"\", ...mergeProps(menuProps, props)() }\n },\n)\n\nexport interface SidebarMenuButtonProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarMenuButton = withContext<\"button\", SidebarMenuButtonProps>(\n \"button\",\n [\"menu\", \"button\"],\n)(undefined, (props) => {\n const { open } = useSidebarContext()\n const { mode } = useComponentContext()\n const { menuProps } = useSidePanelComponentContext()\n const offcanvas = mode === \"offcanvas\"\n const { disabled, ...rest } = mergeProps(menuProps, props)()\n\n return {\n \"data-menu\": \"\",\n disabled,\n ...rest,\n tabIndex: (!offcanvas || open) && !disabled ? 0 : -1,\n }\n})\n\nexport interface SidebarItemProps\n extends\n Omit<HTMLStyledProps<\"li\">, \"value\">,\n Omit<UseSidebarItemProps, \"asyncChildren\"> {\n /**\n * The label to display in the item.\n */\n label: ReactNode\n /**\n * If `true`, the sidebar item will be animated.\n *\n * @default true\n */\n animated?: boolean\n /**\n * The element to display at the end of the item.\n */\n endElement?: SidebarItemReactNode\n /**\n * The sidebar item indicator icon to use.\n */\n indicator?: ReactNodeOrFunction<SidebarItemCallBackProps>\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItemWithValue[]\n /**\n * The loading scheme.\n *\n * @default 'oval'\n */\n loadingScheme?: Loading.Scheme\n /**\n * If provided, the sidebar item will be rendered with custom components.\n */\n render?: SidebarItemRender\n /**\n * The element to display at the start of the item.\n */\n startElement?: SidebarItemReactNode\n /**\n * Props for the content component.\n */\n contentProps?: Omit<SidebarItemContentProps, \"children\">\n /**\n * Props for the end component.\n */\n endElementProps?: SidebarItemEndElementProps\n /**\n * Props for the indicator component.\n */\n indicatorProps?: SidebarItemIndicatorProps\n /**\n * Props for the label component.\n */\n labelProps?: SidebarItemLabelProps\n /**\n * Props for the link component.\n */\n linkProps?: SidebarItemLinkProps\n /**\n * Props for the start component.\n */\n startElementProps?: SidebarItemStartElementProps\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: Omit<SidebarItemTooltipProps, \"children\" | \"content\">\n /**\n * Props for the trigger component.\n */\n triggerProps?: SidebarItemTriggerProps\n /**\n * If provided, the sidebar item will be rendered as an async sidebar item.\n */\n asyncChildren?: () => Promise<SidebarItemWithValue[]>\n}\n\nexport const SidebarItem = withContext<\"li\", SidebarItemProps>(\n ({\n animated: animatedProp,\n asyncChildren: asyncChildrenProp,\n children: childrenProp,\n endElement,\n indicator: indicatorProp,\n items,\n label,\n loadingScheme,\n render,\n startElement,\n contentProps,\n endElementProps,\n indicatorProps,\n labelProps,\n linkProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ...rest\n }) => {\n const { mode } = useComponentContext()\n const offcanvas = mode === \"offcanvas\"\n const componentContext = useSidePanelComponentContext()\n const Loading = useLoadingComponent(\n loadingScheme ?? componentContext.loadingScheme ?? \"oval\",\n )\n const computedChildren = useMemo(() => {\n if (childrenProp) return childrenProp\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [childrenProp, items])\n const asyncChildren = useCallback(async () => {\n const items = await asyncChildrenProp?.()\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [asyncChildrenProp])\n const {\n branchOpen,\n children,\n disabled,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n open,\n selected,\n selectedValue,\n value,\n getContentProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n getLinkProps,\n getTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n } = useSidebarItem({\n ...mergeProps(componentContext.itemProps, rest)(),\n asyncChildren: asyncChildrenProp ? asyncChildren : undefined,\n children: computedChildren,\n })\n const animated = animatedProp ?? componentContext.animated ?? true\n const tabIndex = offcanvas\n ? open && expanded && !disabled\n ? 0\n : -1\n : expanded && !disabled\n ? 0\n : -1\n const callbackProps = useMemo(\n () => ({ disabled, expanded: groupOpen }),\n [disabled, groupOpen],\n )\n const mergedTriggerProps = useMemo(() => {\n return getTriggerProps({\n tabIndex,\n ...mergeProps(componentContext.triggerProps, triggerProps)(),\n }) as SidebarItemTriggerProps\n }, [getTriggerProps, tabIndex, componentContext.triggerProps, triggerProps])\n const mergedLinkProps = useMemo(() => {\n return getLinkProps({\n tabIndex,\n ...mergeProps(componentContext.linkProps, linkProps)(),\n }) as SidebarItemLinkProps\n }, [getLinkProps, tabIndex, componentContext.linkProps, linkProps])\n const indicator = useMemo<ReactNode>(\n () => runIfFn(indicatorProp ?? componentContext.indicator, callbackProps),\n [indicatorProp, componentContext.indicator, callbackProps],\n )\n const groupStartElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"group\",\n startElement,\n componentContext.startElement,\n ),\n callbackProps,\n ),\n [startElement, componentContext.startElement, callbackProps],\n )\n const groupEndElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"group\",\n endElement,\n componentContext.endElement,\n ),\n callbackProps,\n ),\n [endElement, componentContext.endElement, callbackProps],\n )\n const itemStartElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"item\",\n startElement,\n componentContext.startElement,\n ),\n callbackProps,\n ),\n [startElement, componentContext.startElement, callbackProps],\n )\n const itemEndElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"item\",\n endElement,\n componentContext.endElement,\n ),\n callbackProps,\n ),\n [endElement, componentContext.endElement, callbackProps],\n )\n const trigger = useMemo<ReactNode>(\n () =>\n runIfFn(render?.trigger ?? componentContext.render?.trigger, {\n endElement: groupEndElement,\n expanded,\n expandedValue,\n groupLoading,\n groupOpen,\n indicator,\n label,\n selected,\n selectedValue,\n startElement: groupStartElement,\n value,\n triggerProps: mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }),\n [\n render?.trigger,\n componentContext.render?.trigger,\n groupEndElement,\n expanded,\n expandedValue,\n groupLoading,\n groupOpen,\n indicator,\n label,\n selected,\n selectedValue,\n groupStartElement,\n value,\n mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n ],\n )\n const link = useMemo<ReactNode>(\n () =>\n runIfFn(render?.link ?? componentContext.render?.link, {\n endElement: itemEndElement,\n expanded,\n expandedValue,\n label,\n selected,\n selectedValue,\n startElement: itemStartElement,\n value,\n linkProps: mergedLinkProps,\n onExpandedChange,\n onSelectedChange,\n }),\n [\n render?.link,\n componentContext.render?.link,\n itemEndElement,\n expanded,\n expandedValue,\n label,\n selected,\n selectedValue,\n itemStartElement,\n value,\n mergedLinkProps,\n onExpandedChange,\n onSelectedChange,\n ],\n )\n const item = useMemo<ReactNode>(\n () =>\n runIfFn(render?.item ?? componentContext.render?.item, {\n children,\n endElement: { group: groupEndElement, item: itemEndElement },\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n indicator,\n label,\n link,\n selected,\n selectedValue,\n startElement: { group: groupStartElement, item: itemStartElement },\n trigger,\n value,\n itemProps: getItemProps() as HTMLStyledProps<\"li\">,\n linkProps: mergedLinkProps,\n triggerProps: mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }),\n [\n render?.item,\n componentContext.render?.item,\n children,\n groupEndElement,\n itemEndElement,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n indicator,\n label,\n link,\n selected,\n selectedValue,\n groupStartElement,\n itemStartElement,\n trigger,\n value,\n getItemProps,\n mergedLinkProps,\n mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n ],\n )\n const context = useMemo(\n () => ({ branchOpen, groupOpen }),\n [branchOpen, groupOpen],\n )\n const itemComponentContext = useMemo(\n () => ({\n contentProps: {\n duration: !animated ? 0 : undefined,\n open: groupOpen,\n ...getContentProps(\n mergeProps(componentContext.itemContentProps, contentProps)(),\n ),\n },\n endElementProps: mergeProps(\n componentContext.endElementProps,\n endElementProps,\n )(),\n indicatorProps: getIndicatorProps({\n \"data-animated\": dataAttr(animated),\n ...mergeProps(componentContext.indicatorProps, indicatorProps)(),\n }) as SidebarItemIndicatorProps,\n labelProps: getLabelProps(\n mergeProps(componentContext.labelProps, labelProps)(),\n ) as SidebarItemLabelProps,\n startElementProps: mergeProps(\n componentContext.startElementProps,\n startElementProps,\n )(),\n tooltipProps: {\n content: label,\n disabled: open,\n ...mergeProps(componentContext.tooltipProps, tooltipProps)(),\n },\n }),\n [\n animated,\n componentContext.endElementProps,\n componentContext.indicatorProps,\n componentContext.itemContentProps,\n componentContext.labelProps,\n componentContext.startElementProps,\n componentContext.tooltipProps,\n contentProps,\n endElementProps,\n getContentProps,\n getIndicatorProps,\n getLabelProps,\n groupOpen,\n indicatorProps,\n label,\n labelProps,\n open,\n startElementProps,\n tooltipProps,\n ],\n )\n\n return (\n <SidebarItemContext value={context}>\n <ItemComponentContext value={itemComponentContext}>\n {item ?? (\n <styled.li {...getItemProps()}>\n {group ? (\n <>\n {trigger ?? (\n <SidebarItemTrigger {...mergedTriggerProps}>\n {groupStartElement ? (\n <SidebarItemStartElement>\n {groupStartElement}\n </SidebarItemStartElement>\n ) : null}\n {label ? (\n <SidebarItemLabel>{label}</SidebarItemLabel>\n ) : null}\n {groupEndElement ? (\n <SidebarItemEndElement>\n {groupEndElement}\n </SidebarItemEndElement>\n ) : null}\n <SidebarItemIndicator>\n {groupLoading ? (\n <Loading />\n ) : (\n runIfFn(indicator, callbackProps)\n )}\n </SidebarItemIndicator>\n </SidebarItemTrigger>\n )}\n\n <SidebarItemContent>{children}</SidebarItemContent>\n </>\n ) : (\n (link ?? (\n <SidebarItemLink {...mergedLinkProps}>\n {itemStartElement ? (\n <SidebarItemStartElement>\n {itemStartElement}\n </SidebarItemStartElement>\n ) : null}\n {label ? (\n <SidebarItemLabel>{label}</SidebarItemLabel>\n ) : null}\n {itemEndElement ? (\n <SidebarItemEndElement>\n {itemEndElement}\n </SidebarItemEndElement>\n ) : null}\n </SidebarItemLink>\n ))\n )}\n </styled.li>\n )}\n </ItemComponentContext>\n </SidebarItemContext>\n )\n },\n \"item\",\n)()\n\ninterface SidebarItemTooltipProps extends TooltipProps {}\n\nconst SidebarItemTooltip: FC<SidebarItemTooltipProps> = (props) => {\n const { tooltipProps } = useItemComponentContext()\n const { children, disabled, ...rest } = mergeProps(tooltipProps, props)()\n const { mode, placement } = useComponentContext()\n const offcanvas = mode === \"offcanvas\"\n\n if (offcanvas || disabled) return children\n else\n return (\n <Tooltip\n closeOnClick={false}\n gutter={16}\n placement={`center-${placement === \"start\" ? \"end\" : \"start\"}`}\n {...rest}\n >\n {children}\n </Tooltip>\n )\n}\n\nexport interface SidebarItemTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarItemTrigger = withContext<\n \"button\",\n SidebarItemTriggerProps\n>((props) => {\n return (\n <SidebarItemTooltip>\n <styled.button {...props} />\n </SidebarItemTooltip>\n )\n}, \"itemTrigger\")()\n\nexport interface SidebarItemLinkProps extends HTMLStyledProps<\"a\"> {}\n\nexport const SidebarItemLink = withContext<\"a\", SidebarItemLinkProps>(\n (props) => {\n return (\n <SidebarItemTooltip>\n <styled.a {...props} />\n </SidebarItemTooltip>\n )\n },\n \"itemLink\",\n)()\n\nexport interface SidebarItemContentProps\n extends\n Omit<HTMLStyledProps<\"ul\">, \"transition\">,\n Pick<CollapseProps, \"animationOpacity\" | keyof WithTransitionProps> {}\n\nexport const SidebarItemContent = withContext<\"ul\", SidebarItemContentProps>(\n (props) => {\n const { contentProps } = useItemComponentContext()\n\n return (\n <Collapse\n as=\"ul\"\n {...cast<CollapseProps>(mergeProps(contentProps, props)())}\n />\n )\n },\n \"itemContent\",\n)()\n\nexport interface SidebarItemIndicatorProps extends HTMLStyledProps<\"svg\"> {}\n\nexport const SidebarItemIndicator = withContext<\n \"svg\",\n SidebarItemIndicatorProps\n>(({ children = <ChevronRightIcon />, ...rest }) => {\n const { indicatorHidden } = useSidePanelComponentContext()\n\n if (indicatorHidden) return null\n\n if (isValidElement<HTMLProps<\"svg\">>(children))\n return cloneElement(children, { ...rest, ...children.props })\n\n return Children.count(children) > 1 ? Children.only(null) : null\n}, \"itemIndicator\")(undefined, (props) => {\n const { indicatorProps } = useItemComponentContext()\n\n return mergeProps(indicatorProps, props)()\n})\n\nexport interface SidebarItemStartElementProps extends HTMLStyledProps {}\n\nexport const SidebarItemStartElement = withContext<\n \"div\",\n SidebarItemStartElementProps\n>(\"div\", {\n name: \"ItemStartElement\",\n slot: [\"itemElement\", \"start\"],\n})(undefined, (props) => {\n const { startElementProps } = useItemComponentContext()\n\n return mergeProps(startElementProps, props)()\n})\n\nexport interface SidebarItemEndElementProps extends HTMLStyledProps {}\n\nexport const SidebarItemEndElement = withContext<\n \"div\",\n SidebarItemEndElementProps\n>(\"div\", {\n name: \"ItemEndElement\",\n slot: [\"itemElement\", \"end\"],\n})(undefined, (props) => {\n const { endElementProps } = useItemComponentContext()\n\n return mergeProps(endElementProps, props)()\n})\n\nexport interface SidebarItemLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SidebarItemLabel = withContext<\"span\", SidebarItemLabelProps>(\n \"span\",\n \"itemLabel\",\n)(undefined, (props) => {\n const { labelProps } = useItemComponentContext()\n\n return mergeProps(labelProps, props)()\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0JA,MAAM,aAAa,OAAoB,UAAkB;CACvD,OAAO,WAAW,QAAQ,MAAM,SAAS,QAAQ;AACnD;AAEA,MAAM,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B,CAAC,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,oBAAoB,wBAAwB;CAEpD,OAAOA,cAAAA,WAAW,iBAAiB,KAAK,CAAC,CAAC;AAC5C,CAAC;AAID,MAAa,mBAAmB,YAC9B,QACA,WACF,CAAC,CAAC,KAAA,IAAY,UAAU;CACtB,MAAM,EAAE,eAAe,wBAAwB;CAE/C,OAAOA,cAAAA,WAAW,YAAY,KAAK,CAAC,CAAC;AACvC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_context = require("../../utils/context.cjs");
3
4
  const require_dom = require("../../utils/dom.cjs");
4
5
  const require_effect = require("../../utils/effect.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"use-sidebar.cjs","names":["createDescendants","createContext","useI18n","useDisclosure","useControllableState","mergeProps","useEnvironment","mergeRefs","useIds","Children","useAsyncCallback"],"sources":["../../../../src/components/sidebar/use-sidebar.ts"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode, RefObject } from \"react\"\nimport { Children, useCallback, useId, useRef, useState } from \"react\"\nimport {\n type HTMLProps,\n mergeProps,\n type PropGetter,\n useEnvironment,\n} from \"../../core\"\nimport { useAsyncCallback } from \"../../hooks/use-async-callback\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport { createDescendants } from \"../../hooks/use-descendants\"\nimport {\n useDisclosure,\n type UseDisclosureProps,\n} from \"../../hooks/use-disclosure\"\nimport { useWindowEvent } from \"../../hooks/use-window-event\"\nimport { useI18n } from \"../../providers/i18n-provider\"\nimport {\n ariaAttr,\n assignRef,\n createContext,\n cx,\n dataAttr,\n handlerAll,\n mergeRefs,\n setAttribute,\n useIds,\n useSafeLayoutEffect,\n} from \"../../utils\"\n\nexport interface SidebarControl {\n collapse: () => void\n expand: () => void\n}\n\ninterface SidebarDescendantProps {\n expanded: boolean\n group: boolean\n id: string\n value: string\n}\n\nconst {\n DescendantsContext: SidebarDescendantsContext,\n useDescendant: useSidebarDescendant,\n useDescendants: useSidebarDescendants,\n} = createDescendants<HTMLElement, SidebarDescendantProps>()\n\nexport {\n SidebarDescendantsContext,\n useSidebarDescendant,\n useSidebarDescendants,\n}\n\ninterface SidebarContext extends Pick<\n UseSidebarReturn,\n | \"expandedValue\"\n | \"mobile\"\n | \"onClose\"\n | \"onExpandedChange\"\n | \"onOpen\"\n | \"onSelectedChange\"\n | \"onToggle\"\n | \"open\"\n | \"selectedValue\"\n> {}\n\nconst [SidebarContext, useSidebarContext] = createContext<SidebarContext>({\n name: \"SidebarContext\",\n})\n\nexport { SidebarContext, useSidebarContext }\n\ninterface SidebarItemContext extends Pick<\n UseSidebarItemReturn,\n \"branchOpen\" | \"groupOpen\"\n> {}\n\nconst [SidebarItemContext, useSidebarItemContext] =\n createContext<SidebarItemContext>({\n name: \"SidebarItemContext\",\n strict: false,\n })\n\nexport { SidebarItemContext, useSidebarItemContext }\n\nexport interface UseSidebarProps extends HTMLProps<\"div\"> {\n /**\n * Ref of the sidebar callbacks.\n */\n controlRef?: RefObject<null | SidebarControl>\n /**\n * The initial expanded value of the sidebar.\n */\n defaultExpandedValue?: string[]\n /**\n * The initial selected value of the sidebar.\n */\n defaultSelectedValue?: string\n /**\n * The disclosure props for the desktop and mobile.\n */\n disclosure?: {\n desktop?: Omit<UseDisclosureProps, \"timing\">\n mobile?: Omit<UseDisclosureProps, \"timing\">\n }\n /**\n * The expanded value of the sidebar.\n */\n expandedValue?: string[]\n /**\n * If `true`, the trigger click event will be switched to mobile.\n *\n * @default false\n */\n mobile?: boolean\n /**\n * The selected value of the sidebar.\n */\n selectedValue?: string\n /**\n * The callback invoked when expanded value changes.\n */\n onExpandedChange?: (value: string[]) => void\n /**\n * The callback invoked when selected value changes.\n */\n onSelectedChange?: (value: string) => void\n}\n\nexport const useSidebar = ({\n controlRef,\n defaultExpandedValue = [],\n defaultSelectedValue,\n disclosure,\n expandedValue: expandedValueProp,\n mobile = false,\n selectedValue: selectedValueProp,\n onExpandedChange: onExpandedChangeProp,\n onSelectedChange: onSelectedChangeProp,\n ...rest\n}: UseSidebarProps = {}) => {\n const { t } = useI18n(\"sidebar\")\n const desktopDisclosure = useDisclosure({\n defaultOpen: disclosure?.desktop?.defaultOpen ?? true,\n open: disclosure?.desktop?.open,\n onClose: disclosure?.desktop?.onClose,\n onOpen: disclosure?.desktop?.onOpen,\n })\n const mobileDisclosure = useDisclosure({\n defaultOpen: disclosure?.mobile?.defaultOpen ?? false,\n open: disclosure?.mobile?.open,\n onClose: disclosure?.mobile?.onClose,\n onOpen: disclosure?.mobile?.onOpen,\n })\n const [selectedValue, setSelectedValue] = useControllableState({\n defaultValue: defaultSelectedValue,\n value: selectedValueProp,\n onChange: onSelectedChangeProp,\n })\n const [expandedValue, setExpandedValue] = useControllableState({\n defaultValue: defaultExpandedValue,\n value: expandedValueProp,\n onChange: onExpandedChangeProp,\n })\n const descendants = useSidebarDescendants()\n const open = mobile ? mobileDisclosure.open : desktopDisclosure.open\n const onOpen = mobile ? mobileDisclosure.onOpen : desktopDisclosure.onOpen\n const onClose = mobile ? mobileDisclosure.onClose : desktopDisclosure.onClose\n const onToggle = mobile\n ? mobileDisclosure.onToggle\n : desktopDisclosure.onToggle\n\n const onSelectedChange = useCallback(\n (value: string) => {\n setSelectedValue(value)\n },\n [setSelectedValue],\n )\n\n const onExpandAll = useCallback(() => {\n const values = descendants.enabledValues()\n const group = values.filter(({ group }) => group)\n const value = group.map(({ value }) => value)\n\n setExpandedValue(value)\n }, [descendants, setExpandedValue])\n\n const onCollapseAll = useCallback(() => {\n setExpandedValue([])\n }, [setExpandedValue])\n\n const onExpandedChange = useCallback(\n (value: string) => {\n setExpandedValue((prev) => {\n if (prev.includes(value))\n return prev.filter((prevValue) => prevValue !== value)\n else return [...prev, value]\n })\n },\n [setExpandedValue],\n )\n\n assignRef(controlRef, { collapse: onCollapseAll, expand: onExpandAll })\n\n useWindowEvent(\"keydown\", (ev) => {\n if (ev.key !== \"b\") return\n if (!ev.metaKey && !ev.ctrlKey) return\n\n ev.preventDefault()\n\n desktopDisclosure.onToggle()\n })\n\n const getRootProps: PropGetter<\"div\"> = useCallback(\n (props = {}) =>\n mergeProps({ \"data-expanded\": dataAttr(open) }, rest, props)(),\n [open, rest],\n )\n\n const getTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n \"aria-expanded\": open,\n \"aria-label\": t(open ? \"Close sidebar\" : \"Open sidebar\"),\n ...props,\n onClick: handlerAll(props.onClick, onToggle),\n }),\n [open, t, onToggle],\n )\n\n const getSidePanelProps: PropGetter<\"aside\"> = useCallback(\n (props = {}) => ({ \"data-expanded\": dataAttr(open), ...props }),\n [open],\n )\n\n const getHeaderProps: PropGetter<\"header\"> = useCallback(\n (props = {}) => ({ ...props }),\n [],\n )\n\n const getFooterProps: PropGetter<\"footer\"> = useCallback(\n (props = {}) => ({ ...props }),\n [],\n )\n\n const getContentProps: PropGetter<\"ul\"> = useCallback(\n (props = {}) => ({ ...props }),\n [],\n )\n\n return {\n descendants,\n expandedValue,\n mobile,\n open,\n selectedValue,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getRootProps,\n getSidePanelProps,\n getTriggerProps,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n }\n}\n\nexport type UseSidebarReturn = ReturnType<typeof useSidebar>\n\nexport interface UseSidebarGroupProps extends HTMLProps<\"li\"> {}\n\nexport const useSidebarGroup = ({ ...rest }: UseSidebarGroupProps = {}) => {\n const { getDocument } = useEnvironment()\n const rootRef = useRef<HTMLLIElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n const labelId = useId()\n\n useSafeLayoutEffect(() => {\n const el = getDocument()?.getElementById(labelId)\n\n if (!el) return\n\n if (rootRef.current)\n setAttribute(rootRef.current, \"aria-labelledby\", labelId)\n if (contentRef.current)\n setAttribute(contentRef.current, \"aria-labelledby\", labelId)\n }, [])\n\n const getRootProps: PropGetter<\"li\"> = useCallback(\n ({ ref, ...props } = {}) =>\n mergeProps({ ref }, rest, props, { ref: rootRef })(),\n [rest, rootRef],\n )\n\n const getLabelProps: PropGetter<\"span\"> = useCallback(\n (props = {}) => ({ id: labelId, ...props }),\n [labelId],\n )\n\n const getContentProps: PropGetter<\"div\"> = useCallback(\n ({ ref, ...props } = {}) => ({\n ref: mergeRefs(ref, contentRef),\n ...props,\n }),\n [],\n )\n\n return { getContentProps, getLabelProps, getRootProps }\n}\n\nexport type UseSidebarGroupReturn = ReturnType<typeof useSidebarGroup>\n\nexport interface UseSidebarItemProps\n extends HTMLProps<\"li\">, Omit<UseDisclosureProps, \"timing\"> {\n /**\n * The value of the item.\n */\n value: string\n /**\n * If `true`, the tree item will be disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * If `true`, the link will open in new tab.\n *\n * @default false\n */\n external?: boolean\n /**\n * If provided, the sidebar item will be rendered as an async sidebar item.\n */\n asyncChildren?: () => Promise<ReactNode>\n}\n\nexport const useSidebarItem = ({\n asyncChildren,\n children: childrenProp,\n defaultOpen,\n disabled = false,\n external,\n open: openProp,\n value,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n ...rest\n}: UseSidebarItemProps) => {\n const context = useSidebarItemContext()\n const {\n expandedValue,\n open,\n selectedValue,\n onExpandedChange,\n onSelectedChange,\n } = useSidebarContext()\n const [children, setChildren] = useState<ReactNode>(childrenProp)\n const [itemId, labelId, contentId] = useIds()\n const initialAsyncRef = useRef(false)\n const async = !!asyncChildren\n const group = async || Children.count(children) > 0\n const nested = !!context\n const selected = !!value && selectedValue === value\n const defaultExpanded = !!value && expandedValue.includes(value)\n const {\n open: groupOpen,\n onClose,\n onOpen,\n } = useDisclosure({\n defaultOpen: defaultOpen ?? defaultExpanded,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const branchOpen: boolean[] = nested\n ? [...context.branchOpen, groupOpen]\n : [groupOpen]\n const expanded = branchOpen.slice(0, -1).every(Boolean)\n const { register } = useSidebarDescendant({\n id: itemId!,\n disabled,\n expanded,\n group,\n value,\n })\n\n const [groupLoading, onGroupChildren] = useAsyncCallback(async () => {\n const children = await asyncChildren?.()\n\n setChildren(children)\n }, [asyncChildren])\n\n const onGroupOpen = useCallback(() => {\n if (disabled || !group || !value || groupLoading) return\n\n if (async && !initialAsyncRef.current) {\n initialAsyncRef.current = true\n\n onGroupChildren()\n .then(() => {\n onOpen()\n onExpandedChange(value)\n })\n .catch(() => {\n initialAsyncRef.current = false\n })\n } else {\n onOpen()\n onExpandedChange(value)\n }\n }, [\n disabled,\n group,\n value,\n groupLoading,\n async,\n onGroupChildren,\n onOpen,\n onExpandedChange,\n ])\n\n const onGroupClose = useCallback(() => {\n if (disabled || !group || !value) return\n\n onClose()\n onExpandedChange(value)\n }, [disabled, group, value, onClose, onExpandedChange])\n\n const onGroupToggle = useCallback(() => {\n if (groupOpen) onGroupClose()\n else onGroupOpen()\n }, [groupOpen, onGroupClose, onGroupOpen])\n\n useSafeLayoutEffect(() => {\n if (defaultExpanded)\n if (async && !initialAsyncRef.current) {\n initialAsyncRef.current = true\n\n onGroupChildren()\n .then(() => {\n onOpen()\n })\n .catch(() => {\n initialAsyncRef.current = false\n })\n } else {\n onOpen()\n }\n else onClose()\n }, [defaultExpanded])\n\n const getItemProps: PropGetter<\"li\"> = useCallback(\n ({ ref, \"aria-labelledby\": ariaLabelledby, ...props } = {}) => {\n const merged = mergeProps(\n {\n id: itemId,\n \"aria-current\": selected ? \"page\" : undefined,\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"data-disabled\": dataAttr(disabled),\n \"data-selected\": dataAttr(selected),\n },\n rest,\n props,\n { ref },\n { ref: register },\n )()\n\n return {\n ...merged,\n onClick: handlerAll(\n merged.onClick,\n !group ? () => onSelectedChange(value) : undefined,\n ),\n }\n },\n [\n itemId,\n register,\n selected,\n disabled,\n labelId,\n rest,\n group,\n onSelectedChange,\n value,\n ],\n )\n\n const getIndicatorProps: PropGetter<\"svg\"> = useCallback(\n (props) => ({\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-expanded\": groupOpen,\n \"aria-hidden\": true,\n \"data-disabled\": dataAttr(disabled),\n \"data-loading\": dataAttr(groupLoading),\n \"data-selected\": dataAttr(selected),\n role: \"presentation\",\n ...props,\n }),\n [disabled, groupOpen, groupLoading, selected],\n )\n\n const getTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n \"aria-controls\": contentId,\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-expanded\": groupOpen,\n \"data-disabled\": dataAttr(disabled),\n \"data-expanded\": dataAttr(groupOpen),\n \"data-selected\": dataAttr(selected),\n tabIndex: open && expanded && !disabled ? 0 : -1,\n ...props,\n onClick: handlerAll(props.onClick, onGroupToggle),\n }),\n [contentId, disabled, groupOpen, selected, open, expanded, onGroupToggle],\n )\n\n const getLinkProps: PropGetter<\"a\"> = useCallback(\n (props = {}) => ({\n href: value,\n rel: external ? \"noopener\" : undefined,\n target: external ? \"_blank\" : undefined,\n \"data-disabled\": dataAttr(disabled),\n \"data-selected\": dataAttr(selected),\n tabIndex: open && expanded && !disabled ? 0 : -1,\n ...props,\n onClick: handlerAll(props.onClick, (ev) => {\n if (!disabled) return\n\n ev.preventDefault()\n ev.stopPropagation()\n }),\n }),\n [disabled, expanded, external, open, selected, value],\n )\n\n const getContentProps: PropGetter<\"ul\"> = useCallback(\n ({ \"aria-labelledby\": ariaLabelledby, ...props } = {}) => ({\n id: contentId,\n \"aria-busy\": ariaAttr(groupLoading),\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"data-disabled\": dataAttr(disabled),\n ...props,\n }),\n [contentId, labelId, disabled, groupLoading],\n )\n\n const getLabelProps: PropGetter<\"span\"> = useCallback(\n (props = {}) => ({ id: labelId, ...props }),\n [labelId],\n )\n\n return {\n branchOpen,\n children,\n disabled,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n open,\n selected,\n selectedValue,\n value,\n getContentProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n getLinkProps,\n getTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }\n}\n\nexport type UseSidebarItemReturn = ReturnType<typeof useSidebarItem>\n"],"mappings":";;;;;;;;;;;;;;;;AA4CA,MAAM,EACJ,oBAAoB,2BACpB,eAAe,sBACf,gBAAgB,0BACdA,oCAAAA,kBAAuD;AAqB3D,MAAM,CAAC,gBAAgB,qBAAqBC,gBAAAA,cAA8B,EACxE,MAAM,iBACR,CAAC;AASD,MAAM,CAAC,oBAAoB,yBACzBA,gBAAAA,cAAkC;CAChC,MAAM;CACN,QAAQ;AACV,CAAC;AAgDH,MAAa,cAAc,EACzB,YACA,uBAAuB,CAAC,GACxB,sBACA,YACA,eAAe,mBACf,SAAS,OACT,eAAe,mBACf,kBAAkB,sBAClB,kBAAkB,sBAClB,GAAG,SACgB,CAAC,MAAM;CAC1B,MAAM,EAAE,MAAMC,sBAAAA,QAAQ,SAAS;CAC/B,MAAM,oBAAoBC,uBAAAA,cAAc;EACtC,aAAa,YAAY,SAAS,eAAe;EACjD,MAAM,YAAY,SAAS;EAC3B,SAAS,YAAY,SAAS;EAC9B,QAAQ,YAAY,SAAS;CAC/B,CAAC;CACD,MAAM,mBAAmBA,uBAAAA,cAAc;EACrC,aAAa,YAAY,QAAQ,eAAe;EAChD,MAAM,YAAY,QAAQ;EAC1B,SAAS,YAAY,QAAQ;EAC7B,QAAQ,YAAY,QAAQ;CAC9B,CAAC;CACD,MAAM,CAAC,eAAe,oBAAoBC,2CAAAA,qBAAqB;EAC7D,cAAc;EACd,OAAO;EACP,UAAU;CACZ,CAAC;CACD,MAAM,CAAC,eAAe,oBAAoBA,2CAAAA,qBAAqB;EAC7D,cAAc;EACd,OAAO;EACP,UAAU;CACZ,CAAC;CACD,MAAM,cAAc,sBAAsB;CAC1C,MAAM,OAAO,SAAS,iBAAiB,OAAO,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C,OAAO;GAAE,IAAI;GAAS,GAAG;EAAM,IACzC,CAAC,OAAO,CAmBI;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"use-sidebar.cjs","names":["createDescendants","createContext","useI18n","useDisclosure","useControllableState","useCallback","mergeProps","useEnvironment","useRef","useId","mergeRefs","useState","useIds","Children","useAsyncCallback"],"sources":["../../../../src/components/sidebar/use-sidebar.ts"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode, RefObject } from \"react\"\nimport { Children, useCallback, useId, useRef, useState } from \"react\"\nimport {\n type HTMLProps,\n mergeProps,\n type PropGetter,\n useEnvironment,\n} from \"../../core\"\nimport { useAsyncCallback } from \"../../hooks/use-async-callback\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport { createDescendants } from \"../../hooks/use-descendants\"\nimport {\n useDisclosure,\n type UseDisclosureProps,\n} from \"../../hooks/use-disclosure\"\nimport { useWindowEvent } from \"../../hooks/use-window-event\"\nimport { useI18n } from \"../../providers/i18n-provider\"\nimport {\n ariaAttr,\n assignRef,\n createContext,\n cx,\n dataAttr,\n handlerAll,\n mergeRefs,\n setAttribute,\n useIds,\n useSafeLayoutEffect,\n} from \"../../utils\"\n\nexport interface SidebarControl {\n collapse: () => void\n expand: () => void\n}\n\ninterface SidebarDescendantProps {\n expanded: boolean\n group: boolean\n id: string\n value: string\n}\n\nconst {\n DescendantsContext: SidebarDescendantsContext,\n useDescendant: useSidebarDescendant,\n useDescendants: useSidebarDescendants,\n} = createDescendants<HTMLElement, SidebarDescendantProps>()\n\nexport {\n SidebarDescendantsContext,\n useSidebarDescendant,\n useSidebarDescendants,\n}\n\ninterface SidebarContext extends Pick<\n UseSidebarReturn,\n | \"expandedValue\"\n | \"mobile\"\n | \"onClose\"\n | \"onExpandedChange\"\n | \"onOpen\"\n | \"onSelectedChange\"\n | \"onToggle\"\n | \"open\"\n | \"selectedValue\"\n> {}\n\nconst [SidebarContext, useSidebarContext] = createContext<SidebarContext>({\n name: \"SidebarContext\",\n})\n\nexport { SidebarContext, useSidebarContext }\n\ninterface SidebarItemContext extends Pick<\n UseSidebarItemReturn,\n \"branchOpen\" | \"groupOpen\"\n> {}\n\nconst [SidebarItemContext, useSidebarItemContext] =\n createContext<SidebarItemContext>({\n name: \"SidebarItemContext\",\n strict: false,\n })\n\nexport { SidebarItemContext, useSidebarItemContext }\n\nexport interface UseSidebarProps extends HTMLProps<\"div\"> {\n /**\n * Ref of the sidebar callbacks.\n */\n controlRef?: RefObject<null | SidebarControl>\n /**\n * The initial expanded value of the sidebar.\n */\n defaultExpandedValue?: string[]\n /**\n * The initial selected value of the sidebar.\n */\n defaultSelectedValue?: string\n /**\n * The disclosure props for the desktop and mobile.\n */\n disclosure?: {\n desktop?: Omit<UseDisclosureProps, \"timing\">\n mobile?: Omit<UseDisclosureProps, \"timing\">\n }\n /**\n * The expanded value of the sidebar.\n */\n expandedValue?: string[]\n /**\n * If `true`, the trigger click event will be switched to mobile.\n *\n * @default false\n */\n mobile?: boolean\n /**\n * The selected value of the sidebar.\n */\n selectedValue?: string\n /**\n * The callback invoked when expanded value changes.\n */\n onExpandedChange?: (value: string[]) => void\n /**\n * The callback invoked when selected value changes.\n */\n onSelectedChange?: (value: string) => void\n}\n\nexport const useSidebar = ({\n controlRef,\n defaultExpandedValue = [],\n defaultSelectedValue,\n disclosure,\n expandedValue: expandedValueProp,\n mobile = false,\n selectedValue: selectedValueProp,\n onExpandedChange: onExpandedChangeProp,\n onSelectedChange: onSelectedChangeProp,\n ...rest\n}: UseSidebarProps = {}) => {\n const { t } = useI18n(\"sidebar\")\n const desktopDisclosure = useDisclosure({\n defaultOpen: disclosure?.desktop?.defaultOpen ?? true,\n open: disclosure?.desktop?.open,\n onClose: disclosure?.desktop?.onClose,\n onOpen: disclosure?.desktop?.onOpen,\n })\n const mobileDisclosure = useDisclosure({\n defaultOpen: disclosure?.mobile?.defaultOpen ?? false,\n open: disclosure?.mobile?.open,\n onClose: disclosure?.mobile?.onClose,\n onOpen: disclosure?.mobile?.onOpen,\n })\n const [selectedValue, setSelectedValue] = useControllableState({\n defaultValue: defaultSelectedValue,\n value: selectedValueProp,\n onChange: onSelectedChangeProp,\n })\n const [expandedValue, setExpandedValue] = useControllableState({\n defaultValue: defaultExpandedValue,\n value: expandedValueProp,\n onChange: onExpandedChangeProp,\n })\n const descendants = useSidebarDescendants()\n const open = mobile ? mobileDisclosure.open : desktopDisclosure.open\n const onOpen = mobile ? mobileDisclosure.onOpen : desktopDisclosure.onOpen\n const onClose = mobile ? mobileDisclosure.onClose : desktopDisclosure.onClose\n const onToggle = mobile\n ? mobileDisclosure.onToggle\n : desktopDisclosure.onToggle\n\n const onSelectedChange = useCallback(\n (value: string) => {\n setSelectedValue(value)\n },\n [setSelectedValue],\n )\n\n const onExpandAll = useCallback(() => {\n const values = descendants.enabledValues()\n const group = values.filter(({ group }) => group)\n const value = group.map(({ value }) => value)\n\n setExpandedValue(value)\n }, [descendants, setExpandedValue])\n\n const onCollapseAll = useCallback(() => {\n setExpandedValue([])\n }, [setExpandedValue])\n\n const onExpandedChange = useCallback(\n (value: string) => {\n setExpandedValue((prev) => {\n if (prev.includes(value))\n return prev.filter((prevValue) => prevValue !== value)\n else return [...prev, value]\n })\n },\n [setExpandedValue],\n )\n\n assignRef(controlRef, { collapse: onCollapseAll, expand: onExpandAll })\n\n useWindowEvent(\"keydown\", (ev) => {\n if (ev.key !== \"b\") return\n if (!ev.metaKey && !ev.ctrlKey) return\n\n ev.preventDefault()\n\n desktopDisclosure.onToggle()\n })\n\n const getRootProps: PropGetter<\"div\"> = useCallback(\n (props = {}) =>\n mergeProps({ \"data-expanded\": dataAttr(open) }, rest, props)(),\n [open, rest],\n )\n\n const getTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n \"aria-expanded\": open,\n \"aria-label\": t(open ? \"Close sidebar\" : \"Open sidebar\"),\n ...props,\n onClick: handlerAll(props.onClick, onToggle),\n }),\n [open, t, onToggle],\n )\n\n const getSidePanelProps: PropGetter<\"aside\"> = useCallback(\n (props = {}) => ({ \"data-expanded\": dataAttr(open), ...props }),\n [open],\n )\n\n const getHeaderProps: PropGetter<\"header\"> = useCallback(\n (props = {}) => ({ ...props }),\n [],\n )\n\n const getFooterProps: PropGetter<\"footer\"> = useCallback(\n (props = {}) => ({ ...props }),\n [],\n )\n\n const getContentProps: PropGetter<\"ul\"> = useCallback(\n (props = {}) => ({ ...props }),\n [],\n )\n\n return {\n descendants,\n expandedValue,\n mobile,\n open,\n selectedValue,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getRootProps,\n getSidePanelProps,\n getTriggerProps,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n }\n}\n\nexport type UseSidebarReturn = ReturnType<typeof useSidebar>\n\nexport interface UseSidebarGroupProps extends HTMLProps<\"li\"> {}\n\nexport const useSidebarGroup = ({ ...rest }: UseSidebarGroupProps = {}) => {\n const { getDocument } = useEnvironment()\n const rootRef = useRef<HTMLLIElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n const labelId = useId()\n\n useSafeLayoutEffect(() => {\n const el = getDocument()?.getElementById(labelId)\n\n if (!el) return\n\n if (rootRef.current)\n setAttribute(rootRef.current, \"aria-labelledby\", labelId)\n if (contentRef.current)\n setAttribute(contentRef.current, \"aria-labelledby\", labelId)\n }, [])\n\n const getRootProps: PropGetter<\"li\"> = useCallback(\n ({ ref, ...props } = {}) =>\n mergeProps({ ref }, rest, props, { ref: rootRef })(),\n [rest, rootRef],\n )\n\n const getLabelProps: PropGetter<\"span\"> = useCallback(\n (props = {}) => ({ id: labelId, ...props }),\n [labelId],\n )\n\n const getContentProps: PropGetter<\"div\"> = useCallback(\n ({ ref, ...props } = {}) => ({\n ref: mergeRefs(ref, contentRef),\n ...props,\n }),\n [],\n )\n\n return { getContentProps, getLabelProps, getRootProps }\n}\n\nexport type UseSidebarGroupReturn = ReturnType<typeof useSidebarGroup>\n\nexport interface UseSidebarItemProps\n extends HTMLProps<\"li\">, Omit<UseDisclosureProps, \"timing\"> {\n /**\n * The value of the item.\n */\n value: string\n /**\n * If `true`, the tree item will be disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * If `true`, the link will open in new tab.\n *\n * @default false\n */\n external?: boolean\n /**\n * If provided, the sidebar item will be rendered as an async sidebar item.\n */\n asyncChildren?: () => Promise<ReactNode>\n}\n\nexport const useSidebarItem = ({\n asyncChildren,\n children: childrenProp,\n defaultOpen,\n disabled = false,\n external,\n open: openProp,\n value,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n ...rest\n}: UseSidebarItemProps) => {\n const context = useSidebarItemContext()\n const {\n expandedValue,\n open,\n selectedValue,\n onExpandedChange,\n onSelectedChange,\n } = useSidebarContext()\n const [children, setChildren] = useState<ReactNode>(childrenProp)\n const [itemId, labelId, contentId] = useIds()\n const initialAsyncRef = useRef(false)\n const async = !!asyncChildren\n const group = async || Children.count(children) > 0\n const nested = !!context\n const selected = !!value && selectedValue === value\n const defaultExpanded = !!value && expandedValue.includes(value)\n const {\n open: groupOpen,\n onClose,\n onOpen,\n } = useDisclosure({\n defaultOpen: defaultOpen ?? defaultExpanded,\n open: openProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const branchOpen: boolean[] = nested\n ? [...context.branchOpen, groupOpen]\n : [groupOpen]\n const expanded = branchOpen.slice(0, -1).every(Boolean)\n const { register } = useSidebarDescendant({\n id: itemId!,\n disabled,\n expanded,\n group,\n value,\n })\n\n const [groupLoading, onGroupChildren] = useAsyncCallback(async () => {\n const children = await asyncChildren?.()\n\n setChildren(children)\n }, [asyncChildren])\n\n const onGroupOpen = useCallback(() => {\n if (disabled || !group || !value || groupLoading) return\n\n if (async && !initialAsyncRef.current) {\n initialAsyncRef.current = true\n\n onGroupChildren()\n .then(() => {\n onOpen()\n onExpandedChange(value)\n })\n .catch(() => {\n initialAsyncRef.current = false\n })\n } else {\n onOpen()\n onExpandedChange(value)\n }\n }, [\n disabled,\n group,\n value,\n groupLoading,\n async,\n onGroupChildren,\n onOpen,\n onExpandedChange,\n ])\n\n const onGroupClose = useCallback(() => {\n if (disabled || !group || !value) return\n\n onClose()\n onExpandedChange(value)\n }, [disabled, group, value, onClose, onExpandedChange])\n\n const onGroupToggle = useCallback(() => {\n if (groupOpen) onGroupClose()\n else onGroupOpen()\n }, [groupOpen, onGroupClose, onGroupOpen])\n\n useSafeLayoutEffect(() => {\n if (defaultExpanded)\n if (async && !initialAsyncRef.current) {\n initialAsyncRef.current = true\n\n onGroupChildren()\n .then(() => {\n onOpen()\n })\n .catch(() => {\n initialAsyncRef.current = false\n })\n } else {\n onOpen()\n }\n else onClose()\n }, [defaultExpanded])\n\n const getItemProps: PropGetter<\"li\"> = useCallback(\n ({ ref, \"aria-labelledby\": ariaLabelledby, ...props } = {}) => {\n const merged = mergeProps(\n {\n id: itemId,\n \"aria-current\": selected ? \"page\" : undefined,\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"data-disabled\": dataAttr(disabled),\n \"data-selected\": dataAttr(selected),\n },\n rest,\n props,\n { ref },\n { ref: register },\n )()\n\n return {\n ...merged,\n onClick: handlerAll(\n merged.onClick,\n !group ? () => onSelectedChange(value) : undefined,\n ),\n }\n },\n [\n itemId,\n register,\n selected,\n disabled,\n labelId,\n rest,\n group,\n onSelectedChange,\n value,\n ],\n )\n\n const getIndicatorProps: PropGetter<\"svg\"> = useCallback(\n (props) => ({\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-expanded\": groupOpen,\n \"aria-hidden\": true,\n \"data-disabled\": dataAttr(disabled),\n \"data-loading\": dataAttr(groupLoading),\n \"data-selected\": dataAttr(selected),\n role: \"presentation\",\n ...props,\n }),\n [disabled, groupOpen, groupLoading, selected],\n )\n\n const getTriggerProps: PropGetter<\"button\"> = useCallback(\n (props = {}) => ({\n \"aria-controls\": contentId,\n \"aria-disabled\": ariaAttr(disabled),\n \"aria-expanded\": groupOpen,\n \"data-disabled\": dataAttr(disabled),\n \"data-expanded\": dataAttr(groupOpen),\n \"data-selected\": dataAttr(selected),\n tabIndex: open && expanded && !disabled ? 0 : -1,\n ...props,\n onClick: handlerAll(props.onClick, onGroupToggle),\n }),\n [contentId, disabled, groupOpen, selected, open, expanded, onGroupToggle],\n )\n\n const getLinkProps: PropGetter<\"a\"> = useCallback(\n (props = {}) => ({\n href: value,\n rel: external ? \"noopener\" : undefined,\n target: external ? \"_blank\" : undefined,\n \"data-disabled\": dataAttr(disabled),\n \"data-selected\": dataAttr(selected),\n tabIndex: open && expanded && !disabled ? 0 : -1,\n ...props,\n onClick: handlerAll(props.onClick, (ev) => {\n if (!disabled) return\n\n ev.preventDefault()\n ev.stopPropagation()\n }),\n }),\n [disabled, expanded, external, open, selected, value],\n )\n\n const getContentProps: PropGetter<\"ul\"> = useCallback(\n ({ \"aria-labelledby\": ariaLabelledby, ...props } = {}) => ({\n id: contentId,\n \"aria-busy\": ariaAttr(groupLoading),\n \"aria-labelledby\": cx(ariaLabelledby, labelId),\n \"data-disabled\": dataAttr(disabled),\n ...props,\n }),\n [contentId, labelId, disabled, groupLoading],\n )\n\n const getLabelProps: PropGetter<\"span\"> = useCallback(\n (props = {}) => ({ id: labelId, ...props }),\n [labelId],\n )\n\n return {\n branchOpen,\n children,\n disabled,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n open,\n selected,\n selectedValue,\n value,\n getContentProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n getLinkProps,\n getTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }\n}\n\nexport type UseSidebarItemReturn = ReturnType<typeof useSidebarItem>\n"],"mappings":";;;;;;;;;;;;;;;;;AA4CA,MAAM,EACJ,oBAAoB,2BACpB,eAAe,sBACf,gBAAgB,0BACdA,oCAAAA,kBAAuD;AAqB3D,MAAM,CAAC,gBAAgB,qBAAqBC,gBAAAA,c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aAAa;CAClD,IACA;EAAC;EAAW;EAAU;EAAW;EAAU;EAAM;EAAU;CAAa,CAC1E;CAEA,MAAM,gBAAA,GAAgCA,MAAAA,YAAAA,EACnC,QAAQ,CAAC,OAAO;EACf,MAAM;EACN,KAAK,WAAW,aAAa,KAAA;EAC7B,QAAQ,WAAW,WAAW,KAAA;EAC9B,kBAAA,GAAA,oBAAA,cAAiB,SAAA,CAAS,QAAQ;EAClC,kBAAA,GAAA,oBAAA,cAAiB,SAAA,CAAS,QAAQ;EAClC,UAAU,QAAQ,YAAY,CAAC,WAAW,IAAI;EAC9C,GAAG;EACH,UAAA,GAAA,oBAAA,cAAS,WAAA,CAAW,MAAM,UAAU,OAAO;GACzC,IAAI,CAAC,UAAU;GAEf,GAAG,eAAe;GAClB,GAAG,gBAAgB;EACrB,CAAC;CACH,IACA;EAAC;EAAU;EAAU;EAAU;EAAM;EAAU;CAAK,CACtD;CAkBA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAA,GA7BwCA,MAAAA,YAAAA,EACvC,EAAE,mBAAmB,gBAAgB,GAAG,UAAU,CAAC,OAAO;GACzD,IAAI;GACJ,cAAA,GAAA,oBAAA,cAAa,SAAA,CAAS,YAAY;GAClC,oBAAA,GAAA,oBAAA,cAAmB,GAAA,CAAG,gBAAgB,OAAO;GAC7C,kBAAA,GAAA,oBAAA,cAAiB,SAAA,CAAS,QAAQ;GAClC,GAAG;EACL,IACA;GAAC;GAAW;GAAS;GAAU;EAAY,CAqB7B;EACd;EACA;EACA,gBAAA,GArBwCA,MAAAA,YAAAA,EACvC,QAAQ,CAAC,OAAO;GAAE,IAAI;GAAS,GAAG;EAAM,IACzC,CAAC,OAAO,CAmBI;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_utils_index = require("../../utils/index.cjs");
3
4
  const require_create_component = require("../../core/components/create-component.cjs");
4
5
  const require_grid = require("../grid/grid.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"simple-grid.cjs","names":["createComponent","simpleGridStyle","Grid"],"sources":["../../../../src/components/simple-grid/simple-grid.tsx"],"sourcesContent":["\"use client\"\n\nimport type {\n CSSProps,\n StyleValue,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { GridProps } from \"../grid\"\nimport type { SimpleGridStyle } from \"./simple-grid.style\"\nimport { useMemo } from \"react\"\nimport { createComponent } from \"../../core\"\nimport { replaceObject } from \"../../utils\"\nimport { Grid } from \"../grid\"\nimport { simpleGridStyle } from \"./simple-grid.style\"\n\nexport interface SimpleGridProps\n extends\n Omit<WithoutThemeProps<GridProps, SimpleGridStyle>, \"columns\">,\n ThemeProps<SimpleGridStyle> {\n /**\n * The number of columns.\n */\n columns?: StyleValue<number>\n /**\n * The width at which child elements will break into columns.\n * Pass a number for pixel values or a string for any other valid CSS length.\n */\n minChildWidth?: CSSProps[\"minWidth\"]\n}\n\nconst {\n PropsContext: SimpleGridPropsContext,\n usePropsContext: useSimpleGridPropsContext,\n withContext,\n} = createComponent<SimpleGridProps, SimpleGridStyle>(\n \"simple-grid\",\n simpleGridStyle,\n)\n\nexport { SimpleGridPropsContext, useSimpleGridPropsContext }\n\n/**\n * `SimpleGrid` is a component that makes `Grid` simpler and more user-friendly.\n *\n * @see https://yamada-ui.com/docs/components/simple-grid\n */\nexport const SimpleGrid = withContext<\"div\", SimpleGridProps>(Grid)(\n undefined,\n ({ columns, minChildWidth, ...rest }) => {\n const templateColumns = useMemo(() => {\n if (minChildWidth)\n return replaceObject(minChildWidth, (value) => {\n return value != null\n ? `repeat(auto-fit, minmax({sizes.${value}, ${value}}, 1fr))`\n : undefined\n })\n else\n return replaceObject(columns, (value) =>\n value != null ? `repeat(${value}, minmax(0, 1fr))` : undefined,\n )\n }, [minChildWidth, columns])\n\n return { templateColumns, ...rest }\n },\n)\n"],"mappings":";;;;;;;AA+BA,MAAM,EACJ,cAAc,wBACd,iBAAiB,2BACjB,gBACEA,yBAAAA,gBACF,eACAC,0BAAAA,eACF;;;;;;AASA,MAAa,aAAa,YAAoCC,aAAAA,IAAI,CAAC,CACjE,KAAA,IACC,EAAE,SAAS,eAAe,GAAG,WAAW;CAcvC,OAAO;EAAE,kBAAA,GAAA,MAAA,QAAA,OAb6B;GACpC,IAAI,eACF,QAAA,GAAA,oBAAA,cAAA,cAAA,CAAqB,gBAAgB,UAAU;IAC7C,OAAO,SAAS,OACZ,kCAAkC,MAAM,IAAI,MAAM,YAClD,KAAA;GACN,CAAC;QAED,QAAA,GAAA,oBAAA,cAAA,cAAA,CAAqB,UAAU,UAC7B,SAAS,OAAO,UAAU,MAAM,qBAAqB,KAAA,CACvD;EACJ,GAAG,CAAC,eAAe,OAAO,CAEH;EAAG,GAAG;CAAK;AACpC,CACF"}
1
+ {"version":3,"file":"simple-grid.cjs","names":["createComponent","simpleGridStyle","Grid","useMemo"],"sources":["../../../../src/components/simple-grid/simple-grid.tsx"],"sourcesContent":["\"use client\"\n\nimport type {\n CSSProps,\n StyleValue,\n ThemeProps,\n WithoutThemeProps,\n} from \"../../core\"\nimport type { GridProps } from \"../grid\"\nimport type { SimpleGridStyle } from \"./simple-grid.style\"\nimport { useMemo } from \"react\"\nimport { createComponent } from \"../../core\"\nimport { replaceObject } from \"../../utils\"\nimport { Grid } from \"../grid\"\nimport { simpleGridStyle } from \"./simple-grid.style\"\n\nexport interface SimpleGridProps\n extends\n Omit<WithoutThemeProps<GridProps, SimpleGridStyle>, \"columns\">,\n ThemeProps<SimpleGridStyle> {\n /**\n * The number of columns.\n */\n columns?: StyleValue<number>\n /**\n * The width at which child elements will break into columns.\n * Pass a number for pixel values or a string for any other valid CSS length.\n */\n minChildWidth?: CSSProps[\"minWidth\"]\n}\n\nconst {\n PropsContext: SimpleGridPropsContext,\n usePropsContext: useSimpleGridPropsContext,\n withContext,\n} = createComponent<SimpleGridProps, SimpleGridStyle>(\n \"simple-grid\",\n simpleGridStyle,\n)\n\nexport { SimpleGridPropsContext, useSimpleGridPropsContext }\n\n/**\n * `SimpleGrid` is a component that makes `Grid` simpler and more user-friendly.\n *\n * @see https://yamada-ui.com/docs/components/simple-grid\n */\nexport const SimpleGrid = withContext<\"div\", SimpleGridProps>(Grid)(\n undefined,\n ({ columns, minChildWidth, ...rest }) => {\n const templateColumns = useMemo(() => {\n if (minChildWidth)\n return replaceObject(minChildWidth, (value) => {\n return value != null\n ? `repeat(auto-fit, minmax({sizes.${value}, ${value}}, 1fr))`\n : undefined\n })\n else\n return replaceObject(columns, (value) =>\n value != null ? `repeat(${value}, minmax(0, 1fr))` : undefined,\n )\n }, [minChildWidth, columns])\n\n return { templateColumns, ...rest }\n },\n)\n"],"mappings":";;;;;;;;AA+BA,MAAM,EACJ,cAAc,wBACd,iBAAiB,2BACjB,gBACEA,yBAAAA,gBACF,eACAC,0BAAAA,eACF;;;;;;AASA,MAAa,aAAa,YAAoCC,aAAAA,IAAI,CAAC,CACjE,KAAA,IACC,EAAE,SAAS,eAAe,GAAG,WAAW;CAcvC,OAAO;EAAE,kBAAA,GAbeC,MAAAA,QAAAA,OAAc;GACpC,IAAI,eACF,QAAA,GAAA,oBAAA,cAAO,cAAA,CAAc,gBAAgB,UAAU;IAC7C,OAAO,SAAS,OACZ,kCAAkC,MAAM,IAAI,MAAM,YAClD,KAAA;GACN,CAAC;QAED,QAAA,GAAA,oBAAA,cAAO,cAAA,CAAc,UAAU,UAC7B,SAAS,OAAO,UAAU,MAAM,qBAAqB,KAAA,CACvD;EACJ,GAAG,CAAC,eAAe,OAAO,CAEH;EAAG,GAAG;CAAK;AACpC,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton.cjs","names":["createComponent","skeletonStyle","useValidChildren","varAttr"],"sources":["../../../../src/components/skeleton/skeleton.tsx"],"sourcesContent":["\"use client\"\n\nimport type { CSSProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { SkeletonStyle } from \"./skeleton.style\"\nimport { createComponent, varAttr } from \"../../core\"\nimport { dataAttr, isNumber, useValidChildren } from \"../../utils\"\nimport { skeletonStyle } from \"./skeleton.style\"\n\nexport interface SkeletonProps\n extends HTMLStyledProps, ThemeProps<SkeletonStyle> {\n /**\n * The animation duration in seconds.\n */\n duration?: number | string\n /**\n * The color at the animation end.\n */\n endColor?: CSSProps[\"color\"]\n /**\n * The fade in duration in seconds. Requires `loaded` toggled to `true` in order to see the transition.\n */\n fadeDuration?: number | string\n /**\n * If `true`, the skeleton will take the width of it's children.\n *\n * @default false\n */\n fitContent?: boolean\n /**\n * The color at the animation start.\n */\n startColor?: CSSProps[\"color\"]\n}\n\nconst {\n PropsContext: SkeletonPropsContext,\n usePropsContext: useSkeletonPropsContext,\n withContext,\n} = createComponent<SkeletonProps, SkeletonStyle>(\"skeleton\", skeletonStyle)\n\nexport { SkeletonPropsContext, useSkeletonPropsContext }\n\n/**\n * `Skeleton` is a component that acts as a placeholder until content is loaded.\n *\n * @see https://yamada-ui.com/docs/components/skeleton\n */\nexport const Skeleton = withContext(\"div\", { transferProps: [\"loading\"] })(\n undefined,\n ({\n children,\n duration,\n endColor,\n fadeDuration,\n fitContent,\n loading,\n startColor,\n ...rest\n }) => {\n const validChildren = useValidChildren(children)\n const hasChildren = !!validChildren.length\n\n fitContent ??= hasChildren\n\n return {\n \"aria-busy\": loading,\n \"data-loaded\": dataAttr(!loading),\n \"data-loading\": dataAttr(loading),\n \"--duration\": isNumber(duration) ? `${duration}s` : duration,\n \"--end-color\": varAttr(endColor, \"colors\"),\n \"--fade-duration\": isNumber(fadeDuration)\n ? `${fadeDuration}s`\n : fadeDuration,\n \"--height\": fitContent ? \"fit-content\" : undefined,\n \"--start-color\": varAttr(startColor, \"colors\"),\n \"--width\": fitContent ? \"fit-content\" : undefined,\n children,\n ...rest,\n }\n },\n)\n"],"mappings":";;;;;;;AAkCA,MAAM,EACJ,cAAc,sBACd,iBAAiB,yBACjB,gBACEA,yBAAAA,gBAA8C,YAAYC,uBAAAA,aAAa;;;;;;AAS3E,MAAa,WAAW,YAAY,OAAO,EAAE,eAAe,CAAC,SAAS,EAAE,CAAC,CAAC,CACxE,KAAA,IACC,EACC,UACA,UACA,UACA,cACA,YACA,SACA,YACA,GAAG,WACC;CAEJ,MAAM,cAAc,CAAC,CADCC,iBAAAA,iBAAiB,QACL,CAAC,CAAC;CAEpC,eAAe;CAEf,OAAO;EACL,aAAa;EACb,gBAAA,GAAA,oBAAA,cAAA,SAAA,CAAwB,CAAC,OAAO;EAChC,iBAAA,GAAA,oBAAA,cAAA,SAAA,CAAyB,OAAO;EAChC,eAAA,GAAA,oBAAA,cAAA,SAAA,CAAuB,QAAQ,IAAI,GAAG,SAAS,KAAK;EACpD,eAAeC,YAAAA,QAAQ,UAAU,QAAQ;EACzC,oBAAA,GAAA,oBAAA,cAAA,SAAA,CAA4B,YAAY,IACpC,GAAG,aAAa,KAChB;EACJ,YAAY,aAAa,gBAAgB,KAAA;EACzC,iBAAiBA,YAAAA,QAAQ,YAAY,QAAQ;EAC7C,WAAW,aAAa,gBAAgB,KAAA;EACxC;EACA,GAAG;CACL;AACF,CACF"}
1
+ {"version":3,"file":"skeleton.cjs","names":["createComponent","skeletonStyle","useValidChildren","varAttr"],"sources":["../../../../src/components/skeleton/skeleton.tsx"],"sourcesContent":["\"use client\"\n\nimport type { CSSProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { SkeletonStyle } from \"./skeleton.style\"\nimport { createComponent, varAttr } from \"../../core\"\nimport { dataAttr, isNumber, useValidChildren } from \"../../utils\"\nimport { skeletonStyle } from \"./skeleton.style\"\n\nexport interface SkeletonProps\n extends HTMLStyledProps, ThemeProps<SkeletonStyle> {\n /**\n * The animation duration in seconds.\n */\n duration?: number | string\n /**\n * The color at the animation end.\n */\n endColor?: CSSProps[\"color\"]\n /**\n * The fade in duration in seconds. Requires `loaded` toggled to `true` in order to see the transition.\n */\n fadeDuration?: number | string\n /**\n * If `true`, the skeleton will take the width of it's children.\n *\n * @default false\n */\n fitContent?: boolean\n /**\n * The color at the animation start.\n */\n startColor?: CSSProps[\"color\"]\n}\n\nconst {\n PropsContext: SkeletonPropsContext,\n usePropsContext: useSkeletonPropsContext,\n withContext,\n} = createComponent<SkeletonProps, SkeletonStyle>(\"skeleton\", skeletonStyle)\n\nexport { SkeletonPropsContext, useSkeletonPropsContext }\n\n/**\n * `Skeleton` is a component that acts as a placeholder until content is loaded.\n *\n * @see https://yamada-ui.com/docs/components/skeleton\n */\nexport const Skeleton = withContext(\"div\", { transferProps: [\"loading\"] })(\n undefined,\n ({\n children,\n duration,\n endColor,\n fadeDuration,\n fitContent,\n loading,\n startColor,\n ...rest\n }) => {\n const validChildren = useValidChildren(children)\n const hasChildren = !!validChildren.length\n\n fitContent ??= hasChildren\n\n return {\n \"aria-busy\": loading,\n \"data-loaded\": dataAttr(!loading),\n \"data-loading\": dataAttr(loading),\n \"--duration\": isNumber(duration) ? `${duration}s` : duration,\n \"--end-color\": varAttr(endColor, \"colors\"),\n \"--fade-duration\": isNumber(fadeDuration)\n ? `${fadeDuration}s`\n : fadeDuration,\n \"--height\": fitContent ? \"fit-content\" : undefined,\n \"--start-color\": varAttr(startColor, \"colors\"),\n \"--width\": fitContent ? \"fit-content\" : undefined,\n children,\n ...rest,\n }\n },\n)\n"],"mappings":";;;;;;;AAkCA,MAAM,EACJ,cAAc,sBACd,iBAAiB,yBACjB,gBACEA,yBAAAA,gBAA8C,YAAYC,uBAAAA,aAAa;;;;;;AAS3E,MAAa,WAAW,YAAY,OAAO,EAAE,eAAe,CAAC,SAAS,EAAE,CAAC,CAAC,CACxE,KAAA,IACC,EACC,UACA,UACA,UACA,cACA,YACA,SACA,YACA,GAAG,WACC;CAEJ,MAAM,cAAc,CAAC,CADCC,iBAAAA,iBAAiB,QACL,CAAC,CAAC;CAEpC,eAAe;CAEf,OAAO;EACL,aAAa;EACb,gBAAA,GAAA,oBAAA,cAAe,SAAA,CAAS,CAAC,OAAO;EAChC,iBAAA,GAAA,oBAAA,cAAgB,SAAA,CAAS,OAAO;EAChC,eAAA,GAAA,oBAAA,cAAc,SAAA,CAAS,QAAQ,IAAI,GAAG,SAAS,KAAK;EACpD,eAAeC,YAAAA,QAAQ,UAAU,QAAQ;EACzC,oBAAA,GAAA,oBAAA,cAAmB,SAAA,CAAS,YAAY,IACpC,GAAG,aAAa,KAChB;EACJ,YAAY,aAAa,gBAAgB,KAAA;EACzC,iBAAiBA,YAAAA,QAAQ,YAAY,QAAQ;EAC7C,WAAW,aAAa,gBAAgB,KAAA;EACxC;EACA,GAAG;CACL;AACF,CACF"}
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_create_component = require("../../core/components/create-component.cjs");
3
4
  const require_factory = require("../motion/factory.cjs");
4
5
  const require_transition = require("../motion/transition.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"slide.cjs","names":["createTransition","createComponent","slideStyle","useValue","AnimatePresence","motion"],"sources":["../../../../src/components/slide/slide.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Variants } from \"motion/react\"\nimport type { ThemeProps } from \"../../core\"\nimport type {\n HTMLMotionProps,\n MotionTransitionVariants,\n WithTransitionProps,\n} from \"../motion\"\nimport type { SlideStyle } from \"./slide.style\"\nimport { AnimatePresence } from \"motion/react\"\nimport { useMemo } from \"react\"\nimport { createComponent } from \"../../core\"\nimport { useValue } from \"../../hooks/use-value\"\nimport { createTransition, motion } from \"../motion\"\nimport { slideStyle } from \"./slide.style\"\n\nconst getAnimationProps = (placement: SlideProps[\"placement\"]) => {\n switch (placement) {\n case \"block-start\":\n return { enter: { x: 0, y: 0 }, exit: { x: 0, y: \"-100%\" } }\n case \"inline-end\":\n return { enter: { x: 0, y: 0 }, exit: { x: \"100%\", y: 0 } }\n case \"block-end\":\n return { enter: { x: 0, y: 0 }, exit: { x: 0, y: \"100%\" } }\n case \"inline-start\":\n return { enter: { x: 0, y: 0 }, exit: { x: \"-100%\", y: 0 } }\n default:\n return {}\n }\n}\nexport const slideVariants: Variants = {\n enter: ({\n delay,\n duration,\n enter,\n placement,\n transition,\n transitionEnd,\n } = {}) => ({\n ...getAnimationProps(placement).enter,\n transition: createTransition.enter(transition?.enter)(delay, duration),\n transitionEnd: transitionEnd?.enter,\n ...enter,\n }),\n exit: ({\n delay,\n duration,\n exit,\n placement,\n transition,\n transitionEnd,\n } = {}) => ({\n ...getAnimationProps(placement).exit,\n transition: createTransition.exit(transition?.exit)(delay, duration),\n transitionEnd: transitionEnd?.exit,\n ...exit,\n }),\n} satisfies MotionTransitionVariants\n\nexport interface SlideProps\n extends WithTransitionProps<HTMLMotionProps>, ThemeProps<SlideStyle> {}\n\nconst {\n PropsContext: SlidePropsContext,\n usePropsContext: useSlidePropsContext,\n withContext,\n} = createComponent<SlideProps, SlideStyle>(\"slide\", slideStyle)\n\nexport { SlidePropsContext, useSlidePropsContext }\n\n/**\n * `Slide` is a component that shows or hides an element from the corners of the page.\n *\n * @see https://yamada-ui.com/docs/components/slide\n */\nexport const Slide = withContext<\"div\", SlideProps, \"placement\">(\n ({\n delay,\n duration = { enter: 0.4, exit: 0.3 },\n open: openProp,\n placement: placementProp,\n transition,\n transitionEnd,\n unmountOnExit,\n ...rest\n }) => {\n const animate = openProp || unmountOnExit ? \"enter\" : \"exit\"\n const open = unmountOnExit ? openProp && unmountOnExit : true\n const placement = useValue(placementProp)\n\n const custom = useMemo(\n () => ({\n delay,\n duration,\n placement,\n transition,\n transitionEnd,\n }),\n [delay, duration, placement, transition, transitionEnd],\n )\n\n return (\n <AnimatePresence custom={custom}>\n {open ? (\n <motion.div\n animate={animate}\n custom={custom}\n exit=\"exit\"\n initial=\"exit\"\n variants={slideVariants}\n {...rest}\n />\n ) : null}\n </AnimatePresence>\n )\n },\n { transferProps: [\"placement\"] },\n)()\n"],"mappings":";;;;;;;;;;AAiBA,MAAM,qBAAqB,cAAuC;CAChE,QAAQ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AAgB;CACzD,MAAM,YAAYC,8BAAAA,SAAS,aAAa;CAExC,MAAM,UAAA,GAAA,MAAA,QAAA,QACG;EACL;EACA;EACA;EACA;EACA;CACF,IACA;EAAC;EAAO;EAAU;EAAW;EAAY;CAAa,CACxD;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,iBAAD;EAAyB;EACtB,UAAA,OACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,OAAO,KAAR;GACW;GACD;GACR,MAAK;GACL,SAAQ;GACR,UAAU;GACV,GAAI;EACL,CAAA,IACC;CACW,CAAA;AAErB,GACA,EAAE,eAAe,CAAC,WAAW,EAAE,CACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"slide.cjs","names":["createTransition","createComponent","slideStyle","useValue","useMemo","AnimatePresence","motion"],"sources":["../../../../src/components/slide/slide.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Variants } from \"motion/react\"\nimport type { ThemeProps } from \"../../core\"\nimport type {\n HTMLMotionProps,\n MotionTransitionVariants,\n WithTransitionProps,\n} from \"../motion\"\nimport type { SlideStyle } from \"./slide.style\"\nimport { AnimatePresence } from \"motion/react\"\nimport { useMemo } from \"react\"\nimport { createComponent } from \"../../core\"\nimport { useValue } from \"../../hooks/use-value\"\nimport { createTransition, motion } from \"../motion\"\nimport { slideStyle } from \"./slide.style\"\n\nconst getAnimationProps = (placement: SlideProps[\"placement\"]) => {\n switch (placement) {\n case \"block-start\":\n return { enter: { x: 0, y: 0 }, exit: { x: 0, y: \"-100%\" } }\n case \"inline-end\":\n return { enter: { x: 0, y: 0 }, exit: { x: \"100%\", y: 0 } }\n case \"block-end\":\n return { enter: { x: 0, y: 0 }, exit: { x: 0, y: \"100%\" } }\n case \"inline-start\":\n return { enter: { x: 0, y: 0 }, exit: { x: \"-100%\", y: 0 } }\n default:\n return {}\n }\n}\nexport const slideVariants: Variants = {\n enter: ({\n delay,\n duration,\n enter,\n placement,\n transition,\n transitionEnd,\n } = {}) => ({\n ...getAnimationProps(placement).enter,\n transition: createTransition.enter(transition?.enter)(delay, duration),\n transitionEnd: transitionEnd?.enter,\n ...enter,\n }),\n exit: ({\n delay,\n duration,\n exit,\n placement,\n transition,\n transitionEnd,\n } = {}) => ({\n ...getAnimationProps(placement).exit,\n transition: createTransition.exit(transition?.exit)(delay, duration),\n transitionEnd: transitionEnd?.exit,\n ...exit,\n }),\n} satisfies MotionTransitionVariants\n\nexport interface SlideProps\n extends WithTransitionProps<HTMLMotionProps>, ThemeProps<SlideStyle> {}\n\nconst {\n PropsContext: SlidePropsContext,\n usePropsContext: useSlidePropsContext,\n withContext,\n} = createComponent<SlideProps, SlideStyle>(\"slide\", slideStyle)\n\nexport { SlidePropsContext, useSlidePropsContext }\n\n/**\n * `Slide` is a component that shows or hides an element from the corners of the page.\n *\n * @see https://yamada-ui.com/docs/components/slide\n */\nexport const Slide = withContext<\"div\", SlideProps, \"placement\">(\n ({\n delay,\n duration = { enter: 0.4, exit: 0.3 },\n open: openProp,\n placement: placementProp,\n transition,\n transitionEnd,\n unmountOnExit,\n ...rest\n }) => {\n const animate = openProp || unmountOnExit ? \"enter\" : \"exit\"\n const open = unmountOnExit ? openProp && unmountOnExit : true\n const placement = useValue(placementProp)\n\n const custom = useMemo(\n () => ({\n delay,\n duration,\n placement,\n transition,\n transitionEnd,\n }),\n [delay, duration, placement, transition, transitionEnd],\n )\n\n return (\n <AnimatePresence custom={custom}>\n {open ? (\n <motion.div\n animate={animate}\n custom={custom}\n exit=\"exit\"\n initial=\"exit\"\n variants={slideVariants}\n {...rest}\n />\n ) : null}\n </AnimatePresence>\n )\n },\n { transferProps: [\"placement\"] },\n)()\n"],"mappings":";;;;;;;;;;;AAiBA,MAAM,qBAAqB,cAAuC;CAChE,QAAQ,WAAR;EACE,KAAK,eACH,OAAO;GAAE,OAAO;IAAE,GAAG;IAAG,GAAG;GAAE;GAAG,MAAM;IAAE,GAAG;IAAG,GAAG;GAAQ;EAAE;EAC7D,KAAK,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EAAU;EAAW;EAAY;CAAa,CACxD;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,iBAAD;EAAyB;EACtB,UAAA,OACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,OAAO,KAAR;GACW;GACD;GACR,MAAK;GACL,SAAQ;GACR,UAAU;GACV,GAAI;EACL,CAAA,IACC;CACW,CAAA;AAErB,GACA,EAAE,eAAe,CAAC,WAAW,EAAE,CACjC,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_create_component = require("../../core/components/create-component.cjs");
3
4
  const require_factory = require("../motion/factory.cjs");
4
5
  const require_transition = require("../motion/transition.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"slide-fade.cjs","names":["createTransition","createComponent","slideFadeStyle","AnimatePresence","motion"],"sources":["../../../../src/components/slide-fade/slide-fade.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Variants } from \"motion/react\"\nimport type { ThemeProps } from \"../../core\"\nimport type {\n HTMLMotionProps,\n MotionTransitionVariants,\n WithTransitionProps,\n} from \"../motion\"\nimport type { SlideFadeStyle } from \"./slide-fade.style\"\nimport { AnimatePresence } from \"motion/react\"\nimport { useMemo } from \"react\"\nimport { createComponent } from \"../../core\"\nimport { createTransition, motion } from \"../motion\"\nimport { slideFadeStyle } from \"./slide-fade.style\"\n\nexport const slideFadeVariants: Variants = {\n enter: ({ delay, duration, enter, transition, transitionEnd } = {}) => ({\n opacity: 1,\n transition: createTransition.enter(transition?.enter)(delay, duration),\n transitionEnd: transitionEnd?.enter,\n x: 0,\n y: 0,\n ...enter,\n }),\n exit: ({\n delay,\n duration,\n exit,\n offsetX,\n offsetY,\n reverse,\n transition,\n transitionEnd,\n } = {}) => ({\n opacity: 0,\n transition: createTransition.exit(transition?.exit)(delay, duration),\n ...(reverse\n ? { transitionEnd: transitionEnd?.exit, x: offsetX, y: offsetY }\n : { transitionEnd: { x: offsetX, y: offsetY, ...transitionEnd?.exit } }),\n ...exit,\n }),\n initial: ({\n delay,\n duration,\n initial,\n offsetX,\n offsetY,\n transition,\n transitionEnd,\n }) => ({\n opacity: 0,\n transition: createTransition.exit(transition?.exit)(delay, duration),\n transitionEnd: transitionEnd?.exit,\n x: offsetX,\n y: offsetY,\n ...initial,\n }),\n} satisfies MotionTransitionVariants\n\nexport interface SlideFadeProps\n extends WithTransitionProps<HTMLMotionProps>, ThemeProps<SlideFadeStyle> {\n /**\n * The offset on the horizontal or `x` axis.\n *\n * @default 0\n */\n offsetX?: number | string\n /**\n * The offset on the vertical or `y` axis.\n *\n * @default 8\n */\n offsetY?: number | string\n /**\n * If `true`, the element will be transitioned back to the offset when it leaves. Otherwise, it'll only fade out.\n *\n * @default true\n */\n reverse?: boolean\n}\n\nconst {\n PropsContext: SlideFadePropsContext,\n usePropsContext: useSlideFadePropsContext,\n withContext,\n} = createComponent<SlideFadeProps, SlideFadeStyle>(\n \"slide-fade\",\n slideFadeStyle,\n)\n\nexport { SlideFadePropsContext, useSlideFadePropsContext }\n\n/**\n * `SlideFade` is a component that gradually shows or hides an element while moving it from a specified position.\n *\n * @see https://yamada-ui.com/docs/components/slide-fade\n */\nexport const SlideFade = withContext<\"div\", SlideFadeProps>(\n ({\n delay,\n duration,\n offsetX = 0,\n offsetY = 8,\n open: openProp,\n reverse = true,\n transition,\n transitionEnd,\n unmountOnExit,\n ...rest\n }) => {\n const animate = openProp || unmountOnExit ? \"enter\" : \"exit\"\n const open = unmountOnExit ? openProp && unmountOnExit : true\n\n const custom = useMemo(\n () => ({\n delay,\n duration,\n offsetX,\n offsetY,\n reverse,\n transition,\n transitionEnd,\n }),\n [delay, duration, offsetX, offsetY, reverse, transition, transitionEnd],\n )\n\n return (\n <AnimatePresence custom={custom}>\n {open ? (\n <motion.div\n animate={animate}\n custom={custom}\n exit=\"exit\"\n initial=\"exit\"\n variants={slideFadeVariants}\n {...rest}\n />\n ) : null}\n </AnimatePresence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A,iBAAD;EAAyB;EACtB,UAAA,OACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,OAAO,KAAR;GACW;GACD;GACR,MAAK;GACL,SAAQ;GACR,UAAU;GACV,GAAI;EACL,CAAA,IACC;CACW,CAAA;AAErB,CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"slide-fade.cjs","names":["createTransition","createComponent","slideFadeStyle","useMemo","AnimatePresence","motion"],"sources":["../../../../src/components/slide-fade/slide-fade.tsx"],"sourcesContent":["\"use client\"\n\nimport type { Variants } from \"motion/react\"\nimport type { ThemeProps } from \"../../core\"\nimport type {\n HTMLMotionProps,\n MotionTransitionVariants,\n WithTransitionProps,\n} from \"../motion\"\nimport type { SlideFadeStyle } from \"./slide-fade.style\"\nimport { AnimatePresence } from \"motion/react\"\nimport { useMemo } from \"react\"\nimport { createComponent } from \"../../core\"\nimport { createTransition, motion } from \"../motion\"\nimport { slideFadeStyle } from \"./slide-fade.style\"\n\nexport const slideFadeVariants: Variants = {\n enter: ({ delay, duration, enter, transition, transitionEnd } = {}) => ({\n opacity: 1,\n transition: createTransition.enter(transition?.enter)(delay, duration),\n transitionEnd: transitionEnd?.enter,\n x: 0,\n y: 0,\n ...enter,\n }),\n exit: ({\n delay,\n duration,\n exit,\n offsetX,\n offsetY,\n reverse,\n transition,\n transitionEnd,\n } = {}) => ({\n opacity: 0,\n transition: createTransition.exit(transition?.exit)(delay, duration),\n ...(reverse\n ? { transitionEnd: transitionEnd?.exit, x: offsetX, y: offsetY }\n : { transitionEnd: { x: offsetX, y: offsetY, ...transitionEnd?.exit } }),\n ...exit,\n }),\n initial: ({\n delay,\n duration,\n initial,\n offsetX,\n offsetY,\n transition,\n transitionEnd,\n }) => ({\n opacity: 0,\n transition: createTransition.exit(transition?.exit)(delay, duration),\n transitionEnd: transitionEnd?.exit,\n x: offsetX,\n y: offsetY,\n ...initial,\n }),\n} satisfies MotionTransitionVariants\n\nexport interface SlideFadeProps\n extends WithTransitionProps<HTMLMotionProps>, ThemeProps<SlideFadeStyle> {\n /**\n * The offset on the horizontal or `x` axis.\n *\n * @default 0\n */\n offsetX?: number | string\n /**\n * The offset on the vertical or `y` axis.\n *\n * @default 8\n */\n offsetY?: number | string\n /**\n * If `true`, the element will be transitioned back to the offset when it leaves. Otherwise, it'll only fade out.\n *\n * @default true\n */\n reverse?: boolean\n}\n\nconst {\n PropsContext: SlideFadePropsContext,\n usePropsContext: useSlideFadePropsContext,\n withContext,\n} = createComponent<SlideFadeProps, SlideFadeStyle>(\n \"slide-fade\",\n slideFadeStyle,\n)\n\nexport { SlideFadePropsContext, useSlideFadePropsContext }\n\n/**\n * `SlideFade` is a component that gradually shows or hides an element while moving it from a specified position.\n *\n * @see https://yamada-ui.com/docs/components/slide-fade\n */\nexport const SlideFade = withContext<\"div\", SlideFadeProps>(\n ({\n delay,\n duration,\n offsetX = 0,\n offsetY = 8,\n open: openProp,\n reverse = true,\n transition,\n transitionEnd,\n unmountOnExit,\n ...rest\n }) => {\n const animate = openProp || unmountOnExit ? \"enter\" : \"exit\"\n const open = unmountOnExit ? openProp && unmountOnExit : true\n\n const custom = useMemo(\n () => ({\n delay,\n duration,\n offsetX,\n offsetY,\n reverse,\n transition,\n transitionEnd,\n }),\n [delay, duration, offsetX, offsetY, reverse, transition, transitionEnd],\n )\n\n return (\n <AnimatePresence custom={custom}>\n {open ? (\n <motion.div\n animate={animate}\n custom={custom}\n exit=\"exit\"\n initial=\"exit\"\n variants={slideFadeVariants}\n {...rest}\n />\n ) : null}\n </AnimatePresence>\n )\n },\n)()\n"],"mappings":";;;;;;;;;;AAgBA,MAAa,oBAA8B;CACzC,QAAQ,EAAE,OAAO,UAAU,OAAO,YAAY,kBAAkB,CAAC,OAAO;EACtE,SAAS;EACT,YAAYA,mBAAAA,iBAAiB,MAAM,YAAY,KAAK,CAAC,CAAC,OAAO,QAAQ;EACrE,eAAe,eAAe;EAC9B,GAAG;EACH,GAAG;EACH,GAAG;CACL;CACA,OAAO,EACL,OACA,UACA,MACA,SACA,SACA,SACA,YACA,kBACE,CAAC,OAAO;EACV,SAAS;EACT,YAAYA,mBAAAA,iBAAiB,KAAK,YAAY,IAAI,CAAC,CAAC,OAAO,QAAQ;EACnE,GAAI,UACA;GAAE,eAAe,eAAe;GAAM,GAAG;GAAS,GAAG;EAAQ,IAC7D,EAAE,eAAe;GAAE,GAAG;GAAS,GAAG;GAAS,GAAG,eAAe;EAAK,EAAE;EACxE,GAAG;CACL;CACA,UAAU,EACR,OACA,UACA,SACA,SACA,SACA,YACA,qBACK;EACL,SAAS;EACT,YAAYA,mBAAAA,iBAAiB,KAAK,YAAY,IAAI,CAAC,CAAC,OAAO,QAAQ;EACnE,eAAe,eAAe;EAC9B,GAAG;EACH,GAAG;EACH,GAAG;CACL;AACF;AAwBA,MAAM,EACJ,cAAc,uBACd,iBAAiB,0BACjB,gBACEC,yBAAAA,gBACF,cACAC,yBAAAA,cACF;;;;;;AASA,MAAa,YAAY,aACtB,EACC,OACA,UACA,UAAU,GACV,UAAU,GACV,MAAM,UACN,UAAU,MACV,YACA,eACA,eACA,GAAG,WACC;CACJ,MAAM,UAAU,YAAY,gBAAgB,UAAU;CACtD,MAAM,OAAO,gBAAgB,YAAY,gBAAgB;CAEzD,MAAM,UAAA,GAASC,MAAAA,QAAAA,QACN;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACF,IACA;EAAC;EAAO;EAAU;EAAS;EAAS;EAAS;EAAY;CAAa,CACxE;CAEA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,iBAAD;EAAyB;EACtB,UAAA,OACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,OAAO,KAAR;GACW;GACD;GACR,MAAK;GACL,SAAQ;GACR,UAAU;GACV,GAAI;EACL,CAAA,IACC;CACW,CAAA;AAErB,CACF,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ require("../../_virtual/_rolldown/runtime.cjs");
2
3
  const require_utils_index = require("../../utils/index.cjs");
3
4
  const require_var = require("../../core/system/var.cjs");
4
5
  const require_factory = require("../../core/system/factory.cjs");
@@ -16,8 +17,9 @@ const { ComponentContext, PropsContext: SliderPropsContext, useComponentContext,
16
17
  * @see https://yamada-ui.com/docs/components/slider
17
18
  */
18
19
  const SliderRoot = withProvider(({ children, marks, orientation: orientationProp, inputProps, marksProps, rangeProps, thumbProps, trackProps, ...rest }) => {
20
+ const orientation = require_hooks_use_value_index.useValue(orientationProp);
19
21
  const { range, getInputProps, getMarkProps, getRangeProps, getRootProps, getThumbProps, getTrackProps } = require_use_slider.useSlider({
20
- orientation: require_hooks_use_value_index.useValue(orientationProp),
22
+ orientation,
21
23
  ...rest
22
24
  });
23
25
  const computedChildren = (0, react.useMemo)(() => {