@yamada-ui/react 2.1.1-dev-20260303115730 → 2.1.1-dev-20260303173438

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 (357) hide show
  1. package/dist/cjs/components/chart/area-chart.cjs +3 -8
  2. package/dist/cjs/components/chart/area-chart.cjs.map +1 -1
  3. package/dist/cjs/components/chart/area-chart.style.cjs +2 -4
  4. package/dist/cjs/components/chart/area-chart.style.cjs.map +1 -1
  5. package/dist/cjs/components/chart/bar-chart.cjs +3 -8
  6. package/dist/cjs/components/chart/bar-chart.cjs.map +1 -1
  7. package/dist/cjs/components/chart/bar-chart.style.cjs +2 -2
  8. package/dist/cjs/components/chart/bar-chart.style.cjs.map +1 -1
  9. package/dist/cjs/components/chart/cartesian-chart.cjs +14 -3
  10. package/dist/cjs/components/chart/cartesian-chart.cjs.map +1 -1
  11. package/dist/cjs/components/chart/cartesian-chart.style.cjs +12 -5
  12. package/dist/cjs/components/chart/cartesian-chart.style.cjs.map +1 -1
  13. package/dist/cjs/components/chart/chart.cjs.map +1 -1
  14. package/dist/cjs/components/chart/composed-chart.cjs +67 -0
  15. package/dist/cjs/components/chart/composed-chart.cjs.map +1 -0
  16. package/dist/cjs/components/chart/composed-chart.namespace.cjs +32 -0
  17. package/dist/cjs/components/chart/composed-chart.namespace.cjs.map +1 -0
  18. package/dist/cjs/components/chart/composed-chart.style.cjs +14 -0
  19. package/dist/cjs/components/chart/composed-chart.style.cjs.map +1 -0
  20. package/dist/cjs/components/chart/donut-chart.cjs +3 -8
  21. package/dist/cjs/components/chart/donut-chart.cjs.map +1 -1
  22. package/dist/cjs/components/chart/index.cjs +12 -13
  23. package/dist/cjs/components/chart/line-chart.cjs +3 -8
  24. package/dist/cjs/components/chart/line-chart.cjs.map +1 -1
  25. package/dist/cjs/components/chart/pie-chart.cjs +3 -8
  26. package/dist/cjs/components/chart/pie-chart.cjs.map +1 -1
  27. package/dist/cjs/components/chart/polar-chart.cjs +7 -2
  28. package/dist/cjs/components/chart/polar-chart.cjs.map +1 -1
  29. package/dist/cjs/components/chart/radar-chart.cjs +3 -8
  30. package/dist/cjs/components/chart/radar-chart.cjs.map +1 -1
  31. package/dist/cjs/components/chart/radial-chart.cjs +7 -14
  32. package/dist/cjs/components/chart/radial-chart.cjs.map +1 -1
  33. package/dist/cjs/components/chart/use-cartesian-chart.cjs +32 -0
  34. package/dist/cjs/components/chart/use-cartesian-chart.cjs.map +1 -1
  35. package/dist/cjs/components/chart/use-polar-chart.cjs +54 -0
  36. package/dist/cjs/components/chart/use-polar-chart.cjs.map +1 -1
  37. package/dist/cjs/index.cjs +16 -19
  38. package/dist/esm/components/chart/area-chart.js +3 -8
  39. package/dist/esm/components/chart/area-chart.js.map +1 -1
  40. package/dist/esm/components/chart/area-chart.style.js +2 -4
  41. package/dist/esm/components/chart/area-chart.style.js.map +1 -1
  42. package/dist/esm/components/chart/bar-chart.js +3 -8
  43. package/dist/esm/components/chart/bar-chart.js.map +1 -1
  44. package/dist/esm/components/chart/bar-chart.style.js +2 -2
  45. package/dist/esm/components/chart/bar-chart.style.js.map +1 -1
  46. package/dist/esm/components/chart/cartesian-chart.js +15 -4
  47. package/dist/esm/components/chart/cartesian-chart.js.map +1 -1
  48. package/dist/esm/components/chart/cartesian-chart.style.js +12 -5
  49. package/dist/esm/components/chart/cartesian-chart.style.js.map +1 -1
  50. package/dist/esm/components/chart/chart.js.map +1 -1
  51. package/dist/esm/components/chart/composed-chart.js +63 -0
  52. package/dist/esm/components/chart/composed-chart.js.map +1 -0
  53. package/dist/esm/components/chart/composed-chart.namespace.js +27 -0
  54. package/dist/esm/components/chart/composed-chart.namespace.js.map +1 -0
  55. package/dist/esm/components/chart/composed-chart.style.js +14 -0
  56. package/dist/esm/components/chart/composed-chart.style.js.map +1 -0
  57. package/dist/esm/components/chart/donut-chart.js +3 -8
  58. package/dist/esm/components/chart/donut-chart.js.map +1 -1
  59. package/dist/esm/components/chart/index.js +6 -10
  60. package/dist/esm/components/chart/line-chart.js +3 -8
  61. package/dist/esm/components/chart/line-chart.js.map +1 -1
  62. package/dist/esm/components/chart/pie-chart.js +3 -8
  63. package/dist/esm/components/chart/pie-chart.js.map +1 -1
  64. package/dist/esm/components/chart/polar-chart.js +8 -3
  65. package/dist/esm/components/chart/polar-chart.js.map +1 -1
  66. package/dist/esm/components/chart/radar-chart.js +3 -8
  67. package/dist/esm/components/chart/radar-chart.js.map +1 -1
  68. package/dist/esm/components/chart/radial-chart.js +7 -14
  69. package/dist/esm/components/chart/radial-chart.js.map +1 -1
  70. package/dist/esm/components/chart/use-cartesian-chart.js +32 -1
  71. package/dist/esm/components/chart/use-cartesian-chart.js.map +1 -1
  72. package/dist/esm/components/chart/use-polar-chart.js +54 -1
  73. package/dist/esm/components/chart/use-polar-chart.js.map +1 -1
  74. package/dist/esm/index.js +10 -16
  75. package/dist/types/components/accordion/accordion.d.ts +4 -2
  76. package/dist/types/components/accordion/use-accordion.d.ts +11 -11
  77. package/dist/types/components/airy/airy.d.ts +3 -2
  78. package/dist/types/components/alert/alert.d.ts +5 -2
  79. package/dist/types/components/alert/alert.style.d.ts +1 -1
  80. package/dist/types/components/alpha-slider/alpha-slider.d.ts +3 -2
  81. package/dist/types/components/aspect-ratio/aspect-ratio.d.ts +2 -2
  82. package/dist/types/components/autocomplete/autocomplete.d.ts +4 -2
  83. package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
  84. package/dist/types/components/autocomplete/use-autocomplete.d.ts +7 -5
  85. package/dist/types/components/avatar/avatar.d.ts +5 -5
  86. package/dist/types/components/avatar/avatar.style.d.ts +1 -1
  87. package/dist/types/components/avatar/use-avatar-group.d.ts +2 -2
  88. package/dist/types/components/badge/badge.d.ts +2 -2
  89. package/dist/types/components/bleed/bleed.d.ts +2 -2
  90. package/dist/types/components/blockquote/blockquote.d.ts +2 -2
  91. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  92. package/dist/types/components/breadcrumb/use-breadcrumb.d.ts +2 -2
  93. package/dist/types/components/button/button-group.d.ts +1 -0
  94. package/dist/types/components/button/button.d.ts +3 -2
  95. package/dist/types/components/button/icon-button.d.ts +2 -2
  96. package/dist/types/components/calendar/calendar.d.ts +3 -2
  97. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  98. package/dist/types/components/calendar/use-calendar.d.ts +9 -8
  99. package/dist/types/components/card/card.d.ts +2 -2
  100. package/dist/types/components/carousel/carousel.d.ts +3 -2
  101. package/dist/types/components/carousel/carousel.style.d.ts +2 -2
  102. package/dist/types/components/carousel/use-carousel.d.ts +3 -3
  103. package/dist/types/components/center/center.d.ts +2 -2
  104. package/dist/types/components/chart/area-chart.d.ts +2 -8
  105. package/dist/types/components/chart/bar-chart.d.ts +2 -8
  106. package/dist/types/components/chart/cartesian-chart.d.ts +34 -18
  107. package/dist/types/components/chart/chart.d.ts +8 -8
  108. package/dist/types/components/chart/composed-chart.d.ts +32 -0
  109. package/dist/types/components/chart/composed-chart.namespace.d.ts +11 -0
  110. package/dist/types/components/chart/composed-chart.style.d.ts +10 -0
  111. package/dist/types/components/chart/donut-chart.d.ts +4 -10
  112. package/dist/types/components/chart/index.d.ts +5 -9
  113. package/dist/types/components/chart/line-chart.d.ts +4 -10
  114. package/dist/types/components/chart/pie-chart.d.ts +4 -10
  115. package/dist/types/components/chart/polar-chart.d.ts +9 -4
  116. package/dist/types/components/chart/radar-chart.d.ts +3 -4
  117. package/dist/types/components/chart/radial-chart.d.ts +4 -10
  118. package/dist/types/components/chart/use-cartesian-chart.d.ts +23 -2
  119. package/dist/types/components/chart/use-chart.d.ts +2 -2
  120. package/dist/types/components/chart/use-polar-chart.d.ts +33 -1
  121. package/dist/types/components/checkbox/checkbox-group.d.ts +2 -0
  122. package/dist/types/components/checkbox/checkbox.d.ts +5 -4
  123. package/dist/types/components/checkbox/use-checkbox-group.d.ts +3 -2
  124. package/dist/types/components/checkbox/use-checkbox.d.ts +1 -0
  125. package/dist/types/components/checkbox-card/checkbox-card-group.d.ts +3 -0
  126. package/dist/types/components/checkbox-card/checkbox-card.d.ts +7 -5
  127. package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
  128. package/dist/types/components/circle-progress/circle-progress.d.ts +3 -2
  129. package/dist/types/components/close-button/close-button.d.ts +3 -2
  130. package/dist/types/components/code/code.d.ts +2 -2
  131. package/dist/types/components/collapse/collapse.d.ts +3 -2
  132. package/dist/types/components/color-picker/color-picker.d.ts +6 -2
  133. package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
  134. package/dist/types/components/color-picker/use-color-picker.d.ts +5 -2
  135. package/dist/types/components/color-selector/color-selector.d.ts +6 -2
  136. package/dist/types/components/color-selector/color-selector.style.d.ts +2 -2
  137. package/dist/types/components/color-selector/use-color-selector.d.ts +5 -3
  138. package/dist/types/components/color-swatch/color-swatch.d.ts +2 -2
  139. package/dist/types/components/container/container.d.ts +2 -2
  140. package/dist/types/components/data-list/data-list.d.ts +2 -2
  141. package/dist/types/components/data-list/data-list.style.d.ts +1 -1
  142. package/dist/types/components/date-picker/date-picker.d.ts +5 -2
  143. package/dist/types/components/date-picker/date-picker.style.d.ts +1 -1
  144. package/dist/types/components/date-picker/use-date-picker.d.ts +7 -4
  145. package/dist/types/components/drawer/drawer.d.ts +5 -2
  146. package/dist/types/components/drawer/use-drawer.d.ts +2 -0
  147. package/dist/types/components/dropzone/dropzone.d.ts +8 -5
  148. package/dist/types/components/dropzone/dropzone.style.d.ts +1 -1
  149. package/dist/types/components/dropzone/use-dropzone.d.ts +1 -0
  150. package/dist/types/components/editable/editable.d.ts +5 -4
  151. package/dist/types/components/editable/use-editable.d.ts +3 -2
  152. package/dist/types/components/em/em.d.ts +2 -2
  153. package/dist/types/components/empty-state/empty-state.d.ts +2 -2
  154. package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
  155. package/dist/types/components/fade/fade.d.ts +3 -2
  156. package/dist/types/components/fade-scale/fade-scale.d.ts +1 -0
  157. package/dist/types/components/field/field.d.ts +3 -3
  158. package/dist/types/components/field/use-field-props.d.ts +4 -4
  159. package/dist/types/components/fieldset/fieldset.d.ts +4 -3
  160. package/dist/types/components/file-button/file-button.d.ts +4 -2
  161. package/dist/types/components/file-button/use-file-button.d.ts +20 -18
  162. package/dist/types/components/file-input/file-input.d.ts +4 -2
  163. package/dist/types/components/file-input/use-file-input.d.ts +16 -15
  164. package/dist/types/components/flex/flex.d.ts +2 -2
  165. package/dist/types/components/flip/flip.d.ts +5 -4
  166. package/dist/types/components/float/float.d.ts +2 -2
  167. package/dist/types/components/form/form.d.ts +4 -3
  168. package/dist/types/components/form/form.style.d.ts +1 -1
  169. package/dist/types/components/format/format-byte.d.ts +4 -4
  170. package/dist/types/components/format/format-date-time.d.ts +4 -4
  171. package/dist/types/components/format/format-number.d.ts +2 -2
  172. package/dist/types/components/format/use-format-byte.d.ts +1 -0
  173. package/dist/types/components/format/use-format-date-time.d.ts +1 -0
  174. package/dist/types/components/format/use-format-number.d.ts +1 -0
  175. package/dist/types/components/grid/grid-item.d.ts +2 -2
  176. package/dist/types/components/grid/grid.d.ts +2 -2
  177. package/dist/types/components/group/group.d.ts +3 -2
  178. package/dist/types/components/group/use-group.d.ts +2 -2
  179. package/dist/types/components/heading/heading.d.ts +2 -2
  180. package/dist/types/components/highlight/highlight.d.ts +2 -0
  181. package/dist/types/components/hue-slider/hue-slider.d.ts +4 -3
  182. package/dist/types/components/icon/icon.d.ts +5 -5
  183. package/dist/types/components/image/image.d.ts +2 -2
  184. package/dist/types/components/indicator/indicator.d.ts +3 -2
  185. package/dist/types/components/infinite-scroll-area/infinite-scroll-area.d.ts +2 -2
  186. package/dist/types/components/input/input-addon.d.ts +2 -2
  187. package/dist/types/components/input/input-element.d.ts +2 -2
  188. package/dist/types/components/input/input-group.d.ts +2 -0
  189. package/dist/types/components/input/input.d.ts +3 -2
  190. package/dist/types/components/kbd/kbd.d.ts +2 -2
  191. package/dist/types/components/link/link.d.ts +2 -2
  192. package/dist/types/components/link-box/link-box.d.ts +2 -2
  193. package/dist/types/components/list/list.d.ts +2 -2
  194. package/dist/types/components/loading/loading-provider.d.ts +2 -2
  195. package/dist/types/components/loading/loading.d.ts +4 -3
  196. package/dist/types/components/loading/use-loading-component.d.ts +1 -0
  197. package/dist/types/components/mark/mark.d.ts +2 -2
  198. package/dist/types/components/menu/menu.d.ts +3 -2
  199. package/dist/types/components/menu/menu.style.d.ts +2 -2
  200. package/dist/types/components/menu/use-menu.d.ts +11 -11
  201. package/dist/types/components/modal/modal.d.ts +6 -2
  202. package/dist/types/components/native-accordion/native-accordion.d.ts +2 -2
  203. package/dist/types/components/native-accordion/use-native-accordion.d.ts +2 -2
  204. package/dist/types/components/native-popover/native-popover.d.ts +2 -2
  205. package/dist/types/components/native-select/native-select.d.ts +4 -2
  206. package/dist/types/components/native-select/native-select.style.d.ts +1 -1
  207. package/dist/types/components/native-select/use-native-select.d.ts +1 -0
  208. package/dist/types/components/native-table/native-table.d.ts +4 -4
  209. package/dist/types/components/notice/notice.style.d.ts +1 -1
  210. package/dist/types/components/notice/use-notice.d.ts +3 -0
  211. package/dist/types/components/number-input/number-input.d.ts +3 -2
  212. package/dist/types/components/number-input/number-input.style.d.ts +1 -1
  213. package/dist/types/components/number-input/use-number-input.d.ts +1 -0
  214. package/dist/types/components/pagination/pagination.d.ts +3 -2
  215. package/dist/types/components/pagination/use-pagination.d.ts +2 -2
  216. package/dist/types/components/password-input/password-input.d.ts +3 -2
  217. package/dist/types/components/password-input/password-input.style.d.ts +1 -1
  218. package/dist/types/components/password-input/strength-meter.d.ts +2 -2
  219. package/dist/types/components/password-input/use-password-input.d.ts +3 -2
  220. package/dist/types/components/picture/picture.d.ts +1 -0
  221. package/dist/types/components/pin-input/pin-input.d.ts +4 -2
  222. package/dist/types/components/pin-input/pin-input.style.d.ts +1 -1
  223. package/dist/types/components/pin-input/use-pin-input.d.ts +8 -7
  224. package/dist/types/components/popover/popover.d.ts +3 -2
  225. package/dist/types/components/progress/progress.d.ts +4 -4
  226. package/dist/types/components/progress/use-progress.d.ts +706 -706
  227. package/dist/types/components/qr-code/qr-code.d.ts +2 -2
  228. package/dist/types/components/radio/radio-group.d.ts +2 -0
  229. package/dist/types/components/radio/radio.d.ts +4 -3
  230. package/dist/types/components/radio/use-radio-group.d.ts +3 -2
  231. package/dist/types/components/radio/use-radio.d.ts +1 -0
  232. package/dist/types/components/radio-card/radio-card-group.d.ts +3 -0
  233. package/dist/types/components/radio-card/radio-card.d.ts +6 -4
  234. package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
  235. package/dist/types/components/rating/use-rating.d.ts +8 -7
  236. package/dist/types/components/reorder/reorder.d.ts +3 -2
  237. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  238. package/dist/types/components/reorder/use-reorder.d.ts +3 -3
  239. package/dist/types/components/resizable/resizable.d.ts +2 -2
  240. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  241. package/dist/types/components/resizable/use-resizable.d.ts +2 -2
  242. package/dist/types/components/ripple/ripple.d.ts +3 -2
  243. package/dist/types/components/ripple/use-ripple.d.ts +2 -2
  244. package/dist/types/components/rotate/rotate.d.ts +3 -2
  245. package/dist/types/components/saturation-slider/saturation-slider.d.ts +2 -2
  246. package/dist/types/components/saturation-slider/use-saturation-slider.d.ts +3 -2
  247. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  248. package/dist/types/components/segmented-control/segmented-control.d.ts +3 -2
  249. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  250. package/dist/types/components/segmented-control/use-segmented-control.d.ts +10 -9
  251. package/dist/types/components/select/select.d.ts +4 -2
  252. package/dist/types/components/select/select.style.d.ts +1 -1
  253. package/dist/types/components/select/use-select.d.ts +6 -4
  254. package/dist/types/components/separator/separator.d.ts +2 -2
  255. package/dist/types/components/simple-grid/simple-grid.d.ts +3 -2
  256. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  257. package/dist/types/components/slide/slide.d.ts +3 -2
  258. package/dist/types/components/slide-fade/slide-fade.d.ts +3 -2
  259. package/dist/types/components/slider/slider.d.ts +2 -2
  260. package/dist/types/components/slider/use-slider.d.ts +3 -2
  261. package/dist/types/components/snacks/snacks.d.ts +2 -0
  262. package/dist/types/components/snacks/use-snacks.d.ts +1 -0
  263. package/dist/types/components/stack/h-stack.d.ts +2 -2
  264. package/dist/types/components/stack/stack.d.ts +2 -2
  265. package/dist/types/components/stack/v-stack.d.ts +2 -2
  266. package/dist/types/components/stack/z-stack.d.ts +2 -2
  267. package/dist/types/components/stat/stat.d.ts +2 -2
  268. package/dist/types/components/status/status.d.ts +2 -2
  269. package/dist/types/components/steps/steps.d.ts +2 -2
  270. package/dist/types/components/steps/steps.style.d.ts +1 -1
  271. package/dist/types/components/steps/use-steps.d.ts +10 -10
  272. package/dist/types/components/switch/switch.d.ts +2 -2
  273. package/dist/types/components/switch/use-switch.d.ts +1 -0
  274. package/dist/types/components/table/table.d.ts +4 -2
  275. package/dist/types/components/tabs/tabs.d.ts +2 -2
  276. package/dist/types/components/tabs/tabs.style.d.ts +1 -1
  277. package/dist/types/components/tabs/use-tabs.d.ts +16 -16
  278. package/dist/types/components/tag/tag.d.ts +2 -2
  279. package/dist/types/components/text/text.d.ts +2 -2
  280. package/dist/types/components/textarea/textarea.d.ts +4 -2
  281. package/dist/types/components/textarea/use-autosize.d.ts +2 -2
  282. package/dist/types/components/timeline/timeline.d.ts +5 -5
  283. package/dist/types/components/timeline/timeline.style.d.ts +2 -2
  284. package/dist/types/components/tip/tip.d.ts +2 -0
  285. package/dist/types/components/toggle/toggle-group.d.ts +1 -1
  286. package/dist/types/components/toggle/toggle.d.ts +7 -5
  287. package/dist/types/components/toggle/use-toggle-group.d.ts +2 -2
  288. package/dist/types/components/toggle/use-toggle.d.ts +3 -2
  289. package/dist/types/components/tooltip/tooltip.d.ts +4 -2
  290. package/dist/types/components/visually-hidden/visually-hidden.d.ts +2 -2
  291. package/dist/types/components/wrap/wrap.d.ts +3 -2
  292. package/dist/types/core/components/create-component.d.ts +7 -9
  293. package/dist/types/core/components/index.types.d.ts +0 -1
  294. package/dist/types/core/components/use-component-style.d.ts +0 -2
  295. package/dist/types/core/components/utils.d.ts +0 -1
  296. package/dist/types/core/constant.d.ts +0 -1
  297. package/dist/types/core/css/calc.d.ts +0 -1
  298. package/dist/types/core/css/config.d.ts +0 -1
  299. package/dist/types/core/css/css.d.ts +0 -1
  300. package/dist/types/core/css/index.types.d.ts +0 -1
  301. package/dist/types/core/css/styles.d.ts +0 -1
  302. package/dist/types/core/css/token.d.ts +0 -1
  303. package/dist/types/core/css/use-css.d.ts +0 -1
  304. package/dist/types/core/css/utils.d.ts +0 -2
  305. package/dist/types/core/generated-theme-tokens.types.d.ts +0 -1
  306. package/dist/types/core/index.d.ts +0 -2
  307. package/dist/types/core/system/color-mode-provider.d.ts +2 -2
  308. package/dist/types/core/system/config.d.ts +0 -1
  309. package/dist/types/core/system/factory.d.ts +0 -1
  310. package/dist/types/core/system/index.types.d.ts +0 -1
  311. package/dist/types/core/system/styled.d.ts +2 -3
  312. package/dist/types/core/system/var.d.ts +0 -2
  313. package/dist/types/hooks/use-async-callback/index.d.ts +1 -0
  314. package/dist/types/hooks/use-breakpoint/use-breakpoint-state.d.ts +2 -2
  315. package/dist/types/hooks/use-clickable/index.d.ts +7 -7
  316. package/dist/types/hooks/use-clipboard/index.d.ts +2 -2
  317. package/dist/types/hooks/use-combobox/index.d.ts +13 -12
  318. package/dist/types/hooks/use-counter/index.d.ts +2 -2
  319. package/dist/types/hooks/use-descendants/index.d.ts +2 -2
  320. package/dist/types/hooks/use-field-sizing/index.d.ts +2 -2
  321. package/dist/types/hooks/use-hover/index.d.ts +2 -2
  322. package/dist/types/hooks/use-popper/index.d.ts +2 -2
  323. package/dist/types/hooks/use-resize-observer/index.d.ts +3 -3
  324. package/dist/types/index.d.ts +109 -10
  325. package/dist/types/providers/i18n-provider/i18n-provider.d.ts +3 -3
  326. package/dist/types/providers/ui-provider/ui-provider.d.ts +3 -2
  327. package/package.json +1 -1
  328. package/dist/cjs/components/chart/use-area-chart.cjs +0 -41
  329. package/dist/cjs/components/chart/use-area-chart.cjs.map +0 -1
  330. package/dist/cjs/components/chart/use-bar-chart.cjs +0 -41
  331. package/dist/cjs/components/chart/use-bar-chart.cjs.map +0 -1
  332. package/dist/cjs/components/chart/use-line-chart.cjs +0 -41
  333. package/dist/cjs/components/chart/use-line-chart.cjs.map +0 -1
  334. package/dist/cjs/components/chart/use-pie-chart.cjs +0 -43
  335. package/dist/cjs/components/chart/use-pie-chart.cjs.map +0 -1
  336. package/dist/cjs/components/chart/use-radar-chart.cjs +0 -45
  337. package/dist/cjs/components/chart/use-radar-chart.cjs.map +0 -1
  338. package/dist/cjs/components/chart/use-radial-chart.cjs +0 -63
  339. package/dist/cjs/components/chart/use-radial-chart.cjs.map +0 -1
  340. package/dist/esm/components/chart/use-area-chart.js +0 -40
  341. package/dist/esm/components/chart/use-area-chart.js.map +0 -1
  342. package/dist/esm/components/chart/use-bar-chart.js +0 -40
  343. package/dist/esm/components/chart/use-bar-chart.js.map +0 -1
  344. package/dist/esm/components/chart/use-line-chart.js +0 -40
  345. package/dist/esm/components/chart/use-line-chart.js.map +0 -1
  346. package/dist/esm/components/chart/use-pie-chart.js +0 -42
  347. package/dist/esm/components/chart/use-pie-chart.js.map +0 -1
  348. package/dist/esm/components/chart/use-radar-chart.js +0 -44
  349. package/dist/esm/components/chart/use-radar-chart.js.map +0 -1
  350. package/dist/esm/components/chart/use-radial-chart.js +0 -62
  351. package/dist/esm/components/chart/use-radial-chart.js.map +0 -1
  352. package/dist/types/components/chart/use-area-chart.d.ts +0 -29
  353. package/dist/types/components/chart/use-bar-chart.d.ts +0 -29
  354. package/dist/types/components/chart/use-line-chart.d.ts +0 -29
  355. package/dist/types/components/chart/use-pie-chart.d.ts +0 -30
  356. package/dist/types/components/chart/use-radar-chart.d.ts +0 -31
  357. package/dist/types/components/chart/use-radial-chart.d.ts +0 -40
@@ -1 +1 @@
1
- {"version":3,"file":"polar-chart.cjs","names":["createShouldForwardProp","createSlotComponent","polarChartStyle","Chart","varAttr","props","useChartPie","rest","styled","Pie","ChartLabelList","useChartSector","Sector","useChartPieLabel","Text","useChartPieLabelLine","Curve","useSystem","useTheme","getCSS","useChartRadar","Radar","useAngleAxis","PolarAngleAxis","useRadiusAxis","PolarRadiusAxis","usePolarGrid","PolarGrid","useChartComponentContext","useChartRadial","RadialBar"],"sources":["../../../../src/components/chart/polar-chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\n\nimport type {\n ActiveDotProps,\n BaseTickContentProps,\n DataKey,\n DotProps,\n LabelListProps,\n LabelProps,\n PieLabelRenderProps,\n PieSectorShapeProps,\n SectorProps,\n} from \"recharts\"\nimport type {\n CSSObject,\n CSSProps,\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type { Dict, Merge } from \"../../utils\"\nimport type {\n ChartActiveDot,\n ChartDot,\n ChartLabel,\n ChartLabelListProps,\n ChartLabelList as ChartLabelListType,\n ChartProps,\n ChartTickLine,\n} from \"./chart\"\nimport type { PolarChartStyle } from \"./polar-chart.style\"\nimport type {\n UseAngleAxisProps,\n UseChartPieLabelLineProps,\n UseChartPieLabelProps,\n UseChartPieProps,\n UseChartRadarProps,\n UseChartRadialProps,\n UseChartSectorProps,\n UsePolarGridProps,\n UseRadiusAxisProps,\n} from \"./use-polar-chart\"\nimport {\n cloneElement,\n isValidElement,\n useCallback,\n useId,\n useMemo,\n} from \"react\"\nimport {\n Curve,\n Pie,\n PolarAngleAxis,\n PolarGrid,\n PolarRadiusAxis,\n Radar,\n RadialBar,\n Sector,\n Text,\n} from \"recharts\"\nimport {\n createShouldForwardProp,\n createSlotComponent,\n getCSS,\n styled,\n useSystem,\n useTheme,\n varAttr,\n} from \"../../core\"\nimport {\n assignRef,\n cx,\n isFunction,\n isNumber,\n isObject,\n runIfFn,\n splitObject,\n} from \"../../utils\"\nimport { Chart, ChartLabelList, useChartComponentContext } from \"./chart\"\nimport { polarChartStyle } from \"./polar-chart.style\"\nimport {\n useAngleAxis,\n useChartPie,\n useChartPieLabel,\n useChartPieLabelLine,\n useChartRadar,\n useChartRadial,\n useChartSector,\n usePolarGrid,\n useRadiusAxis,\n} from \"./use-polar-chart\"\n\nconst shouldForwardProp = createShouldForwardProp()\n\ninterface ComponentContext extends Pick<\n PolarChartProps,\n | \"angleAxisProps\"\n | \"gridProps\"\n | \"nameKey\"\n | \"pieProps\"\n | \"radarProps\"\n | \"radialProps\"\n | \"radiusAxisProps\"\n | \"sectorProps\"\n> {}\n\nexport interface PolarChartProps<Y extends Dict = Dict>\n extends Omit<ChartProps, \"cx\" | \"cy\">, ThemeProps<PolarChartStyle> {\n /**\n * The fill of the active dot.\n */\n activeDotFill?: CSSProps[\"fill\"]\n /**\n * The radius of the active dot.\n */\n activeDotRadius?: CSSProps[\"r\"]\n /**\n * The stroke of the active dot.\n */\n activeDotStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the active dot stroke.\n */\n activeDotStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The stroke of the angle axis line.\n */\n angleAxisLineStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the angle axis line stroke.\n */\n angleAxisLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The color of the angle axis text.\n */\n angleAxisTextColor?: CSSProps[\"color\"]\n /**\n * The fill of the angle axis text.\n */\n angleAxisTextFill?: CSSProps[\"fill\"]\n /**\n * The fill of the dot.\n */\n dotFill?: CSSProps[\"fill\"]\n /**\n * The radius of the dot.\n */\n dotRadius?: CSSProps[\"r\"]\n /**\n * The stroke of the dot.\n */\n dotStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the dot stroke.\n */\n dotStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The stroke of the grid.\n */\n gridStroke?: CSSProps[\"stroke\"]\n /**\n * The opacity of the inactive label line.\n */\n inactiveLabelLineOpacity?: CSSProps[\"opacity\"]\n /**\n * The opacity of the inactive label.\n */\n inactiveLabelOpacity?: CSSProps[\"opacity\"]\n /**\n * The opacity of the inactive radar.\n */\n inactiveRadarOpacity?: CSSProps[\"opacity\"]\n /**\n * The opacity of the inactive sector.\n */\n inactiveSectorOpacity?: CSSProps[\"opacity\"]\n /**\n * The color of the label.\n */\n labelColor?: CSSProps[\"color\"]\n /**\n * The fill of the label.\n */\n labelFill?: CSSProps[\"fill\"]\n /**\n * The stroke of the label line.\n */\n labelLineStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the label line stroke.\n */\n labelLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The key to use for the angle axis.\n */\n nameKey?: keyof Y\n /**\n * The color of the radar.\n */\n radarColor?: CSSProps[\"color\"]\n /**\n * The fill opacity of the radar.\n */\n radarFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The stroke of the radar.\n */\n radarStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the radar stroke.\n */\n radarStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The color of the radial background.\n */\n radialBackgroundColor?: CSSProps[\"color\"]\n /**\n * The fill of the radial background.\n */\n radialBackgroundFill?: CSSProps[\"fill\"]\n /**\n * The stroke of the radial background.\n */\n radialBackgroundStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the radial background stroke.\n */\n radialBackgroundStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The stroke of the radius axis line.\n */\n radiusAxisLineStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the radius axis line stroke.\n */\n radiusAxisLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The color of the radius axis text.\n */\n radiusAxisTextColor?: CSSProps[\"color\"]\n /**\n * The fill of the radius axis text.\n */\n radiusAxisTextFill?: CSSProps[\"fill\"]\n /**\n * The color of the sector.\n */\n sectorColor?: CSSProps[\"color\"]\n /**\n * The fill of the sector.\n */\n sectorFill?: CSSProps[\"fill\"]\n /**\n * The stroke of the sector.\n */\n sectorStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the sector stroke.\n */\n sectorStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * If `true`, angle axis is visible.\n *\n * @default true\n */\n withAngleAxis?: boolean\n /**\n * If `true`, grid is visible.\n *\n * @default true\n */\n withGrid?: boolean\n /**\n * If `true`, radius axis is visible.\n *\n * @default false\n */\n withRadiusAxis?: boolean\n /**\n * Props for the angle axis component.\n */\n angleAxisProps?: UseAngleAxisProps\n /**\n * Props for the donut component.\n */\n donutProps?: Omit<ChartPieProps, \"data\" | \"dataKey\" | \"nameKey\">\n /**\n * Props for the grid component.\n */\n gridProps?: ChartPolarGridProps\n /**\n * Props for the pie component.\n */\n pieProps?: Omit<ChartPieProps, \"data\" | \"dataKey\" | \"nameKey\">\n /**\n * Props for the radar component.\n */\n radarProps?: Omit<ChartRadarProps, \"data\" | \"dataKey\">\n /**\n * Props for the radial component.\n */\n radialProps?: Omit<ChartRadialProps, \"dataKey\" | \"nameKey\">\n /**\n * Props for the radius axis component.\n */\n radiusAxisProps?: UseRadiusAxisProps\n /**\n * Props for the sector component.\n */\n sectorProps?: ChartSectorProps\n}\n\nconst {\n component,\n ComponentContext,\n PropsContext: PolarChartPropsContext,\n useComponentContext,\n usePropsContext: usePolarChartPropsContext,\n withContext,\n withProvider,\n useSlotComponentProps,\n} = createSlotComponent<PolarChartProps, PolarChartStyle, ComponentContext>(\n \"polar-chart\",\n polarChartStyle,\n)\n\nexport { PolarChartPropsContext, usePolarChartPropsContext }\n\nexport const PolarChart = withProvider(\n <Y extends Dict>({\n components: componentsProp,\n nameKey,\n withAngleAxis = false,\n withGrid = false,\n withRadiusAxis = false,\n angleAxisProps,\n donutProps,\n gridProps,\n pieProps = donutProps,\n radarProps,\n radialProps,\n radiusAxisProps,\n sectorProps,\n ...rest\n }: PolarChartProps<Y>) => {\n const components = useMemo(\n () => [\n {\n component: ChartPolarGrid,\n fallback: withGrid ? <ChartPolarGrid /> : null,\n },\n {\n component: ChartAngleAxis,\n fallback: withAngleAxis ? <ChartAngleAxis /> : null,\n },\n {\n component: ChartRadiusAxis,\n fallback: withRadiusAxis ? <ChartRadiusAxis /> : null,\n },\n ...componentsProp,\n ],\n [componentsProp, withGrid, withAngleAxis, withRadiusAxis],\n )\n const componentContext = useMemo(\n () => ({\n nameKey: nameKey as string | undefined,\n angleAxisProps,\n gridProps,\n pieProps,\n radarProps,\n radialProps,\n radiusAxisProps,\n sectorProps,\n }),\n [\n pieProps,\n radarProps,\n sectorProps,\n angleAxisProps,\n radiusAxisProps,\n gridProps,\n nameKey,\n radialProps,\n ],\n )\n\n return (\n <ComponentContext value={componentContext}>\n <Chart components={components} {...rest} />\n </ComponentContext>\n )\n },\n \"root\",\n)(\n undefined,\n ({\n activeDotFill,\n activeDotRadius,\n activeDotStroke,\n activeDotStrokeWidth,\n angleAxisLineStroke,\n angleAxisLineStrokeWidth,\n angleAxisTextColor,\n angleAxisTextFill,\n dotFill,\n dotRadius,\n dotStroke,\n dotStrokeWidth,\n gridStroke,\n inactiveLabelLineOpacity,\n inactiveLabelOpacity,\n inactiveRadarOpacity,\n inactiveSectorOpacity,\n labelColor,\n labelFill,\n labelLineStroke,\n labelLineStrokeWidth,\n radarColor,\n radarFillOpacity,\n radarStroke,\n radarStrokeWidth,\n radialBackgroundColor,\n radialBackgroundFill,\n radialBackgroundStroke,\n radialBackgroundStrokeWidth,\n radiusAxisLineStroke,\n radiusAxisLineStrokeWidth,\n radiusAxisTextColor,\n radiusAxisTextFill,\n sectorColor,\n sectorFill,\n sectorStroke,\n sectorStrokeWidth,\n ...rest\n }) => ({\n \"--active-dot-fill\": varAttr(activeDotFill, \"colors\"),\n \"--active-dot-r\": activeDotRadius,\n \"--active-dot-stroke\": varAttr(activeDotStroke, \"colors\"),\n \"--active-dot-stroke-width\": activeDotStrokeWidth,\n \"--angle-axis-line-stroke\": varAttr(angleAxisLineStroke, \"colors\"),\n \"--angle-axis-line-stroke-width\": angleAxisLineStrokeWidth,\n \"--angle-axis-text-color\": varAttr(angleAxisTextColor, \"colors\"),\n \"--angle-axis-text-fill\": varAttr(angleAxisTextFill, \"colors\"),\n \"--dot-fill\": varAttr(dotFill, \"colors\"),\n \"--dot-r\": dotRadius,\n \"--dot-stroke\": varAttr(dotStroke, \"colors\"),\n \"--dot-stroke-width\": dotStrokeWidth,\n \"--grid-stroke\": varAttr(gridStroke, \"colors\"),\n \"--inactive-label-line-opacity\": inactiveLabelLineOpacity,\n \"--inactive-label-opacity\": inactiveLabelOpacity,\n \"--inactive-radar-opacity\": inactiveRadarOpacity,\n \"--inactive-sector-opacity\": inactiveSectorOpacity,\n \"--label-color\": varAttr(labelColor, \"colors\"),\n \"--label-fill\": varAttr(labelFill, \"colors\"),\n \"--label-line-stroke\": varAttr(labelLineStroke, \"colors\"),\n \"--label-line-stroke-width\": labelLineStrokeWidth,\n \"--radar-color\": varAttr(radarColor, \"colors\"),\n \"--radar-fill-opacity\": radarFillOpacity,\n \"--radar-stroke\": varAttr(radarStroke, \"colors\"),\n \"--radar-stroke-width\": radarStrokeWidth,\n \"--radial-background-color\": varAttr(radialBackgroundColor, \"colors\"),\n \"--radial-background-fill\": varAttr(radialBackgroundFill, \"colors\"),\n \"--radial-background-stroke\": varAttr(radialBackgroundStroke, \"colors\"),\n \"--radial-background-stroke-width\": radialBackgroundStrokeWidth,\n \"--radius-axis-line-stroke\": varAttr(radiusAxisLineStroke, \"colors\"),\n \"--radius-axis-line-stroke-width\": radiusAxisLineStrokeWidth,\n \"--radius-axis-text-color\": varAttr(radiusAxisTextColor, \"colors\"),\n \"--radius-axis-text-fill\": varAttr(radiusAxisTextFill, \"colors\"),\n \"--sector-color\": varAttr(sectorColor, \"colors\"),\n \"--sector-fill\": varAttr(sectorFill, \"colors\"),\n \"--sector-stroke\": varAttr(sectorStroke, \"colors\"),\n \"--sector-stroke-width\": sectorStrokeWidth,\n ...rest,\n }),\n) as GenericsComponent<{\n <Y extends Dict>(props: PolarChartProps<Y>): ReactElement\n}>\n\nexport type ChartPieLabel =\n | ((props: PieLabelRenderProps) => Partial<ChartPieLabelProps>)\n | boolean\n | Partial<ChartPieLabelProps>\n\nexport type ChartPieLabelLine =\n | ((props: any) => ChartPieLabelLineProps)\n | boolean\n | ChartPieLabelLineProps\n\nexport type ChartPieLabelList = boolean | ChartLabelListProps\n\nexport interface ChartPieProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"svg\">,\n Omit<UseChartPieProps, \"data\" | \"dataKey\" | \"label\" | \"labelLine\" | \"nameKey\">\n> {\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey: Exclude<keyof Y, \"fill\">\n /**\n * The key of the name of the data.\n */\n nameKey: Exclude<keyof Y, \"fill\">\n /**\n * The active index of the sector.\n */\n activeIndex?: number\n /**\n * The data to use for the pie.\n */\n data?: Y[]\n /**\n * The label to use for the pie.\n */\n label?: ChartPieLabel\n /**\n * The label line to use for the pie.\n *\n * @default false\n */\n labelLine?: ChartPieLabelLine\n /**\n * If `true`, the label list is visible.\n *\n * @default false\n */\n labelList?: ChartPieLabelList\n /**\n * Props for the sector component.\n */\n sectorProps?:\n | ((props: PieSectorShapeProps, index: number) => ChartSectorProps)\n | ChartSectorProps\n}\n\nexport const ChartPie = withContext<\"svg\", ChartPieProps>((props) => {\n const { pieProps } = useComponentContext()\n const {\n activeIndex,\n children,\n label: labelProp,\n labelLine: labelLineProp = false,\n labelList = false,\n nameKey,\n sectorProps,\n ...rest\n } = { ...pieProps, ...props }\n const shape = useCallback(\n (props: any, index: number) => {\n if (isNumber(activeIndex)) props.isActive = index === activeIndex\n\n return <ChartSector {...props} {...runIfFn(sectorProps, props, index)} />\n },\n [activeIndex, sectorProps],\n )\n const label = useMemo<UseChartPieProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const Component = (props: any) => (\n <ChartPieLabel\n {...props}\n {...(labelProp !== true ? runIfFn(labelProp, props) : {})}\n />\n )\n\n return Component\n }, [labelProp])\n const labelLine = useMemo<UseChartPieProps[\"labelLine\"]>(() => {\n if (!labelLineProp) return labelLineProp\n\n const Component = ({ key: _, ...rest }: any) => (\n <ChartPieLabelLine\n {...rest}\n {...(labelLineProp !== true ? runIfFn(labelLineProp, rest) : {})}\n />\n )\n\n return Component\n }, [labelLineProp])\n const { getPieProps, getRootProps } = useChartPie({\n label,\n labelLine,\n nameKey,\n shape,\n ...rest,\n })\n\n return (\n <styled.svg asChild {...getRootProps()}>\n <Pie {...getPieProps()}>\n {children}\n\n {labelList ? (\n <ChartLabelList\n dataKey={nameKey}\n {...(isObject(labelList) ? labelList : {})}\n />\n ) : null}\n </Pie>\n </styled.svg>\n )\n}, \"pie\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartPieProps<Y>): ReactElement\n}>\n\ninterface ChartSectorProps extends Merge<\n HTMLStyledProps<\"path\">,\n UseChartSectorProps\n> {}\n\nconst ChartSector = withContext<\"path\", ChartSectorProps>((props) => {\n const { sectorProps } = useComponentContext()\n const { getRootProps, getSectorProps } = useChartSector({\n ...sectorProps,\n ...props,\n })\n\n return (\n <styled.path asChild {...getRootProps()}>\n <Sector {...getSectorProps()} />\n </styled.path>\n )\n}, \"sector\")()\n\ninterface ChartPieLabelProps extends Merge<\n HTMLStyledProps<\"text\">,\n UseChartPieLabelProps\n> {}\n\nconst ChartPieLabel = withContext<\"text\", ChartPieLabelProps>((props) => {\n const { getRootProps, getTextProps } = useChartPieLabel(props)\n\n return (\n <styled.text asChild {...getRootProps()}>\n <Text {...getTextProps()} />\n </styled.text>\n )\n}, \"label\")()\n\ninterface ChartPieLabelLineProps extends Merge<\n HTMLStyledProps<\"path\">,\n UseChartPieLabelLineProps\n> {}\n\nconst ChartPieLabelLine = withContext<\"path\", ChartPieLabelLineProps>(\n (props) => {\n const { getCurveProps, getRootProps } = useChartPieLabelLine(props)\n\n return (\n <styled.path asChild {...getRootProps()}>\n <Curve {...getCurveProps()} />\n </styled.path>\n )\n },\n \"labelLine\",\n)()\n\nexport interface ChartDonutProps<\n Y extends Dict = Dict,\n> extends ChartPieProps<Y> {}\n\nexport const ChartDonut = component<\"svg\", ChartDonutProps>(ChartPie, \"donut\")(\n undefined,\n (props) => {\n const { pieProps } = useComponentContext()\n\n return { ...pieProps, ...props }\n },\n ({ label, ...rest }) => ({ innerRadius: !label ? \"70%\" : \"50%\", ...rest }),\n) as GenericsComponent<{\n <Y extends Dict>(props: ChartDonutProps<Y>): ReactElement\n}>\n\nexport interface ChartRadarProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"path\">,\n Omit<UseChartRadarProps, \"activeDot\" | \"dataKey\" | \"dot\" | \"label\" | \"stroke\">\n> {\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey: keyof Y\n /**\n * The active dot to use for the line.\n *\n * @default true\n */\n activeDot?: ChartActiveDot\n /**\n * The dot to use for the line.\n *\n * @default false\n */\n dot?: ChartDot\n /**\n * The label to use for the line.\n *\n * @default false\n */\n label?: ChartLabelListType\n}\n\nexport const ChartRadar = withContext<\"path\", ChartRadarProps>((props) => {\n const { radarProps } = useComponentContext()\n const {\n activeDot: activeDotProp = true,\n children,\n dataKey,\n dot: dotProp = false,\n label: labelProp = false,\n stroke: strokeProp,\n ...rest\n } = { ...radarProps, ...props }\n const id = useId()\n const system = useSystem()\n const { theme } = useTheme()\n const color = strokeProp ?? rest.fill ?? rest.color\n const stroke = JSON.stringify(color)\n const dotProps = useSlotComponentProps({}, \"dot\")\n const activeDotProps = useSlotComponentProps({}, \"activeDot\")\n const labelProps = useSlotComponentProps({}, \"labelList\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const dot = useMemo<UseChartRadarProps[\"dot\"]>(() => {\n if (!dotProp) return dotProp\n\n const className = cx(\n dotProps.className,\n css(dotProps.css),\n css({ fill: color, stroke: color }),\n )\n\n if (isFunction(dotProp)) {\n return (props) =>\n dotProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(dotProp)) {\n return cloneElement<any>(dotProp, { className })\n } else if (isObject(dotProp)) {\n const [omittedProps, styleProps] = splitObject<DotProps, CSSObject>(\n dotProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [dotProp, dotProps.className, dotProps.css, css, color])\n const activeDot = useMemo<UseChartRadarProps[\"activeDot\"]>(() => {\n if (!activeDotProp) return activeDotProp\n\n const className = cx(\n activeDotProps.className,\n css(activeDotProps.css),\n css({ fill: color, stroke: color }),\n )\n\n if (isFunction(activeDotProp)) {\n return (props) =>\n activeDotProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(activeDotProp)) {\n return cloneElement<any>(activeDotProp, { className })\n } else if (isObject(activeDotProp)) {\n const [omittedProps, styleProps] = splitObject<ActiveDotProps, CSSObject>(\n activeDotProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [activeDotProp, activeDotProps.className, activeDotProps.css, css, color])\n const label = useMemo<UseChartRadarProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const className = cx(labelProps.className, css(labelProps.css))\n\n if (isFunction(labelProp)) {\n return (props) =>\n labelProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(labelProp)) {\n return cloneElement<any>(labelProp, { className })\n } else if (isObject(labelProp)) {\n const [omittedProps, styleProps] = splitObject<LabelListProps, CSSObject>(\n labelProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [labelProp, labelProps.className, labelProps.css, css])\n const { getRadarProps, getRootProps } = useChartRadar({\n activeDot,\n dataKey,\n dot,\n fill: color ? `url(#${id})` : \"\",\n label,\n stroke,\n ...rest,\n })\n\n return (\n <>\n <styled.path asChild {...getRootProps()}>\n <Radar {...getRadarProps()}>{children}</Radar>\n </styled.path>\n\n <linearGradient id={id} x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <styled.stop\n stopColor={color}\n stopOpacity={rest.fillOpacity ?? \"{radar-fill-opacity}\"}\n />\n </linearGradient>\n </>\n )\n}, \"radar\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartRadarProps<Y>): ReactElement\n}>\n\nexport type ChartPolarAxisTick =\n | ((props: BaseTickContentProps) => ReactNode)\n | boolean\n | HTMLStyledProps<\"text\">\n | ReactElement\n\nexport type ChartAxisLine = boolean | HTMLStyledProps<\"line\">\n\nexport interface ChartAngleAxisProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"text\">,\n Omit<\n UseAngleAxisProps,\n \"axisLine\" | \"dataKey\" | \"label\" | \"tick\" | \"tickLine\"\n >\n> {\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n axisLine?: ChartAxisLine\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey?: keyof Y\n /**\n * The label to use for the axis.\n *\n * @default false\n */\n label?: ChartLabel\n /**\n * The tick to use for the axis.\n *\n * @default true\n */\n tick?: ChartPolarAxisTick\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n tickLine?: ChartTickLine\n}\n\nexport const ChartAngleAxis = withContext<\"text\", ChartAngleAxisProps>(\n (props) => {\n const { nameKey, angleAxisProps } = useComponentContext()\n const {\n axisLine: axisLineProp = false,\n children,\n label: labelProp = false,\n tick: tickProp = true,\n tickLine: tickLineProp = false,\n ...rest\n } = { ...angleAxisProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const tickProps = useSlotComponentProps({}, \"angleAxisTick\")\n const labelProps = useSlotComponentProps({}, \"angleAxisLabel\")\n const tickLineProps = useSlotComponentProps({}, \"angleAxisTickLine\")\n const axisLineProps = useSlotComponentProps({}, \"angleAxisLine\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const tick = useMemo<UseAngleAxisProps[\"tick\"]>(() => {\n if (!tickProp) return tickProp\n\n const className = cx(tickProps.className, css(tickProps.css))\n\n if (isFunction(tickProp)) {\n return (props) =>\n tickProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(tickProp)) {\n return cloneElement<any>(tickProp, { className })\n } else if (isObject(tickProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"text\">,\n CSSObject\n >(tickProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [tickProp, tickProps.className, tickProps.css, css])\n const tickLine = useMemo<UseAngleAxisProps[\"tickLine\"]>(() => {\n if (!tickLineProp) return tickLineProp\n\n const className = cx(tickLineProps.className, css(tickLineProps.css))\n\n if (isObject(tickLineProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"line\">,\n CSSObject\n >(tickLineProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [tickLineProp, tickLineProps.className, tickLineProps.css, css])\n const axisLine = useMemo<UseAngleAxisProps[\"axisLine\"]>(() => {\n if (!axisLineProp) return axisLineProp\n\n const className = cx(axisLineProps.className, css(axisLineProps.css))\n\n if (isObject(axisLineProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"line\">,\n CSSObject\n >(axisLineProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [axisLineProp, axisLineProps.className, axisLineProps.css, css])\n const label = useMemo<UseAngleAxisProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const className = cx(labelProps.className, css(labelProps.css))\n\n if (isFunction(labelProp)) {\n return (props) =>\n labelProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(labelProp)) {\n return cloneElement<any>(labelProp, { className })\n } else if (isObject(labelProp)) {\n const [omittedProps, styleProps] = splitObject<LabelProps, CSSObject>(\n labelProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className, children: labelProp }\n }\n }, [labelProp, labelProps.className, labelProps.css, css])\n const { getAngleAxisProps, getRootProps } = useAngleAxis({\n axisLine,\n dataKey: nameKey,\n label,\n tick,\n tickLine,\n ...rest,\n })\n\n return (\n <styled.text asChild {...getRootProps()}>\n <PolarAngleAxis {...getAngleAxisProps()}>{children}</PolarAngleAxis>\n </styled.text>\n )\n },\n \"angleAxis\",\n)() as GenericsComponent<{\n <Y extends Dict>(props: ChartAngleAxisProps<Y>): ReactElement\n}>\n\nexport interface ChartRadiusAxisProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"text\">,\n Omit<\n UseRadiusAxisProps,\n \"axisLine\" | \"dataKey\" | \"label\" | \"tick\" | \"tickLine\"\n >\n> {\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n axisLine?: ChartAxisLine\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey?: keyof Y\n /**\n * The label to use for the axis.\n *\n * @default false\n */\n label?: ChartLabel\n /**\n * The tick to use for the axis.\n *\n * @default true\n */\n tick?: ChartPolarAxisTick\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n tickLine?: ChartTickLine\n}\n\nexport const ChartRadiusAxis = withContext<\"text\", ChartRadiusAxisProps>(\n (props) => {\n const { radiusAxisProps } = useComponentContext()\n const {\n axisLine: axisLineProp = false,\n children,\n label: labelProp = false,\n tick: tickProp = true,\n tickLine: tickLineProp = false,\n ...rest\n } = { ...radiusAxisProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const tickProps = useSlotComponentProps({}, \"radiusAxisTick\")\n const labelProps = useSlotComponentProps({}, \"radiusAxisLabel\")\n const tickLineProps = useSlotComponentProps({}, \"radiusAxisTickLine\")\n const axisLineProps = useSlotComponentProps({}, \"radiusAxisLine\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const tick = useMemo<UseRadiusAxisProps[\"tick\"]>(() => {\n if (!tickProp) return tickProp\n\n const className = cx(tickProps.className, css(tickProps.css))\n\n if (isFunction(tickProp)) {\n return (props) =>\n tickProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(tickProp)) {\n return cloneElement<any>(tickProp, { className })\n } else if (isObject(tickProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"text\">,\n CSSObject\n >(tickProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [tickProp, tickProps.className, tickProps.css, css])\n const tickLine = useMemo<UseRadiusAxisProps[\"tickLine\"]>(() => {\n if (!tickLineProp) return tickLineProp\n\n const className = cx(tickLineProps.className, css(tickLineProps.css))\n\n if (isObject(tickLineProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"line\">,\n CSSObject\n >(tickLineProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [tickLineProp, tickLineProps.className, tickLineProps.css, css])\n const axisLine = useMemo<UseRadiusAxisProps[\"axisLine\"]>(() => {\n if (!axisLineProp) return axisLineProp\n\n const className = cx(axisLineProps.className, css(axisLineProps.css))\n\n if (isObject(axisLineProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"line\">,\n CSSObject\n >(axisLineProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [axisLineProp, axisLineProps.className, axisLineProps.css, css])\n const label = useMemo<UseRadiusAxisProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const className = cx(labelProps.className, css(labelProps.css))\n\n if (isFunction(labelProp)) {\n return (props) =>\n labelProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(labelProp)) {\n return cloneElement<any>(labelProp, { className })\n } else if (isObject(labelProp)) {\n const [omittedProps, styleProps] = splitObject<LabelProps, CSSObject>(\n labelProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className, children: labelProp }\n }\n }, [labelProp, labelProps.className, labelProps.css, css])\n const { getRadiusAxisProps, getRootProps } = useRadiusAxis({\n axisLine,\n label,\n tick,\n tickLine,\n ...rest,\n })\n\n return (\n <styled.text asChild {...getRootProps()}>\n <PolarRadiusAxis {...getRadiusAxisProps()}>{children}</PolarRadiusAxis>\n </styled.text>\n )\n },\n \"radiusAxis\",\n)() as GenericsComponent<{\n <Y extends Dict>(props: ChartRadiusAxisProps<Y>): ReactElement\n}>\n\nexport interface ChartPolarGridProps extends Merge<\n HTMLStyledProps<\"line\">,\n UsePolarGridProps\n> {}\n\nexport const ChartPolarGrid = withContext<\"line\", ChartPolarGridProps>(\n (props) => {\n const { gridProps } = useComponentContext()\n const { getPolarGridProps, getRootProps } = usePolarGrid({\n ...gridProps,\n ...props,\n })\n\n return (\n <styled.line asChild {...getRootProps()}>\n <PolarGrid {...getPolarGridProps()} />\n </styled.line>\n )\n },\n \"grid\",\n)()\n\nexport type ChartRadialBackground =\n | ((props: SectorProps) => null | ReactElement | undefined)\n | boolean\n | HTMLStyledProps<\"svg\">\n | ReactElement\n\nexport interface ChartRadialProps<Y extends Dict = Dict> extends Merge<\n Omit<HTMLStyledProps<\"svg\">, \"background\">,\n Omit<UseChartRadialProps<Y>, \"background\" | \"dataKey\" | \"label\">\n> {\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey: keyof Y\n /**\n * The background to use for the radial chart.\n */\n background?: ChartRadialBackground\n /**\n * The label to use for the radial.\n *\n * @default false\n */\n label?: ChartLabelListType\n /**\n * If `true`, the label list is visible.\n *\n * @default false\n */\n labelList?: ChartPieLabelList\n /**\n * Props for the sector component.\n */\n sectorProps?:\n | ((props: PieSectorShapeProps) => ChartSectorProps)\n | ChartSectorProps\n}\n\nexport const ChartRadial = withContext<\"svg\", ChartRadialProps>(\n <Y extends Dict>(props: ChartRadialProps<Y>) => {\n const { radialProps } = useComponentContext()\n const {\n background: backgroundProp = true,\n children,\n dataKey,\n label: labelProp = false,\n labelList = false,\n nameKey,\n sectorProps,\n ...rest\n } = { ...radialProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const { nameKeyRef } = useChartComponentContext()\n const labelProps = useSlotComponentProps({}, \"labelList\")\n const backgroundProps = useSlotComponentProps({}, \"radialBackground\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const shape = useCallback(\n (props: any) => {\n const color = rest.fill ?? rest.color\n\n return (\n <ChartSector\n color={color}\n {...props}\n {...runIfFn(sectorProps, props)}\n />\n )\n },\n [rest.fill, rest.color, sectorProps],\n )\n const label = useMemo<UseChartRadialProps<Y>[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const className = cx(labelProps.className, css(labelProps.css))\n\n if (isFunction(labelProp)) {\n return (props) =>\n labelProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(labelProp)) {\n return cloneElement<any>(labelProp, { className })\n } else if (isObject(labelProp)) {\n const [omittedProps, styleProps] = splitObject<\n LabelListProps,\n CSSObject\n >(labelProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [labelProp, labelProps.className, labelProps.css, css])\n const background = useMemo<UseChartRadialProps<Y>[\"background\"]>(() => {\n if (!backgroundProp) return backgroundProp\n\n const className = cx(backgroundProps.className, css(backgroundProps.css))\n\n if (isFunction(backgroundProp)) {\n return (props) =>\n backgroundProp({\n ...props,\n className: cx(className, props.className),\n })\n } else if (isValidElement(backgroundProp)) {\n return cloneElement<any>(backgroundProp, { className })\n } else if (isObject(backgroundProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"svg\">,\n CSSObject\n >(backgroundProp, shouldForwardProp)\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [backgroundProp, backgroundProps.className, backgroundProps.css, css])\n const { getRadialProps, getRootProps } = useChartRadial({\n background,\n dataKey: dataKey as DataKey<any>,\n label,\n nameKey,\n shape,\n ...rest,\n })\n\n assignRef(nameKeyRef, nameKey)\n\n return (\n <styled.svg asChild {...getRootProps()}>\n <RadialBar {...getRadialProps()}>\n {children}\n\n {labelList ? (\n <ChartLabelList\n dataKey={nameKey as DataKey<any>}\n offset={4}\n position=\"insideStart\"\n {...(isObject(labelList) ? labelList : {})}\n />\n ) : null}\n </RadialBar>\n </styled.svg>\n )\n },\n \"radial\",\n)() as GenericsComponent<{\n <Y extends Dict>(props: ChartRadialProps<Y>): ReactElement\n}>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+FA,MAAM,oBAAoBA,uCAAyB;AA4NnD,MAAM,EACJ,WACA,kBACA,cAAc,wBACd,qBACA,iBAAiB,2BACjB,aACA,cACA,0BACEC,6CACF,eACAC,0CACD;AAID,MAAa,aAAa,cACP,EACf,YAAY,gBACZ,SACA,gBAAgB,OAChB,WAAW,OACX,iBAAiB,OACjB,gBACA,YACA,WACA,WAAW,YACX,YACA,aACA,iBACA,aACA,GAAG,WACqB;CACxB,MAAM,sCACE;EACJ;GACE,WAAW;GACX,UAAU,WAAW,2CAAC,mBAAiB,GAAG;GAC3C;EACD;GACE,WAAW;GACX,UAAU,gBAAgB,2CAAC,mBAAiB,GAAG;GAChD;EACD;GACE,WAAW;GACX,UAAU,iBAAiB,2CAAC,oBAAkB,GAAG;GAClD;EACD,GAAG;EACJ,EACD;EAAC;EAAgB;EAAU;EAAe;EAAe,CAC1D;AAwBD,QACE,2CAAC;EAAiB,iCAvBX;GACI;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;YAIG,2CAACC;GAAkB;GAAY,GAAI;IAAQ;GAC1B;GAGvB,OACD,CACC,SACC,EACC,eACA,iBACA,iBACA,sBACA,qBACA,0BACA,oBACA,mBAC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BAAgB;GAAW,gBAAgB;GAAK;GAAI,CAAC;EAG9D;EACT;EACA;EACA;EACA,GAAG;EACJ,CAAC;AAEF,uBAAU,YAAY,QAAQ;AAE9B,QACE,2CAACG,uBAAO;EAAI;EAAQ,GAAI,cAAc;YACpC,4CAACsB;GAAU,GAAI,gBAAgB;cAC5B,UAEA,YACC,2CAACpB;IACC,SAAS;IACT,QAAQ;IACR,UAAS;IACT,mDAAc,UAAU,GAAG,YAAY,EAAE;KACzC,GACA;IACM;GACD;GAGjB,SACD,EAAE"}
1
+ {"version":3,"file":"polar-chart.cjs","names":["createShouldForwardProp","createSlotComponent","polarChartStyle","usePolarChart","Chart","varAttr","props","useChartPie","rest","styled","Pie","ChartLabelList","useChartSector","Sector","useChartPieLabel","Text","useChartPieLabelLine","Curve","useSystem","useTheme","getCSS","useChartRadar","Radar","useAngleAxis","PolarAngleAxis","useRadiusAxis","PolarRadiusAxis","usePolarGrid","PolarGrid","useChartComponentContext","useChartRadial","RadialBar"],"sources":["../../../../src/components/chart/polar-chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\n\nimport type {\n ActiveDotProps,\n BaseTickContentProps,\n DataKey,\n DotProps,\n LabelListProps,\n LabelProps,\n PieLabelRenderProps,\n PieSectorShapeProps,\n SectorProps,\n} from \"recharts\"\nimport type { PolarChartProps as OriginalPolarChartProps } from \"recharts/types/util/types\"\nimport type {\n CSSObject,\n CSSProps,\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type { Dict, Merge } from \"../../utils\"\nimport type {\n ChartActiveDot,\n ChartDot,\n ChartLabel,\n ChartLabelListProps,\n ChartLabelList as ChartLabelListType,\n ChartProps,\n ChartTickLine,\n} from \"./chart\"\nimport type { PolarChartStyle } from \"./polar-chart.style\"\nimport type {\n UseAngleAxisProps,\n UseChartPieLabelLineProps,\n UseChartPieLabelProps,\n UseChartPieProps,\n UseChartRadarProps,\n UseChartRadialProps,\n UseChartSectorProps,\n UsePolarChartProps,\n UsePolarGridProps,\n UseRadiusAxisProps,\n} from \"./use-polar-chart\"\nimport {\n cloneElement,\n isValidElement,\n useCallback,\n useId,\n useMemo,\n} from \"react\"\nimport {\n Curve,\n Pie,\n PolarAngleAxis,\n PolarGrid,\n PolarRadiusAxis,\n Radar,\n RadialBar,\n Sector,\n Text,\n} from \"recharts\"\nimport {\n createShouldForwardProp,\n createSlotComponent,\n getCSS,\n styled,\n useSystem,\n useTheme,\n varAttr,\n} from \"../../core\"\nimport {\n assignRef,\n cx,\n isFunction,\n isNumber,\n isObject,\n runIfFn,\n splitObject,\n} from \"../../utils\"\nimport { Chart, ChartLabelList, useChartComponentContext } from \"./chart\"\nimport { polarChartStyle } from \"./polar-chart.style\"\nimport {\n useAngleAxis,\n useChartPie,\n useChartPieLabel,\n useChartPieLabelLine,\n useChartRadar,\n useChartRadial,\n useChartSector,\n usePolarChart,\n usePolarGrid,\n useRadiusAxis,\n} from \"./use-polar-chart\"\n\nconst shouldForwardProp = createShouldForwardProp()\n\ninterface ComponentContext extends Pick<\n PolarChartProps,\n | \"angleAxisProps\"\n | \"gridProps\"\n | \"nameKey\"\n | \"pieProps\"\n | \"radarProps\"\n | \"radialProps\"\n | \"radiusAxisProps\"\n | \"sectorProps\"\n> {}\n\nexport interface PolarChartProps<Y extends Dict = Dict>\n extends\n Omit<ChartProps, \"cx\" | \"cy\">,\n UsePolarChartProps<Y>,\n ThemeProps<PolarChartStyle> {\n /**\n * The fill of the active dot.\n */\n activeDotFill?: CSSProps[\"fill\"]\n /**\n * The radius of the active dot.\n */\n activeDotRadius?: CSSProps[\"r\"]\n /**\n * The stroke of the active dot.\n */\n activeDotStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the active dot stroke.\n */\n activeDotStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The stroke of the angle axis line.\n */\n angleAxisLineStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the angle axis line stroke.\n */\n angleAxisLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The color of the angle axis text.\n */\n angleAxisTextColor?: CSSProps[\"color\"]\n /**\n * The fill of the angle axis text.\n */\n angleAxisTextFill?: CSSProps[\"fill\"]\n /**\n * The fill of the dot.\n */\n dotFill?: CSSProps[\"fill\"]\n /**\n * The radius of the dot.\n */\n dotRadius?: CSSProps[\"r\"]\n /**\n * The stroke of the dot.\n */\n dotStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the dot stroke.\n */\n dotStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The stroke of the grid.\n */\n gridStroke?: CSSProps[\"stroke\"]\n /**\n * The opacity of the inactive label line.\n */\n inactiveLabelLineOpacity?: CSSProps[\"opacity\"]\n /**\n * The opacity of the inactive label.\n */\n inactiveLabelOpacity?: CSSProps[\"opacity\"]\n /**\n * The opacity of the inactive radar.\n */\n inactiveRadarOpacity?: CSSProps[\"opacity\"]\n /**\n * The opacity of the inactive sector.\n */\n inactiveSectorOpacity?: CSSProps[\"opacity\"]\n /**\n * The color of the label.\n */\n labelColor?: CSSProps[\"color\"]\n /**\n * The fill of the label.\n */\n labelFill?: CSSProps[\"fill\"]\n /**\n * The stroke of the label line.\n */\n labelLineStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the label line stroke.\n */\n labelLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The key to use for the angle axis.\n */\n nameKey?: keyof Y\n /**\n * The color of the radar.\n */\n radarColor?: CSSProps[\"color\"]\n /**\n * The fill opacity of the radar.\n */\n radarFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The stroke of the radar.\n */\n radarStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the radar stroke.\n */\n radarStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The color of the radial background.\n */\n radialBackgroundColor?: CSSProps[\"color\"]\n /**\n * The fill of the radial background.\n */\n radialBackgroundFill?: CSSProps[\"fill\"]\n /**\n * The stroke of the radial background.\n */\n radialBackgroundStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the radial background stroke.\n */\n radialBackgroundStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The stroke of the radius axis line.\n */\n radiusAxisLineStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the radius axis line stroke.\n */\n radiusAxisLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The color of the radius axis text.\n */\n radiusAxisTextColor?: CSSProps[\"color\"]\n /**\n * The fill of the radius axis text.\n */\n radiusAxisTextFill?: CSSProps[\"fill\"]\n /**\n * The color of the sector.\n */\n sectorColor?: CSSProps[\"color\"]\n /**\n * The fill of the sector.\n */\n sectorFill?: CSSProps[\"fill\"]\n /**\n * The stroke of the sector.\n */\n sectorStroke?: CSSProps[\"stroke\"]\n /**\n * The width of the sector stroke.\n */\n sectorStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * If `true`, angle axis is visible.\n *\n * @default true\n */\n withAngleAxis?: boolean\n /**\n * If `true`, grid is visible.\n *\n * @default true\n */\n withGrid?: boolean\n /**\n * If `true`, radius axis is visible.\n *\n * @default false\n */\n withRadiusAxis?: boolean\n /**\n * Props for the angle axis component.\n */\n angleAxisProps?: UseAngleAxisProps\n /**\n * Props for the polar chart component.\n */\n chartProps?: Omit<OriginalPolarChartProps, \"data\">\n /**\n * Props for the donut component.\n */\n donutProps?: Omit<ChartPieProps, \"data\" | \"dataKey\" | \"nameKey\">\n /**\n * Props for the grid component.\n */\n gridProps?: ChartPolarGridProps\n /**\n * Props for the pie component.\n */\n pieProps?: Omit<ChartPieProps, \"data\" | \"dataKey\" | \"nameKey\">\n /**\n * Props for the radar component.\n */\n radarProps?: Omit<ChartRadarProps, \"data\" | \"dataKey\">\n /**\n * Props for the radial component.\n */\n radialProps?: Omit<ChartRadialProps, \"dataKey\" | \"nameKey\">\n /**\n * Props for the radius axis component.\n */\n radiusAxisProps?: UseRadiusAxisProps\n /**\n * Props for the sector component.\n */\n sectorProps?: ChartSectorProps\n}\n\nconst {\n component,\n ComponentContext,\n PropsContext: PolarChartPropsContext,\n useComponentContext,\n usePropsContext: usePolarChartPropsContext,\n withContext,\n withProvider,\n useSlotComponentProps,\n} = createSlotComponent<PolarChartProps, PolarChartStyle, ComponentContext>(\n \"polar-chart\",\n polarChartStyle,\n)\n\nexport { PolarChartPropsContext, usePolarChartPropsContext }\n\nexport const PolarChart = withProvider(\n <Y extends Dict>({\n components: componentsProp,\n nameKey,\n render,\n withAngleAxis = false,\n withGrid = false,\n withRadiusAxis = false,\n angleAxisProps,\n chartProps,\n donutProps,\n gridProps,\n pieProps = donutProps,\n radarProps,\n radialProps,\n radiusAxisProps,\n sectorProps,\n ...rest\n }: PolarChartProps<Y>) => {\n const { getChartProps, getRootProps } = usePolarChart(rest)\n const components = useMemo(\n () => [\n {\n component: ChartPolarGrid,\n fallback: withGrid ? <ChartPolarGrid /> : null,\n },\n {\n component: ChartAngleAxis,\n fallback: withAngleAxis ? <ChartAngleAxis /> : null,\n },\n {\n component: ChartRadiusAxis,\n fallback: withRadiusAxis ? <ChartRadiusAxis /> : null,\n },\n ...componentsProp,\n ],\n [componentsProp, withGrid, withAngleAxis, withRadiusAxis],\n )\n const componentContext = useMemo(\n () => ({\n nameKey: nameKey as string | undefined,\n angleAxisProps,\n gridProps,\n pieProps,\n radarProps,\n radialProps,\n radiusAxisProps,\n sectorProps,\n }),\n [\n pieProps,\n radarProps,\n sectorProps,\n angleAxisProps,\n radiusAxisProps,\n gridProps,\n nameKey,\n radialProps,\n ],\n )\n\n return (\n <ComponentContext value={componentContext}>\n <Chart\n components={components}\n render={(props) => render(getChartProps({ ...props, ...chartProps }))}\n {...getRootProps()}\n />\n </ComponentContext>\n )\n },\n \"root\",\n)(\n undefined,\n ({\n activeDotFill,\n activeDotRadius,\n activeDotStroke,\n activeDotStrokeWidth,\n angleAxisLineStroke,\n angleAxisLineStrokeWidth,\n angleAxisTextColor,\n angleAxisTextFill,\n dotFill,\n dotRadius,\n dotStroke,\n dotStrokeWidth,\n gridStroke,\n inactiveLabelLineOpacity,\n inactiveLabelOpacity,\n inactiveRadarOpacity,\n inactiveSectorOpacity,\n labelColor,\n labelFill,\n labelLineStroke,\n labelLineStrokeWidth,\n radarColor,\n radarFillOpacity,\n radarStroke,\n radarStrokeWidth,\n radialBackgroundColor,\n radialBackgroundFill,\n radialBackgroundStroke,\n radialBackgroundStrokeWidth,\n radiusAxisLineStroke,\n radiusAxisLineStrokeWidth,\n radiusAxisTextColor,\n radiusAxisTextFill,\n sectorColor,\n sectorFill,\n sectorStroke,\n sectorStrokeWidth,\n ...rest\n }) => ({\n \"--active-dot-fill\": varAttr(activeDotFill, \"colors\"),\n \"--active-dot-r\": activeDotRadius,\n \"--active-dot-stroke\": varAttr(activeDotStroke, \"colors\"),\n \"--active-dot-stroke-width\": activeDotStrokeWidth,\n \"--angle-axis-line-stroke\": varAttr(angleAxisLineStroke, \"colors\"),\n \"--angle-axis-line-stroke-width\": angleAxisLineStrokeWidth,\n \"--angle-axis-text-color\": varAttr(angleAxisTextColor, \"colors\"),\n \"--angle-axis-text-fill\": varAttr(angleAxisTextFill, \"colors\"),\n \"--dot-fill\": varAttr(dotFill, \"colors\"),\n \"--dot-r\": dotRadius,\n \"--dot-stroke\": varAttr(dotStroke, \"colors\"),\n \"--dot-stroke-width\": dotStrokeWidth,\n \"--grid-stroke\": varAttr(gridStroke, \"colors\"),\n \"--inactive-label-line-opacity\": inactiveLabelLineOpacity,\n \"--inactive-label-opacity\": inactiveLabelOpacity,\n \"--inactive-radar-opacity\": inactiveRadarOpacity,\n \"--inactive-sector-opacity\": inactiveSectorOpacity,\n \"--label-color\": varAttr(labelColor, \"colors\"),\n \"--label-fill\": varAttr(labelFill, \"colors\"),\n \"--label-line-stroke\": varAttr(labelLineStroke, \"colors\"),\n \"--label-line-stroke-width\": labelLineStrokeWidth,\n \"--radar-color\": varAttr(radarColor, \"colors\"),\n \"--radar-fill-opacity\": radarFillOpacity,\n \"--radar-stroke\": varAttr(radarStroke, \"colors\"),\n \"--radar-stroke-width\": radarStrokeWidth,\n \"--radial-background-color\": varAttr(radialBackgroundColor, \"colors\"),\n \"--radial-background-fill\": varAttr(radialBackgroundFill, \"colors\"),\n \"--radial-background-stroke\": varAttr(radialBackgroundStroke, \"colors\"),\n \"--radial-background-stroke-width\": radialBackgroundStrokeWidth,\n \"--radius-axis-line-stroke\": varAttr(radiusAxisLineStroke, \"colors\"),\n \"--radius-axis-line-stroke-width\": radiusAxisLineStrokeWidth,\n \"--radius-axis-text-color\": varAttr(radiusAxisTextColor, \"colors\"),\n \"--radius-axis-text-fill\": varAttr(radiusAxisTextFill, \"colors\"),\n \"--sector-color\": varAttr(sectorColor, \"colors\"),\n \"--sector-fill\": varAttr(sectorFill, \"colors\"),\n \"--sector-stroke\": varAttr(sectorStroke, \"colors\"),\n \"--sector-stroke-width\": sectorStrokeWidth,\n ...rest,\n }),\n) as GenericsComponent<{\n <Y extends Dict>(props: PolarChartProps<Y>): ReactElement\n}>\n\nexport type ChartPieLabel =\n | ((props: PieLabelRenderProps) => Partial<ChartPieLabelProps>)\n | boolean\n | Partial<ChartPieLabelProps>\n\nexport type ChartPieLabelLine =\n | ((props: any) => ChartPieLabelLineProps)\n | boolean\n | ChartPieLabelLineProps\n\nexport type ChartPieLabelList = boolean | ChartLabelListProps\n\nexport interface ChartPieProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"svg\">,\n Omit<UseChartPieProps, \"data\" | \"dataKey\" | \"label\" | \"labelLine\" | \"nameKey\">\n> {\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey: Exclude<keyof Y, \"fill\">\n /**\n * The key of the name of the data.\n */\n nameKey: Exclude<keyof Y, \"fill\">\n /**\n * The active index of the sector.\n */\n activeIndex?: number\n /**\n * The data to use for the pie.\n */\n data?: Y[]\n /**\n * The label to use for the pie.\n */\n label?: ChartPieLabel\n /**\n * The label line to use for the pie.\n *\n * @default false\n */\n labelLine?: ChartPieLabelLine\n /**\n * If `true`, the label list is visible.\n *\n * @default false\n */\n labelList?: ChartPieLabelList\n /**\n * Props for the sector component.\n */\n sectorProps?:\n | ((props: PieSectorShapeProps, index: number) => ChartSectorProps)\n | ChartSectorProps\n}\n\nexport const ChartPie = withContext<\"svg\", ChartPieProps>((props) => {\n const { pieProps } = useComponentContext()\n const {\n activeIndex,\n children,\n label: labelProp,\n labelLine: labelLineProp = false,\n labelList = false,\n nameKey,\n sectorProps,\n ...rest\n } = { ...pieProps, ...props }\n const shape = useCallback(\n (props: any, index: number) => {\n if (isNumber(activeIndex)) props.isActive = index === activeIndex\n\n return <ChartSector {...props} {...runIfFn(sectorProps, props, index)} />\n },\n [activeIndex, sectorProps],\n )\n const label = useMemo<UseChartPieProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const Component = (props: any) => (\n <ChartPieLabel\n {...props}\n {...(labelProp !== true ? runIfFn(labelProp, props) : {})}\n />\n )\n\n return Component\n }, [labelProp])\n const labelLine = useMemo<UseChartPieProps[\"labelLine\"]>(() => {\n if (!labelLineProp) return labelLineProp\n\n const Component = ({ key: _, ...rest }: any) => (\n <ChartPieLabelLine\n {...rest}\n {...(labelLineProp !== true ? runIfFn(labelLineProp, rest) : {})}\n />\n )\n\n return Component\n }, [labelLineProp])\n const { getPieProps, getRootProps } = useChartPie({\n label,\n labelLine,\n nameKey,\n shape,\n ...rest,\n })\n\n return (\n <styled.svg asChild {...getRootProps()}>\n <Pie {...getPieProps()}>\n {children}\n\n {labelList ? (\n <ChartLabelList\n dataKey={nameKey}\n {...(isObject(labelList) ? labelList : {})}\n />\n ) : null}\n </Pie>\n </styled.svg>\n )\n}, \"pie\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartPieProps<Y>): ReactElement\n}>\n\ninterface ChartSectorProps extends Merge<\n HTMLStyledProps<\"path\">,\n UseChartSectorProps\n> {}\n\nconst ChartSector = withContext<\"path\", ChartSectorProps>((props) => {\n const { sectorProps } = useComponentContext()\n const { getRootProps, getSectorProps } = useChartSector({\n ...sectorProps,\n ...props,\n })\n\n return (\n <styled.path asChild {...getRootProps()}>\n <Sector {...getSectorProps()} />\n </styled.path>\n )\n}, \"sector\")()\n\ninterface ChartPieLabelProps extends Merge<\n HTMLStyledProps<\"text\">,\n UseChartPieLabelProps\n> {}\n\nconst ChartPieLabel = withContext<\"text\", ChartPieLabelProps>((props) => {\n const { getRootProps, getTextProps } = useChartPieLabel(props)\n\n return (\n <styled.text asChild {...getRootProps()}>\n <Text {...getTextProps()} />\n </styled.text>\n )\n}, \"label\")()\n\ninterface ChartPieLabelLineProps extends Merge<\n HTMLStyledProps<\"path\">,\n UseChartPieLabelLineProps\n> {}\n\nconst ChartPieLabelLine = withContext<\"path\", ChartPieLabelLineProps>(\n (props) => {\n const { getCurveProps, getRootProps } = useChartPieLabelLine(props)\n\n return (\n <styled.path asChild {...getRootProps()}>\n <Curve {...getCurveProps()} />\n </styled.path>\n )\n },\n \"labelLine\",\n)()\n\nexport interface ChartDonutProps<\n Y extends Dict = Dict,\n> extends ChartPieProps<Y> {}\n\nexport const ChartDonut = component<\"svg\", ChartDonutProps>(ChartPie, \"donut\")(\n undefined,\n (props) => {\n const { pieProps } = useComponentContext()\n\n return { ...pieProps, ...props }\n },\n ({ label, ...rest }) => ({ innerRadius: !label ? \"70%\" : \"50%\", ...rest }),\n) as GenericsComponent<{\n <Y extends Dict>(props: ChartDonutProps<Y>): ReactElement\n}>\n\nexport interface ChartRadarProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"path\">,\n Omit<UseChartRadarProps, \"activeDot\" | \"dataKey\" | \"dot\" | \"label\" | \"stroke\">\n> {\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey: keyof Y\n /**\n * The active dot to use for the line.\n *\n * @default true\n */\n activeDot?: ChartActiveDot\n /**\n * The dot to use for the line.\n *\n * @default false\n */\n dot?: ChartDot\n /**\n * The label to use for the line.\n *\n * @default false\n */\n label?: ChartLabelListType\n}\n\nexport const ChartRadar = withContext<\"path\", ChartRadarProps>((props) => {\n const { radarProps } = useComponentContext()\n const {\n activeDot: activeDotProp = true,\n children,\n dataKey,\n dot: dotProp = false,\n label: labelProp = false,\n stroke: strokeProp,\n ...rest\n } = { ...radarProps, ...props }\n const id = useId()\n const system = useSystem()\n const { theme } = useTheme()\n const color = strokeProp ?? rest.fill ?? rest.color\n const stroke = JSON.stringify(color)\n const dotProps = useSlotComponentProps({}, \"dot\")\n const activeDotProps = useSlotComponentProps({}, \"activeDot\")\n const labelProps = useSlotComponentProps({}, \"labelList\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const dot = useMemo<UseChartRadarProps[\"dot\"]>(() => {\n if (!dotProp) return dotProp\n\n const className = cx(\n dotProps.className,\n css(dotProps.css),\n css({ fill: color, stroke: color }),\n )\n\n if (isFunction(dotProp)) {\n return (props) =>\n dotProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(dotProp)) {\n return cloneElement<any>(dotProp, { className })\n } else if (isObject(dotProp)) {\n const [omittedProps, styleProps] = splitObject<DotProps, CSSObject>(\n dotProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [dotProp, dotProps.className, dotProps.css, css, color])\n const activeDot = useMemo<UseChartRadarProps[\"activeDot\"]>(() => {\n if (!activeDotProp) return activeDotProp\n\n const className = cx(\n activeDotProps.className,\n css(activeDotProps.css),\n css({ fill: color, stroke: color }),\n )\n\n if (isFunction(activeDotProp)) {\n return (props) =>\n activeDotProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(activeDotProp)) {\n return cloneElement<any>(activeDotProp, { className })\n } else if (isObject(activeDotProp)) {\n const [omittedProps, styleProps] = splitObject<ActiveDotProps, CSSObject>(\n activeDotProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [activeDotProp, activeDotProps.className, activeDotProps.css, css, color])\n const label = useMemo<UseChartRadarProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const className = cx(labelProps.className, css(labelProps.css))\n\n if (isFunction(labelProp)) {\n return (props) =>\n labelProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(labelProp)) {\n return cloneElement<any>(labelProp, { className })\n } else if (isObject(labelProp)) {\n const [omittedProps, styleProps] = splitObject<LabelListProps, CSSObject>(\n labelProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [labelProp, labelProps.className, labelProps.css, css])\n const { getRadarProps, getRootProps } = useChartRadar({\n activeDot,\n dataKey,\n dot,\n fill: color ? `url(#${id})` : \"\",\n label,\n stroke,\n ...rest,\n })\n\n return (\n <>\n <styled.path asChild {...getRootProps()}>\n <Radar {...getRadarProps()}>{children}</Radar>\n </styled.path>\n\n <linearGradient id={id} x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <styled.stop\n stopColor={color}\n stopOpacity={rest.fillOpacity ?? \"{radar-fill-opacity}\"}\n />\n </linearGradient>\n </>\n )\n}, \"radar\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartRadarProps<Y>): ReactElement\n}>\n\nexport type ChartPolarAxisTick =\n | ((props: BaseTickContentProps) => ReactNode)\n | boolean\n | HTMLStyledProps<\"text\">\n | ReactElement\n\nexport type ChartAxisLine = boolean | HTMLStyledProps<\"line\">\n\nexport interface ChartAngleAxisProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"text\">,\n Omit<\n UseAngleAxisProps,\n \"axisLine\" | \"dataKey\" | \"label\" | \"tick\" | \"tickLine\"\n >\n> {\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n axisLine?: ChartAxisLine\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey?: keyof Y\n /**\n * The label to use for the axis.\n *\n * @default false\n */\n label?: ChartLabel\n /**\n * The tick to use for the axis.\n *\n * @default true\n */\n tick?: ChartPolarAxisTick\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n tickLine?: ChartTickLine\n}\n\nexport const ChartAngleAxis = withContext<\"text\", ChartAngleAxisProps>(\n (props) => {\n const { nameKey, angleAxisProps } = useComponentContext()\n const {\n axisLine: axisLineProp = false,\n children,\n label: labelProp = false,\n tick: tickProp = true,\n tickLine: tickLineProp = false,\n ...rest\n } = { ...angleAxisProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const tickProps = useSlotComponentProps({}, \"angleAxisTick\")\n const labelProps = useSlotComponentProps({}, \"angleAxisLabel\")\n const tickLineProps = useSlotComponentProps({}, \"angleAxisTickLine\")\n const axisLineProps = useSlotComponentProps({}, \"angleAxisLine\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const tick = useMemo<UseAngleAxisProps[\"tick\"]>(() => {\n if (!tickProp) return tickProp\n\n const className = cx(tickProps.className, css(tickProps.css))\n\n if (isFunction(tickProp)) {\n return (props) =>\n tickProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(tickProp)) {\n return cloneElement<any>(tickProp, { className })\n } else if (isObject(tickProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"text\">,\n CSSObject\n >(tickProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [tickProp, tickProps.className, tickProps.css, css])\n const tickLine = useMemo<UseAngleAxisProps[\"tickLine\"]>(() => {\n if (!tickLineProp) return tickLineProp\n\n const className = cx(tickLineProps.className, css(tickLineProps.css))\n\n if (isObject(tickLineProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"line\">,\n CSSObject\n >(tickLineProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [tickLineProp, tickLineProps.className, tickLineProps.css, css])\n const axisLine = useMemo<UseAngleAxisProps[\"axisLine\"]>(() => {\n if (!axisLineProp) return axisLineProp\n\n const className = cx(axisLineProps.className, css(axisLineProps.css))\n\n if (isObject(axisLineProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"line\">,\n CSSObject\n >(axisLineProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [axisLineProp, axisLineProps.className, axisLineProps.css, css])\n const label = useMemo<UseAngleAxisProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const className = cx(labelProps.className, css(labelProps.css))\n\n if (isFunction(labelProp)) {\n return (props) =>\n labelProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(labelProp)) {\n return cloneElement<any>(labelProp, { className })\n } else if (isObject(labelProp)) {\n const [omittedProps, styleProps] = splitObject<LabelProps, CSSObject>(\n labelProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className, children: labelProp }\n }\n }, [labelProp, labelProps.className, labelProps.css, css])\n const { getAngleAxisProps, getRootProps } = useAngleAxis({\n axisLine,\n dataKey: nameKey,\n label,\n tick,\n tickLine,\n ...rest,\n })\n\n return (\n <styled.text asChild {...getRootProps()}>\n <PolarAngleAxis {...getAngleAxisProps()}>{children}</PolarAngleAxis>\n </styled.text>\n )\n },\n \"angleAxis\",\n)() as GenericsComponent<{\n <Y extends Dict>(props: ChartAngleAxisProps<Y>): ReactElement\n}>\n\nexport interface ChartRadiusAxisProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"text\">,\n Omit<\n UseRadiusAxisProps,\n \"axisLine\" | \"dataKey\" | \"label\" | \"tick\" | \"tickLine\"\n >\n> {\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n axisLine?: ChartAxisLine\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey?: keyof Y\n /**\n * The label to use for the axis.\n *\n * @default false\n */\n label?: ChartLabel\n /**\n * The tick to use for the axis.\n *\n * @default true\n */\n tick?: ChartPolarAxisTick\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n tickLine?: ChartTickLine\n}\n\nexport const ChartRadiusAxis = withContext<\"text\", ChartRadiusAxisProps>(\n (props) => {\n const { radiusAxisProps } = useComponentContext()\n const {\n axisLine: axisLineProp = false,\n children,\n label: labelProp = false,\n tick: tickProp = true,\n tickLine: tickLineProp = false,\n ...rest\n } = { ...radiusAxisProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const tickProps = useSlotComponentProps({}, \"radiusAxisTick\")\n const labelProps = useSlotComponentProps({}, \"radiusAxisLabel\")\n const tickLineProps = useSlotComponentProps({}, \"radiusAxisTickLine\")\n const axisLineProps = useSlotComponentProps({}, \"radiusAxisLine\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const tick = useMemo<UseRadiusAxisProps[\"tick\"]>(() => {\n if (!tickProp) return tickProp\n\n const className = cx(tickProps.className, css(tickProps.css))\n\n if (isFunction(tickProp)) {\n return (props) =>\n tickProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(tickProp)) {\n return cloneElement<any>(tickProp, { className })\n } else if (isObject(tickProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"text\">,\n CSSObject\n >(tickProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [tickProp, tickProps.className, tickProps.css, css])\n const tickLine = useMemo<UseRadiusAxisProps[\"tickLine\"]>(() => {\n if (!tickLineProp) return tickLineProp\n\n const className = cx(tickLineProps.className, css(tickLineProps.css))\n\n if (isObject(tickLineProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"line\">,\n CSSObject\n >(tickLineProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [tickLineProp, tickLineProps.className, tickLineProps.css, css])\n const axisLine = useMemo<UseRadiusAxisProps[\"axisLine\"]>(() => {\n if (!axisLineProp) return axisLineProp\n\n const className = cx(axisLineProps.className, css(axisLineProps.css))\n\n if (isObject(axisLineProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"line\">,\n CSSObject\n >(axisLineProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [axisLineProp, axisLineProps.className, axisLineProps.css, css])\n const label = useMemo<UseRadiusAxisProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const className = cx(labelProps.className, css(labelProps.css))\n\n if (isFunction(labelProp)) {\n return (props) =>\n labelProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(labelProp)) {\n return cloneElement<any>(labelProp, { className })\n } else if (isObject(labelProp)) {\n const [omittedProps, styleProps] = splitObject<LabelProps, CSSObject>(\n labelProp,\n shouldForwardProp,\n )\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className, children: labelProp }\n }\n }, [labelProp, labelProps.className, labelProps.css, css])\n const { getRadiusAxisProps, getRootProps } = useRadiusAxis({\n axisLine,\n label,\n tick,\n tickLine,\n ...rest,\n })\n\n return (\n <styled.text asChild {...getRootProps()}>\n <PolarRadiusAxis {...getRadiusAxisProps()}>{children}</PolarRadiusAxis>\n </styled.text>\n )\n },\n \"radiusAxis\",\n)() as GenericsComponent<{\n <Y extends Dict>(props: ChartRadiusAxisProps<Y>): ReactElement\n}>\n\nexport interface ChartPolarGridProps extends Merge<\n HTMLStyledProps<\"line\">,\n UsePolarGridProps\n> {}\n\nexport const ChartPolarGrid = withContext<\"line\", ChartPolarGridProps>(\n (props) => {\n const { gridProps } = useComponentContext()\n const { getPolarGridProps, getRootProps } = usePolarGrid({\n ...gridProps,\n ...props,\n })\n\n return (\n <styled.line asChild {...getRootProps()}>\n <PolarGrid {...getPolarGridProps()} />\n </styled.line>\n )\n },\n \"grid\",\n)()\n\nexport type ChartRadialBackground =\n | ((props: SectorProps) => null | ReactElement | undefined)\n | boolean\n | HTMLStyledProps<\"svg\">\n | ReactElement\n\nexport interface ChartRadialProps<Y extends Dict = Dict> extends Merge<\n Omit<HTMLStyledProps<\"svg\">, \"background\">,\n Omit<UseChartRadialProps<Y>, \"background\" | \"dataKey\" | \"label\">\n> {\n /**\n * The key of a group of data which should be unique in an chart.\n */\n dataKey: keyof Y\n /**\n * The background to use for the radial chart.\n */\n background?: ChartRadialBackground\n /**\n * The label to use for the radial.\n *\n * @default false\n */\n label?: ChartLabelListType\n /**\n * If `true`, the label list is visible.\n *\n * @default false\n */\n labelList?: ChartPieLabelList\n /**\n * Props for the sector component.\n */\n sectorProps?:\n | ((props: PieSectorShapeProps) => ChartSectorProps)\n | ChartSectorProps\n}\n\nexport const ChartRadial = withContext<\"svg\", ChartRadialProps>(\n <Y extends Dict>(props: ChartRadialProps<Y>) => {\n const { radialProps } = useComponentContext()\n const {\n background: backgroundProp = true,\n children,\n dataKey,\n label: labelProp = false,\n labelList = false,\n nameKey,\n sectorProps,\n ...rest\n } = { ...radialProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const { nameKeyRef } = useChartComponentContext()\n const labelProps = useSlotComponentProps({}, \"labelList\")\n const backgroundProps = useSlotComponentProps({}, \"radialBackground\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const shape = useCallback(\n (props: any) => {\n const color = rest.fill ?? rest.color\n\n return (\n <ChartSector\n color={color}\n {...props}\n {...runIfFn(sectorProps, props)}\n />\n )\n },\n [rest.fill, rest.color, sectorProps],\n )\n const label = useMemo<UseChartRadialProps<Y>[\"label\"]>(() => {\n if (!labelProp) return labelProp\n\n const className = cx(labelProps.className, css(labelProps.css))\n\n if (isFunction(labelProp)) {\n return (props) =>\n labelProp({ ...props, className: cx(className, props.className) })\n } else if (isValidElement(labelProp)) {\n return cloneElement<any>(labelProp, { className })\n } else if (isObject(labelProp)) {\n const [omittedProps, styleProps] = splitObject<\n LabelListProps,\n CSSObject\n >(labelProp, shouldForwardProp)\n\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [labelProp, labelProps.className, labelProps.css, css])\n const background = useMemo<UseChartRadialProps<Y>[\"background\"]>(() => {\n if (!backgroundProp) return backgroundProp\n\n const className = cx(backgroundProps.className, css(backgroundProps.css))\n\n if (isFunction(backgroundProp)) {\n return (props) =>\n backgroundProp({\n ...props,\n className: cx(className, props.className),\n })\n } else if (isValidElement(backgroundProp)) {\n return cloneElement<any>(backgroundProp, { className })\n } else if (isObject(backgroundProp)) {\n const [omittedProps, styleProps] = splitObject<\n HTMLProps<\"svg\">,\n CSSObject\n >(backgroundProp, shouldForwardProp)\n return {\n ...omittedProps,\n className: cx(className, omittedProps.className, css(styleProps)),\n }\n } else {\n return { className }\n }\n }, [backgroundProp, backgroundProps.className, backgroundProps.css, css])\n const { getRadialProps, getRootProps } = useChartRadial({\n background,\n dataKey: dataKey as DataKey<any>,\n label,\n nameKey,\n shape,\n ...rest,\n })\n\n assignRef(nameKeyRef, nameKey)\n\n return (\n <styled.svg asChild {...getRootProps()}>\n <RadialBar {...getRadialProps()}>\n {children}\n\n {labelList ? (\n <ChartLabelList\n dataKey={nameKey as DataKey<any>}\n offset={4}\n position=\"insideStart\"\n {...(isObject(labelList) ? labelList : {})}\n />\n ) : null}\n </RadialBar>\n </styled.svg>\n )\n },\n \"radial\",\n)() as GenericsComponent<{\n <Y extends Dict>(props: ChartRadialProps<Y>): ReactElement\n}>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkGA,MAAM,oBAAoBA,uCAAyB;AAmOnD,MAAM,EACJ,WACA,kBACA,cAAc,wBACd,qBACA,iBAAiB,2BACjB,aACA,cACA,0BACEC,6CACF,eACAC,0CACD;AAID,MAAa,aAAa,cACP,EACf,YAAY,gBACZ,SACA,QACA,gBAAg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W,CAAC;2DAChC,UAAU,EAAE;GAC9B,MAAM,CAAC,cAAc,iEAGnB,WAAW,kBAAkB;AAE/B,UAAO;IACL,GAAG;IACH,qDAAc,WAAW,aAAa,WAAW,IAAI,WAAW,CAAC;IAClE;QAED,QAAO,EAAE,WAAW;IAErB;EAAC;EAAW,WAAW;EAAW,WAAW;EAAK;EAAI,CAAC;CA2B1D,MAAM,EAAE,gBAAgB,iBAAiBwB,uCAAe;EACtD,qCA3BqE;AACrE,OAAI,CAAC,eAAgB,QAAO;GAE5B,MAAM,sDAAe,gBAAgB,WAAW,IAAI,gBAAgB,IAAI,CAAC;AAEzE,yDAAe,eAAe,CAC5B,SAAQ,YACN,eAAe;IACb,GAAGxB;IACH,qDAAc,WAAWA,QAAM,UAAU;IAC1C,CAAC;sCACoB,eAAe,CACvC,gCAAyB,gBAAgB,EAAE,WAAW,CAAC;4DACrC,eAAe,EAAE;IACnC,MAAM,CAAC,cAAc,iEAGnB,gBAAgB,kBAAkB;AACpC,WAAO;KACL,GAAG;KACH,qDAAc,WAAW,aAAa,WAAW,IAAI,WAAW,CAAC;KAClE;SAED,QAAO,EAAE,WAAW;KAErB;GAAC;GAAgB,gBAAgB;GAAW,gBAAgB;GAAK;GAAI,CAAC;EAG9D;EACT;EACA;EACA;EACA,GAAG;EACJ,CAAC;AAEF,uBAAU,YAAY,QAAQ;AAE9B,QACE,2CAACG,uBAAO;EAAI;EAAQ,GAAI,cAAc;YACpC,4CAACsB;GAAU,GAAI,gBAAgB;cAC5B,UAEA,YACC,2CAACpB;IACC,SAAS;IACT,QAAQ;IACR,UAAS;IACT,mDAAc,UAAU,GAAG,YAAY,EAAE;KACzC,GACA;IACM;GACD;GAGjB,SACD,EAAE"}
@@ -5,7 +5,6 @@ const require_create_component = require('../../core/components/create-component
5
5
  require('../../core/index.cjs');
6
6
  const require_radar_chart_style = require('./radar-chart.style.cjs');
7
7
  const require_polar_chart = require('./polar-chart.cjs');
8
- const require_use_radar_chart = require('./use-radar-chart.cjs');
9
8
  let react = require("react");
10
9
  let react_jsx_runtime = require("react/jsx-runtime");
11
10
  let recharts = require("recharts");
@@ -17,21 +16,17 @@ const { PropsContext: RadarChartPropsContext, usePropsContext: useRadarChartProp
17
16
  *
18
17
  * @see https://yamada-ui.com/docs/components/radar-chart
19
18
  */
20
- const RadarChart = withContext(({ children, nameKey, series = [], withAngleAxis = !!nameKey, withGrid = true, chartProps, ...rest }) => {
21
- const { getChartProps, getRootProps } = require_use_radar_chart.useRadarChart(rest);
19
+ const RadarChart = withContext(({ children, nameKey, series = [], withAngleAxis = !!nameKey, withGrid = true, ...rest }) => {
22
20
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_polar_chart.PolarChart, {
23
21
  components: (0, react.useMemo)(() => [{
24
22
  component: require_polar_chart.ChartRadar,
25
23
  fallback: series.map((props, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_polar_chart.ChartRadar, { ...props }, index))
26
24
  }], [series]),
27
25
  nameKey,
28
- render: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.RadarChart, { ...getChartProps({
29
- ...props,
30
- ...chartProps
31
- }) }),
26
+ render: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.RadarChart, { ...props }),
32
27
  withAngleAxis,
33
28
  withGrid,
34
- ...getRootProps(),
29
+ ...rest,
35
30
  children
36
31
  });
37
32
  })();
@@ -1 +1 @@
1
- {"version":3,"file":"radar-chart.cjs","names":["createComponent","radarChartStyle","useRadarChart","PolarChart","ChartRadar","OriginalRadarChart"],"sources":["../../../../src/components/chart/radar-chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement } from \"react\"\nimport type { PolarChartProps as OriginalPolarChartProps } from \"recharts/types/util/types\"\nimport type { GenericsComponent, ThemeProps } from \"../../core\"\nimport type { Dict } from \"../../utils\"\nimport type { ChartRadarProps, PolarChartProps } from \"./polar-chart\"\nimport type { RadarChartStyle } from \"./radar-chart.style\"\nimport type { UseRadarChartProps } from \"./use-radar-chart\"\nimport { useMemo } from \"react\"\nimport { RadarChart as OriginalRadarChart } from \"recharts\"\nimport { createComponent } from \"../../core\"\nimport { ChartRadar, PolarChart } from \"./polar-chart\"\nimport { radarChartStyle } from \"./radar-chart.style\"\nimport { useRadarChart } from \"./use-radar-chart\"\n\nexport interface RadarChartProps<Y extends Dict = Dict>\n extends\n Omit<\n PolarChartProps<Y>,\n | \"components\"\n | \"donutProps\"\n | \"pieProps\"\n | \"radialProps\"\n | \"render\"\n | \"sectorProps\"\n | \"series\"\n >,\n UseRadarChartProps<Y>,\n ThemeProps<RadarChartStyle> {\n /***\n * If provided, generate lines based on series.\n */\n series?: ChartRadarProps<Y>[]\n /**\n * Props for the polar chart component.\n */\n chartProps?: Omit<OriginalPolarChartProps, \"data\">\n}\n\nconst {\n PropsContext: RadarChartPropsContext,\n usePropsContext: useRadarChartPropsContext,\n withContext,\n} = createComponent<RadarChartProps, RadarChartStyle>(\n \"radar-chart\",\n radarChartStyle,\n)\n\nexport { RadarChartPropsContext, useRadarChartPropsContext }\n\n/**\n * `RadarChart` is a component for drawing radar charts to compare multiple sets of data.\n *\n * @see https://yamada-ui.com/docs/components/radar-chart\n */\nexport const RadarChart = withContext<\"div\", RadarChartProps>(\n <Y extends Dict>({\n children,\n nameKey,\n series = [],\n withAngleAxis = !!nameKey,\n withGrid = true,\n chartProps,\n ...rest\n }: RadarChartProps<Y>) => {\n const { getChartProps, getRootProps } = useRadarChart(rest)\n const components = useMemo(\n () => [\n {\n component: ChartRadar,\n fallback: series.map((props, index) => (\n <ChartRadar key={index} {...props} />\n )),\n },\n ],\n [series],\n )\n\n return (\n <PolarChart\n components={components}\n nameKey={nameKey}\n render={(props) => (\n <OriginalRadarChart {...getChartProps({ ...props, ...chartProps })} />\n )}\n withAngleAxis={withAngleAxis}\n withGrid={withGrid}\n {...getRootProps()}\n >\n {children}\n </PolarChart>\n )\n },\n)() as GenericsComponent<{\n <Y extends Dict>(props: RadarChartProps<Y>): ReactElement\n}>\n"],"mappings":";;;;;;;;;;;;;AAwCA,MAAM,EACJ,cAAc,wBACd,iBAAiB,2BACjB,gBACEA,yCACF,eACAC,0CACD;;;;;;AASD,MAAa,aAAa,aACP,EACf,UACA,SACA,SAAS,EAAE,EACX,gBAAgB,CAAC,CAAC,SAClB,WAAW,MACX,YACA,GAAG,WACqB;CACxB,MAAM,EAAE,eAAe,iBAAiBC,sCAAc,KAAK;AAa3D,QACE,2CAACC;EACC,qCAbI,CACJ;GACE,WAAWC;GACX,UAAU,OAAO,KAAK,OAAO,UAC3B,2CAACA,kCAAuB,GAAI,SAAX,MAAoB,CACrC;GACH,CACF,EACD,CAAC,OAAO,CACT;EAKY;EACT,SAAS,UACP,2CAACC,uBAAmB,GAAI,cAAc;GAAE,GAAG;GAAO,GAAG;GAAY,CAAC,GAAI;EAEzD;EACL;EACV,GAAI,cAAc;EAEjB;GACU;EAGlB,EAAE"}
1
+ {"version":3,"file":"radar-chart.cjs","names":["createComponent","radarChartStyle","PolarChart","ChartRadar","OriginalRadarChart"],"sources":["../../../../src/components/chart/radar-chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement } from \"react\"\nimport type { PolarChartProps as OriginalPolarChartProps } from \"recharts/types/util/types\"\nimport type { GenericsComponent, ThemeProps } from \"../../core\"\nimport type { Dict } from \"../../utils\"\nimport type { ChartRadarProps, PolarChartProps } from \"./polar-chart\"\nimport type { RadarChartStyle } from \"./radar-chart.style\"\nimport { useMemo } from \"react\"\nimport { RadarChart as OriginalRadarChart } from \"recharts\"\nimport { createComponent } from \"../../core\"\nimport { ChartRadar, PolarChart } from \"./polar-chart\"\nimport { radarChartStyle } from \"./radar-chart.style\"\n\nexport interface RadarChartProps<Y extends Dict = Dict>\n extends\n Omit<PolarChartProps<Y>, \"components\" | \"render\">,\n ThemeProps<RadarChartStyle> {\n /***\n * If provided, generate lines based on series.\n */\n series?: ChartRadarProps<Y>[]\n /**\n * Props for the polar chart component.\n */\n chartProps?: Omit<OriginalPolarChartProps, \"data\">\n}\n\nconst {\n PropsContext: RadarChartPropsContext,\n usePropsContext: useRadarChartPropsContext,\n withContext,\n} = createComponent<RadarChartProps, RadarChartStyle>(\n \"radar-chart\",\n radarChartStyle,\n)\n\nexport { RadarChartPropsContext, useRadarChartPropsContext }\n\n/**\n * `RadarChart` is a component for drawing radar charts to compare multiple sets of data.\n *\n * @see https://yamada-ui.com/docs/components/radar-chart\n */\nexport const RadarChart = withContext<\"div\", RadarChartProps>(\n <Y extends Dict>({\n children,\n nameKey,\n series = [],\n withAngleAxis = !!nameKey,\n withGrid = true,\n ...rest\n }: RadarChartProps<Y>) => {\n const components = useMemo(\n () => [\n {\n component: ChartRadar,\n fallback: series.map((props, index) => (\n <ChartRadar key={index} {...props} />\n )),\n },\n ],\n [series],\n )\n\n return (\n <PolarChart\n components={components}\n nameKey={nameKey}\n render={(props) => <OriginalRadarChart {...props} />}\n withAngleAxis={withAngleAxis}\n withGrid={withGrid}\n {...rest}\n >\n {children}\n </PolarChart>\n )\n },\n)() as GenericsComponent<{\n <Y extends Dict>(props: RadarChartProps<Y>): ReactElement\n}>\n"],"mappings":";;;;;;;;;;;;AA4BA,MAAM,EACJ,cAAc,wBACd,iBAAiB,2BACjB,gBACEA,yCACF,eACAC,0CACD;;;;;;AASD,MAAa,aAAa,aACP,EACf,UACA,SACA,SAAS,EAAE,EACX,gBAAgB,CAAC,CAAC,SAClB,WAAW,MACX,GAAG,WACqB;AAaxB,QACE,2CAACC;EACC,qCAbI,CACJ;GACE,WAAWC;GACX,UAAU,OAAO,KAAK,OAAO,UAC3B,2CAACA,kCAAuB,GAAI,SAAX,MAAoB,CACrC;GACH,CACF,EACD,CAAC,OAAO,CACT;EAKY;EACT,SAAS,UAAU,2CAACC,uBAAmB,GAAI,QAAS;EACrC;EACL;EACV,GAAI;EAEH;GACU;EAGlB,EAAE"}
@@ -5,7 +5,6 @@ const require_create_component = require('../../core/components/create-component
5
5
  require('../../core/index.cjs');
6
6
  const require_radial_chart_style = require('./radial-chart.style.cjs');
7
7
  const require_polar_chart = require('./polar-chart.cjs');
8
- const require_use_radial_chart = require('./use-radial-chart.cjs');
9
8
  let react = require("react");
10
9
  let react_jsx_runtime = require("react/jsx-runtime");
11
10
  let recharts = require("recharts");
@@ -17,14 +16,7 @@ const { PropsContext: RadialChartPropsContext, usePropsContext: useRadialChartPr
17
16
  *
18
17
  * @see https://yamada-ui.com/docs/components/radial-chart
19
18
  */
20
- const RadialChart = withContext(({ children, series = [], chartProps, gridProps, tooltipProps, ...rest }) => {
21
- const { getChartProps, getRootProps } = require_use_radial_chart.useRadialChart({
22
- endAngle: -270,
23
- innerRadius: "20%",
24
- outerRadius: "90%",
25
- startAngle: 90,
26
- ...rest
27
- });
19
+ const RadialChart = withContext(({ children, endAngle = -270, innerRadius = "20%", outerRadius = "90%", series = [], startAngle = 90, gridProps, tooltipProps, ...rest }) => {
28
20
  const components = (0, react.useMemo)(() => [{
29
21
  component: require_polar_chart.ChartRadial,
30
22
  fallback: series.map((props, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_polar_chart.ChartRadial, { ...props }, index))
@@ -32,10 +24,11 @@ const RadialChart = withContext(({ children, series = [], chartProps, gridProps,
32
24
  const labelFormatter = (0, react.useCallback)(() => null, []);
33
25
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_polar_chart.PolarChart, {
34
26
  components,
35
- render: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.RadialBarChart, { ...getChartProps({
36
- ...props,
37
- ...chartProps
38
- }) }),
27
+ endAngle,
28
+ innerRadius,
29
+ outerRadius,
30
+ render: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.RadialBarChart, { ...props }),
31
+ startAngle,
39
32
  gridProps: {
40
33
  type: "circle",
41
34
  ...gridProps
@@ -44,7 +37,7 @@ const RadialChart = withContext(({ children, series = [], chartProps, gridProps,
44
37
  labelFormatter,
45
38
  ...tooltipProps
46
39
  },
47
- ...getRootProps(),
40
+ ...rest,
48
41
  children
49
42
  });
50
43
  })();
@@ -1 +1 @@
1
- {"version":3,"file":"radial-chart.cjs","names":["createComponent","radialChartStyle","useRadialChart","ChartRadial","PolarChart","RadialBarChart"],"sources":["../../../../src/components/chart/radial-chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement } from \"react\"\nimport type { PolarChartProps as OriginalPolarChartProps } from \"recharts/types/util/types\"\nimport type { GenericsComponent, ThemeProps } from \"../../core\"\nimport type { Dict } from \"../../utils\"\nimport type { ChartTooltipProps } from \"./chart\"\nimport type { ChartRadialProps, PolarChartProps } from \"./polar-chart\"\nimport type { RadialChartStyle } from \"./radial-chart.style\"\nimport type { UseRadialChartProps } from \"./use-radial-chart\"\nimport { useCallback, useMemo } from \"react\"\nimport { RadialBarChart } from \"recharts\"\nimport { createComponent } from \"../../core\"\nimport { ChartRadial, PolarChart } from \"./polar-chart\"\nimport { radialChartStyle } from \"./radial-chart.style\"\nimport { useRadialChart } from \"./use-radial-chart\"\n\nexport interface RadialChartProps<Y extends Dict = Dict>\n extends\n Omit<\n PolarChartProps<Y>,\n | \"angleAxisProps\"\n | \"components\"\n | \"donutProps\"\n | \"nameKey\"\n | \"pieProps\"\n | \"radarProps\"\n | \"radiusAxisProps\"\n | \"render\"\n | \"series\"\n | \"withAngleAxis\"\n | \"withRadiusAxis\"\n >,\n UseRadialChartProps<Y>,\n ThemeProps<RadialChartStyle> {\n /***\n * If provided, generate lines based on series.\n */\n series?: ChartRadialProps<Y>[]\n /**\n * Props for the polar chart component.\n */\n chartProps?: Omit<OriginalPolarChartProps, \"data\">\n}\n\nconst {\n PropsContext: RadialChartPropsContext,\n usePropsContext: useRadialChartPropsContext,\n withContext,\n} = createComponent<RadialChartProps, RadialChartStyle>(\n \"radial-chart\",\n radialChartStyle,\n)\n\nexport { RadialChartPropsContext, useRadialChartPropsContext }\n\n/**\n * `RadialChart` is a component for drawing radial charts to compare multiple sets of data.\n *\n * @see https://yamada-ui.com/docs/components/radial-chart\n */\nexport const RadialChart = withContext<\"div\", RadialChartProps>(\n <Y extends Dict>({\n children,\n series = [],\n chartProps,\n gridProps,\n tooltipProps,\n ...rest\n }: RadialChartProps<Y>) => {\n const { getChartProps, getRootProps } = useRadialChart({\n endAngle: -270,\n innerRadius: \"20%\",\n outerRadius: \"90%\",\n startAngle: 90,\n ...rest,\n })\n const components = useMemo(\n () => [\n {\n component: ChartRadial,\n fallback: series.map((props, index) => (\n <ChartRadial key={index} {...props} />\n )),\n },\n ],\n [series],\n )\n const labelFormatter = useCallback<\n NonNullable<ChartTooltipProps[\"labelFormatter\"]>\n >(() => null, [])\n\n return (\n <PolarChart\n components={components}\n render={(props) => (\n <RadialBarChart {...getChartProps({ ...props, ...chartProps })} />\n )}\n gridProps={{ type: \"circle\", ...gridProps }}\n tooltipProps={{ labelFormatter, ...tooltipProps }}\n {...getRootProps()}\n >\n {children}\n </PolarChart>\n )\n },\n)() as GenericsComponent<{\n <Y extends Dict>(props: RadialChartProps<Y>): ReactElement\n}>\n"],"mappings":";;;;;;;;;;;;;AA6CA,MAAM,EACJ,cAAc,yBACd,iBAAiB,4BACjB,gBACEA,yCACF,gBACAC,4CACD;;;;;;AASD,MAAa,cAAc,aACR,EACf,UACA,SAAS,EAAE,EACX,YACA,WACA,cACA,GAAG,WACsB;CACzB,MAAM,EAAE,eAAe,iBAAiBC,wCAAe;EACrD,UAAU;EACV,aAAa;EACb,aAAa;EACb,YAAY;EACZ,GAAG;EACJ,CAAC;CACF,MAAM,sCACE,CACJ;EACE,WAAWC;EACX,UAAU,OAAO,KAAK,OAAO,UAC3B,2CAACA,mCAAwB,GAAI,SAAX,MAAoB,CACtC;EACH,CACF,EACD,CAAC,OAAO,CACT;CACD,MAAM,8CAEE,MAAM,EAAE,CAAC;AAEjB,QACE,2CAACC;EACa;EACZ,SAAS,UACP,2CAACC,2BAAe,GAAI,cAAc;GAAE,GAAG;GAAO,GAAG;GAAY,CAAC,GAAI;EAEpE,WAAW;GAAE,MAAM;GAAU,GAAG;GAAW;EAC3C,cAAc;GAAE;GAAgB,GAAG;GAAc;EACjD,GAAI,cAAc;EAEjB;GACU;EAGlB,EAAE"}
1
+ {"version":3,"file":"radial-chart.cjs","names":["createComponent","radialChartStyle","ChartRadial","PolarChart","RadialBarChart"],"sources":["../../../../src/components/chart/radial-chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement } from \"react\"\nimport type { GenericsComponent, ThemeProps } from \"../../core\"\nimport type { Dict } from \"../../utils\"\nimport type { ChartTooltipProps } from \"./chart\"\nimport type { ChartRadialProps, PolarChartProps } from \"./polar-chart\"\nimport type { RadialChartStyle } from \"./radial-chart.style\"\nimport { useCallback, useMemo } from \"react\"\nimport { RadialBarChart } from \"recharts\"\nimport { createComponent } from \"../../core\"\nimport { ChartRadial, PolarChart } from \"./polar-chart\"\nimport { radialChartStyle } from \"./radial-chart.style\"\n\nexport interface RadialChartProps<Y extends Dict = Dict>\n extends\n Omit<PolarChartProps<Y>, \"components\" | \"nameKey\" | \"render\">,\n ThemeProps<RadialChartStyle> {\n /***\n * If provided, generate lines based on series.\n */\n series?: ChartRadialProps<Y>[]\n}\n\nconst {\n PropsContext: RadialChartPropsContext,\n usePropsContext: useRadialChartPropsContext,\n withContext,\n} = createComponent<RadialChartProps, RadialChartStyle>(\n \"radial-chart\",\n radialChartStyle,\n)\n\nexport { RadialChartPropsContext, useRadialChartPropsContext }\n\n/**\n * `RadialChart` is a component for drawing radial charts to compare multiple sets of data.\n *\n * @see https://yamada-ui.com/docs/components/radial-chart\n */\nexport const RadialChart = withContext<\"div\", RadialChartProps>(\n <Y extends Dict>({\n children,\n endAngle = -270,\n innerRadius = \"20%\",\n outerRadius = \"90%\",\n series = [],\n startAngle = 90,\n gridProps,\n tooltipProps,\n ...rest\n }: RadialChartProps<Y>) => {\n const components = useMemo(\n () => [\n {\n component: ChartRadial,\n fallback: series.map((props, index) => (\n <ChartRadial key={index} {...props} />\n )),\n },\n ],\n [series],\n )\n const labelFormatter = useCallback<\n NonNullable<ChartTooltipProps[\"labelFormatter\"]>\n >(() => null, [])\n\n return (\n <PolarChart\n components={components}\n endAngle={endAngle}\n innerRadius={innerRadius}\n outerRadius={outerRadius}\n render={(props) => <RadialBarChart {...props} />}\n startAngle={startAngle}\n gridProps={{ type: \"circle\", ...gridProps }}\n tooltipProps={{ labelFormatter, ...tooltipProps }}\n {...rest}\n >\n {children}\n </PolarChart>\n )\n },\n)() as GenericsComponent<{\n <Y extends Dict>(props: RadialChartProps<Y>): ReactElement\n}>\n"],"mappings":";;;;;;;;;;;;AAwBA,MAAM,EACJ,cAAc,yBACd,iBAAiB,4BACjB,gBACEA,yCACF,gBACAC,4CACD;;;;;;AASD,MAAa,cAAc,aACR,EACf,UACA,WAAW,MACX,cAAc,OACd,cAAc,OACd,SAAS,EAAE,EACX,aAAa,IACb,WACA,cACA,GAAG,WACsB;CACzB,MAAM,sCACE,CACJ;EACE,WAAWC;EACX,UAAU,OAAO,KAAK,OAAO,UAC3B,2CAACA,mCAAwB,GAAI,SAAX,MAAoB,CACtC;EACH,CACF,EACD,CAAC,OAAO,CACT;CACD,MAAM,8CAEE,MAAM,EAAE,CAAC;AAEjB,QACE,2CAACC;EACa;EACF;EACG;EACA;EACb,SAAS,UAAU,2CAACC,2BAAe,GAAI,QAAS;EACpC;EACZ,WAAW;GAAE,MAAM;GAAU,GAAG;GAAW;EAC3C,cAAc;GAAE;GAAgB,GAAG;GAAc;EACjD,GAAI;EAEH;GACU;EAGlB,EAAE"}
@@ -6,6 +6,37 @@ const require_use_chart = require('./use-chart.cjs');
6
6
  let react = require("react");
7
7
 
8
8
  //#region src/components/chart/use-cartesian-chart.ts
9
+ const useCartesianChart = ({ accessibilityLayer = true, compact, data, layout = "horizontal", responsive, syncId, syncMethod, ...rest }) => {
10
+ const getRootProps = (0, react.useCallback)((props) => ({
11
+ ...props,
12
+ ...rest
13
+ }), [rest]);
14
+ return {
15
+ getChartProps: (0, react.useCallback)((props) => ({
16
+ accessibilityLayer,
17
+ compact,
18
+ data,
19
+ layout,
20
+ margin: {
21
+ left: 16,
22
+ right: 16
23
+ },
24
+ responsive,
25
+ syncId,
26
+ syncMethod,
27
+ ...props
28
+ }), [
29
+ accessibilityLayer,
30
+ compact,
31
+ data,
32
+ layout,
33
+ responsive,
34
+ syncId,
35
+ syncMethod
36
+ ]),
37
+ getRootProps
38
+ };
39
+ };
9
40
  const useChartXAxis = ({ type, name, allowDataOverflow, allowDecimals, allowDuplicatedCategory, angle, axisLine = false, children, dataKey, domain, height, hide, includeHidden, interval, label: labelProp = false, minTickGap = 8, mirror, orientation, padding, range, reversed, scale, tick: tickProp = true, tickCount, tickFormatter, tickLine: tickLineProp = false, tickMargin = 8, ticks, tickSize, unit, xAxisId, ...rest } = {}) => {
10
41
  const tick = (0, react.useMemo)(() => {
11
42
  if (!tickProp) return tickProp;
@@ -586,6 +617,7 @@ const useChartGrid = ({ horizontal, horizontalCoordinatesGenerator, horizontalFi
586
617
  };
587
618
 
588
619
  //#endregion
620
+ exports.useCartesianChart = useCartesianChart;
589
621
  exports.useChartArea = useChartArea;
590
622
  exports.useChartBar = useChartBar;
591
623
  exports.useChartGrid = useChartGrid;
@@ -1 +1 @@
1
- {"version":3,"file":"use-cartesian-chart.cjs","names":["useChartContext","getRootProps: PropGetter<\"line\">","getRootProps: PropGetter<\"path\">"],"sources":["../../../../src/components/chart/use-cartesian-chart.ts"],"sourcesContent":["\"use client\"\n\nimport type {\n AreaProps,\n BarProps,\n CartesianGridProps,\n LineProps,\n ReferenceLineProps,\n XAxisProps,\n YAxisProps,\n} from \"recharts\"\nimport type { HTMLProps, PropGetter, SimpleDirection } from \"../../core\"\nimport type { Merge } from \"../../utils\"\nimport { isValidElement, useCallback, useMemo } from \"react\"\nimport { dataAttr, isFunction, isObject, isUndefined } from \"../../utils\"\nimport { useChartContext } from \"./use-chart\"\n\nexport interface UseChartXAxisProps extends Merge<\n HTMLProps<\"svg\">,\n Pick<\n XAxisProps,\n | \"allowDataOverflow\"\n | \"allowDecimals\"\n | \"allowDuplicatedCategory\"\n | \"angle\"\n | \"axisLine\"\n | \"dataKey\"\n | \"domain\"\n | \"height\"\n | \"hide\"\n | \"includeHidden\"\n | \"interval\"\n | \"label\"\n | \"minTickGap\"\n | \"mirror\"\n | \"name\"\n | \"orientation\"\n | \"padding\"\n | \"range\"\n | \"reversed\"\n | \"scale\"\n | \"tick\"\n | \"tickCount\"\n | \"tickFormatter\"\n | \"tickLine\"\n | \"tickMargin\"\n | \"ticks\"\n | \"tickSize\"\n | \"type\"\n | \"unit\"\n | \"xAxisId\"\n >\n> {}\n\nexport const useChartXAxis = ({\n type,\n name,\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine = false,\n children,\n dataKey,\n domain,\n height,\n hide,\n includeHidden,\n interval,\n label: labelProp = false,\n minTickGap = 8,\n mirror,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick: tickProp = true,\n tickCount,\n tickFormatter,\n tickLine: tickLineProp = false,\n tickMargin = 8,\n ticks,\n tickSize,\n unit,\n xAxisId,\n ...rest\n}: UseChartXAxisProps = {}) => {\n const tick = useMemo<UseChartXAxisProps[\"tick\"]>(() => {\n if (!tickProp) return tickProp\n if (isFunction(tickProp) || isValidElement(tickProp)) return tickProp\n\n return { ...(isObject(tickProp) ? tickProp : {}), fill: \"\" }\n }, [tickProp])\n const tickLine = useMemo<UseChartXAxisProps[\"tickLine\"]>(() => {\n if (!tickLineProp) return tickLineProp\n\n return {\n fill: \"\",\n stroke: \"\",\n ...(isObject(tickLineProp) ? tickLineProp : {}),\n }\n }, [tickLineProp])\n const label = useMemo<UseChartXAxisProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 0,\n position: \"insideBottom\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n\n const getRootProps: PropGetter<\"svg\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getXAxisProps: PropGetter<XAxisProps> = useCallback(\n (props) => ({\n type,\n name,\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine,\n children,\n dataKey,\n domain,\n height: height ?? (label ? 52 : undefined),\n hide,\n includeHidden,\n interval,\n label,\n minTickGap,\n mirror,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick,\n tickCount,\n tickFormatter,\n tickLine,\n tickMargin,\n ticks,\n tickSize,\n unit,\n xAxisId,\n ...props,\n }),\n [\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine,\n children,\n dataKey,\n domain,\n height,\n hide,\n includeHidden,\n interval,\n label,\n minTickGap,\n mirror,\n name,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick,\n tickCount,\n tickFormatter,\n tickLine,\n tickMargin,\n tickSize,\n ticks,\n type,\n unit,\n xAxisId,\n ],\n )\n\n return { getRootProps, getXAxisProps }\n}\n\nexport type UseChartXAxisReturn = ReturnType<typeof useChartXAxis>\n\nexport interface UseChartYAxisProps extends Merge<\n HTMLProps<\"svg\">,\n Pick<\n YAxisProps,\n | \"allowDataOverflow\"\n | \"allowDecimals\"\n | \"allowDuplicatedCategory\"\n | \"angle\"\n | \"axisLine\"\n | \"dataKey\"\n | \"domain\"\n | \"hide\"\n | \"includeHidden\"\n | \"interval\"\n | \"label\"\n | \"minTickGap\"\n | \"mirror\"\n | \"name\"\n | \"padding\"\n | \"range\"\n | \"reversed\"\n | \"scale\"\n | \"tick\"\n | \"tickCount\"\n | \"tickFormatter\"\n | \"tickLine\"\n | \"tickMargin\"\n | \"ticks\"\n | \"tickSize\"\n | \"type\"\n | \"unit\"\n | \"width\"\n | \"yAxisId\"\n >\n> {\n /**\n * The orientation of axis.\n *\n * @defaultValue \"start\"\n */\n orientation?: SimpleDirection\n}\n\nexport const useChartYAxis = ({\n type,\n name,\n allowDataOverflow,\n allowDecimals = true,\n allowDuplicatedCategory,\n angle,\n axisLine = false,\n children,\n dataKey,\n domain,\n hide,\n includeHidden,\n interval,\n label: labelProp = false,\n minTickGap,\n mirror,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick: tickProp = true,\n tickCount,\n tickFormatter,\n tickLine: tickLineProp = false,\n tickMargin,\n ticks,\n tickSize,\n unit,\n width,\n yAxisId,\n ...rest\n}: UseChartYAxisProps = {}) => {\n const tick = useMemo<UseChartYAxisProps[\"tick\"]>(() => {\n if (!tickProp) return tickProp\n if (isFunction(tickProp) || isValidElement(tickProp)) return tickProp\n\n return { fill: \"\", ...(isObject(tickProp) ? tickProp : {}) }\n }, [tickProp])\n const tickLine = useMemo<UseChartYAxisProps[\"tickLine\"]>(() => {\n if (!tickLineProp) return tickLineProp\n\n return {\n fill: \"\",\n stroke: \"\",\n ...(isObject(tickLineProp) ? tickLineProp : {}),\n }\n }, [tickLineProp])\n const label = useMemo<UseChartYAxisProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n angle: -90,\n fill: \"\",\n offset: 4,\n position: \"insideLeft\",\n transform:\n orientation === \"end\" ? \"translate(10, 0)\" : \"translate(-10, 0)\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp, orientation])\n\n const getRootProps: PropGetter<\"svg\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getYAxisProps: PropGetter<YAxisProps> = useCallback(\n (props = {}) => ({\n type,\n name,\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine,\n children,\n dataKey,\n domain,\n hide,\n includeHidden,\n interval,\n label,\n minTickGap,\n mirror,\n orientation:\n orientation === \"end\"\n ? \"right\"\n : orientation === \"start\"\n ? \"left\"\n : undefined,\n padding,\n range,\n reversed,\n scale,\n tick,\n tickCount,\n tickFormatter,\n tickLine,\n tickMargin,\n ticks,\n tickSize,\n unit,\n width: width ?? (label ? 64 : undefined),\n yAxisId,\n ...props,\n }),\n [\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine,\n children,\n dataKey,\n domain,\n hide,\n includeHidden,\n interval,\n label,\n minTickGap,\n mirror,\n name,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick,\n tickCount,\n tickFormatter,\n tickLine,\n tickMargin,\n tickSize,\n ticks,\n type,\n unit,\n width,\n yAxisId,\n ],\n )\n\n return { getRootProps, getYAxisProps }\n}\n\nexport type UseChartYAxisReturn = ReturnType<typeof useChartYAxis>\n\nexport interface UseChartLineProps extends Merge<\n HTMLProps<\"line\">,\n Pick<\n LineProps,\n | \"activeDot\"\n | \"animateNewValues\"\n | \"animationBegin\"\n | \"animationDuration\"\n | \"animationEasing\"\n | \"connectNulls\"\n | \"data\"\n | \"dataKey\"\n | \"dot\"\n | \"hide\"\n | \"isAnimationActive\"\n | \"label\"\n | \"legendType\"\n | \"name\"\n | \"onAnimationEnd\"\n | \"onAnimationStart\"\n | \"shape\"\n | \"stroke\"\n | \"tooltipType\"\n | \"type\"\n | \"unit\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartLine = ({\n type = \"monotone\",\n name,\n activeDot: activeDotProp,\n animateNewValues,\n animationBegin,\n animationDuration,\n animationEasing,\n children,\n connectNulls,\n data,\n dataKey: dataKeyProp,\n dot: dotProp,\n hide,\n isAnimationActive = false,\n label: labelProp = false,\n legendType,\n shape,\n stroke = \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...rest\n}: UseChartLineProps = {}) => {\n const { highlightedDataKey } = useChartContext()\n const label = useMemo<UseChartLineProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 12,\n position: \"top\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n const dot = useMemo<UseChartLineProps[\"dot\"]>(() => {\n if (!dotProp) return dotProp\n if (isFunction(dotProp) || isValidElement(dotProp)) return dotProp\n\n return { fill: \"\", stroke: \"\", ...(isObject(dotProp) ? dotProp : {}) }\n }, [dotProp])\n const activeDot = useMemo<UseChartLineProps[\"activeDot\"]>(() => {\n if (!activeDotProp) return activeDotProp\n if (isFunction(activeDotProp) || isValidElement(activeDotProp))\n return activeDotProp\n\n return {\n fill: \"\",\n stroke: \"\",\n ...(isObject(activeDotProp) ? activeDotProp : {}),\n }\n }, [activeDotProp])\n\n const getRootProps: PropGetter<\"line\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getLineProps: PropGetter<LineProps> = useCallback(\n ({ dataKey = dataKeyProp, ...props } = {}) => ({\n type,\n name,\n \"data-active\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey === dataKey,\n ),\n \"data-inactive\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey !== dataKey,\n ),\n activeDot,\n animateNewValues,\n animationBegin,\n animationDuration,\n animationEasing,\n children,\n connectNulls,\n data,\n dataKey,\n dot,\n hide,\n isAnimationActive,\n label,\n legendType,\n shape,\n stroke,\n strokeWidth: \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...props,\n }),\n [\n activeDot,\n animateNewValues,\n animationBegin,\n animationDuration,\n animationEasing,\n children,\n connectNulls,\n data,\n dataKeyProp,\n dot,\n hide,\n highlightedDataKey,\n isAnimationActive,\n label,\n legendType,\n name,\n onAnimationEnd,\n onAnimationStart,\n shape,\n stroke,\n tooltipType,\n type,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getLineProps, getRootProps }\n}\n\nexport type UseChartLineReturn = ReturnType<typeof useChartLine>\n\nexport interface UseChartAreaProps extends Merge<\n HTMLProps<\"line\">,\n Pick<\n AreaProps,\n | \"activeDot\"\n | \"animationBegin\"\n | \"animationDuration\"\n | \"animationEasing\"\n | \"baseLine\"\n | \"baseValue\"\n | \"connectNulls\"\n | \"data\"\n | \"dataKey\"\n | \"dot\"\n | \"hide\"\n | \"isAnimationActive\"\n | \"isRange\"\n | \"label\"\n | \"legendType\"\n | \"name\"\n | \"onAnimationEnd\"\n | \"onAnimationStart\"\n | \"stackId\"\n | \"stroke\"\n | \"tooltipType\"\n | \"type\"\n | \"unit\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartArea = ({\n type = \"monotone\",\n name,\n activeDot: activeDotProp,\n animationBegin,\n animationDuration,\n animationEasing,\n baseLine,\n baseValue,\n children,\n connectNulls,\n data,\n dataKey: dataKeyProp,\n dot: dotProp,\n hide,\n isAnimationActive = false,\n label: labelProp = false,\n legendType,\n stackId,\n stroke = \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...rest\n}: UseChartAreaProps) => {\n const { highlightedDataKey } = useChartContext()\n const label = useMemo<UseChartAreaProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 12,\n position: \"top\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n const dot = useMemo<UseChartAreaProps[\"dot\"]>(() => {\n if (!dotProp) return dotProp\n if (isFunction(dotProp) || isValidElement(dotProp)) return dotProp\n\n return { fill: \"\", stroke: \"\", ...(isObject(dotProp) ? dotProp : {}) }\n }, [dotProp])\n const activeDot = useMemo<UseChartAreaProps[\"activeDot\"]>(() => {\n if (!activeDotProp) return activeDotProp\n if (isFunction(activeDotProp) || isValidElement(activeDotProp))\n return activeDotProp\n\n return {\n fill: \"\",\n stroke: \"\",\n ...(isObject(activeDotProp) ? activeDotProp : {}),\n }\n }, [activeDotProp])\n\n const getRootProps: PropGetter<\"line\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getAreaProps: PropGetter<\n Partial<AreaProps>,\n undefined,\n AreaProps\n > = useCallback(\n ({ dataKey = dataKeyProp, ...props } = {}) => ({\n type,\n name,\n \"data-active\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey === dataKey,\n ),\n \"data-inactive\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey !== dataKey,\n ),\n activeDot,\n animationBegin,\n animationDuration,\n animationEasing,\n baseLine,\n baseValue,\n children,\n connectNulls,\n data,\n dataKey,\n dot,\n fill: \"\",\n fillOpacity: \"\",\n hide,\n isAnimationActive,\n label,\n legendType,\n stackId,\n stroke,\n strokeWidth: \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...props,\n }),\n [\n activeDot,\n animationBegin,\n animationDuration,\n animationEasing,\n baseLine,\n baseValue,\n children,\n connectNulls,\n data,\n dataKeyProp,\n dot,\n hide,\n highlightedDataKey,\n isAnimationActive,\n label,\n legendType,\n name,\n onAnimationEnd,\n onAnimationStart,\n stackId,\n stroke,\n tooltipType,\n type,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getAreaProps, getRootProps }\n}\n\nexport type UseChartAreaReturn = ReturnType<typeof useChartArea>\n\nexport interface UseChartBarProps extends Merge<\n HTMLProps<\"path\">,\n Pick<\n BarProps,\n | \"activeBar\"\n | \"animationBegin\"\n | \"animationDuration\"\n | \"animationEasing\"\n | \"background\"\n | \"barSize\"\n | \"dangerouslySetInnerHTML\"\n | \"dataKey\"\n | \"fill\"\n | \"hide\"\n | \"index\"\n | \"isAnimationActive\"\n | \"label\"\n | \"legendType\"\n | \"maxBarSize\"\n | \"minPointSize\"\n | \"name\"\n | \"onAnimationEnd\"\n | \"onAnimationStart\"\n | \"radius\"\n | \"shape\"\n | \"stackId\"\n | \"tooltipType\"\n | \"unit\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartBar = ({\n name,\n activeBar,\n animationBegin,\n animationDuration,\n animationEasing,\n background,\n barSize,\n children,\n dangerouslySetInnerHTML,\n dataKey: dataKeyProp,\n fill,\n hide,\n index,\n isAnimationActive = false,\n label: labelProp = false,\n legendType,\n maxBarSize,\n minPointSize,\n radius = 4,\n shape,\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...rest\n}: UseChartBarProps = {}) => {\n const { highlightedDataKey } = useChartContext()\n\n const label = useMemo<UseChartBarProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 12,\n position: \"top\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n\n const getRootProps: PropGetter<\"path\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getBarProps: PropGetter<BarProps> = useCallback(\n ({ dataKey = dataKeyProp, ...props } = {}) => ({\n name,\n \"data-active\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey === dataKey,\n ),\n \"data-inactive\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey !== dataKey,\n ),\n activeBar,\n animationBegin,\n animationDuration,\n animationEasing,\n background,\n barSize,\n children,\n dangerouslySetInnerHTML,\n dataKey,\n fill,\n hide,\n index,\n isAnimationActive,\n label,\n legendType,\n maxBarSize,\n minPointSize,\n radius,\n shape,\n stroke: \"\",\n strokeWidth: \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...props,\n }),\n [\n activeBar,\n animationBegin,\n animationDuration,\n animationEasing,\n background,\n barSize,\n children,\n dangerouslySetInnerHTML,\n dataKeyProp,\n fill,\n hide,\n highlightedDataKey,\n index,\n isAnimationActive,\n label,\n legendType,\n maxBarSize,\n minPointSize,\n name,\n onAnimationEnd,\n onAnimationStart,\n radius,\n shape,\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getBarProps, getRootProps }\n}\n\nexport type UseChartBarReturn = ReturnType<typeof useChartBar>\n\nexport interface UseChartReferenceLineProps extends Merge<\n HTMLProps<\"line\">,\n Pick<\n ReferenceLineProps,\n | \"ifOverflow\"\n | \"label\"\n | \"position\"\n | \"segment\"\n | \"shape\"\n | \"x\"\n | \"xAxisId\"\n | \"y\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartReferenceLine = ({\n children,\n ifOverflow,\n label: labelProp = false,\n position,\n segment,\n shape,\n viewBox,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ...rest\n}: UseChartReferenceLineProps = {}) => {\n const label = useMemo<UseChartReferenceLineProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 8,\n position: \"insideBottomLeft\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n\n const getRootProps: PropGetter<\"line\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getReferenceLineProps: PropGetter<Omit<ReferenceLineProps, \"ref\">> =\n useCallback(\n (props) => ({\n children,\n fill: \"\",\n fillOpacity: \"\",\n ifOverflow,\n label,\n position,\n segment,\n shape,\n stroke: \"\",\n strokeWidth: \"\",\n viewBox,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ...props,\n }),\n [\n children,\n ifOverflow,\n label,\n position,\n segment,\n shape,\n viewBox,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getReferenceLineProps, getRootProps }\n}\n\nexport type UseChartReferenceLineReturn = ReturnType<\n typeof useChartReferenceLine\n>\n\nexport interface UseChartGridProps extends Merge<\n HTMLProps<\"line\">,\n Pick<\n CartesianGridProps,\n | \"horizontal\"\n | \"horizontalCoordinatesGenerator\"\n | \"horizontalFill\"\n | \"horizontalPoints\"\n | \"horizontalValues\"\n | \"syncWithTicks\"\n | \"vertical\"\n | \"verticalCoordinatesGenerator\"\n | \"verticalFill\"\n | \"verticalPoints\"\n | \"verticalValues\"\n | \"x\"\n | \"xAxisId\"\n | \"y\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartGrid = ({\n horizontal,\n horizontalCoordinatesGenerator,\n horizontalFill,\n horizontalPoints,\n horizontalValues,\n syncWithTicks,\n vertical = false,\n verticalCoordinatesGenerator,\n verticalFill,\n verticalPoints,\n verticalValues,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ...rest\n}: UseChartGridProps = {}) => {\n const getRootProps: PropGetter<\"line\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getGridProps: PropGetter<CartesianGridProps> = useCallback(\n (props) => ({\n horizontal,\n horizontalCoordinatesGenerator,\n horizontalFill,\n horizontalPoints,\n horizontalValues,\n stroke: \"\",\n syncWithTicks,\n vertical,\n verticalCoordinatesGenerator,\n verticalFill,\n verticalPoints,\n verticalValues,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ...props,\n }),\n [\n horizontal,\n horizontalCoordinatesGenerator,\n horizontalFill,\n horizontalPoints,\n horizontalValues,\n syncWithTicks,\n vertical,\n verticalCoordinatesGenerator,\n verticalFill,\n verticalPoints,\n verticalValues,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getGridProps, getRootProps }\n}\n\nexport type UseChartGridReturn = ReturnType<typeof useChartGrid>\n"],"mappings":";;;;;;;;AAsDA,MAAa,iBAAiB,EAC5B,MACA,MACA,mBACA,eACA,yBACA,OACA,WAAW,OACX,UACA,SACA,QACA,QACA,MACA,eACA,UACA,OAAO,YAAY,OACnB,aAAa,GACb,QACA,aACA,SACA,OACA,UACA,OACA,MAAM,WAAW,MACjB,W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E,UAAU,aAAa,GAAG,UAAU,EAAE,MAAM;GAC7C;GACA;GACA,+DACE,oDAAa,mBAAmB,IAAI,uBAAuB,QAC5D;GACD,iEACE,oDAAa,mBAAmB,IAAI,uBAAuB,QAC5D;GACD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,MAAM;GACN,aAAa;GACb;GACA;GACA;GACA;GACA;GACA;GACA,aAAa;GACb;GACA;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAEsB;EAAc;;AAuCvC,MAAa,eAAe,EAC1B,MACA,WACA,gBACA,mBACA,iBACA,YACA,SACA,UACA,yBACA,SAAS,aACT,MACA,MACA,OACA,oBAAoB,OACpB,OAAO,YAAY,OACnB,YACA,YACA,cACA,SAAS,GACT,OACA,aACA,MACA,SACA,SACA,QACA,gBACA,kBACA,GAAG,SACiB,EAAE,KAAK;CAC3B,MAAM,EAAE,uBAAuBD,mCAAiB;CAEhD,MAAM,iCAAiD;AACrD,MAAI,CAAC,UAAW,QAAO;AACvB,wDAAe,UAAU,8BAAmB,UAAU,CAAE,QAAO;AAE/D,SAAO;GACL,MAAM;GACN,QAAQ;GACR,UAAU;GACV,mDAAa,UAAU,GAAG,YAAY,EAAE;GACzC;IACA,CAAC,UAAU,CAAC;CAEf,MAAME,uCACH,WAAW;EAAE,GAAG;EAAM,GAAG;EAAO,GACjC,CAAC,KAAK,CACP;AAyED,QAAO;EAAE,qCAtEN,EAAE,UAAU,aAAa,GAAG,UAAU,EAAE,MAAM;GAC7C;GACA,+DACE,oDAAa,mBAAmB,IAAI,uBAAuB,QAC5D;GACD,iEACE,oDAAa,mBAAmB,IAAI,uBAAuB,QAC5D;GACD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,QAAQ;GACR,aAAa;GACb;GACA;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAEqB;EAAc;;AAsBtC,MAAa,yBAAyB,EACpC,UACA,YACA,OAAO,YAAY,OACnB,UACA,SACA,OACA,SACA,GACA,SACA,GACA,SACA,QACA,GAAG,SAC2B,EAAE,KAAK;CACrC,MAAM,iCAA2D;AAC/D,MAAI,CAAC,UAAW,QAAO;AACvB,wDAAe,UAAU,8BAAmB,UAAU,CAAE,QAAO;AAE/D,SAAO;GACL,MAAM;GACN,QAAQ;GACR,UAAU;GACV,mDAAa,UAAU,GAAG,YAAY,EAAE;GACzC;IACA,CAAC,UAAU,CAAC;CAEf,MAAMD,uCACH,WAAW;EAAE,GAAG;EAAM,GAAG;EAAO,GACjC,CAAC,KAAK,CACP;AAuCD,QAAO;EAAE,+CAnCJ,WAAW;GACV;GACA,MAAM;GACN,aAAa;GACb;GACA;GACA;GACA;GACA;GACA,QAAQ;GACR,aAAa;GACb;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAE6B;EAAc;;AA8BhD,MAAa,gBAAgB,EAC3B,YACA,gCACA,gBACA,kBACA,kBACA,eACA,WAAW,OACX,8BACA,cACA,gBACA,gBACA,GACA,SACA,GACA,SACA,QACA,GAAG,SACkB,EAAE,KAAK;CAC5B,MAAMA,uCACH,WAAW;EAAE,GAAG;EAAM,GAAG;EAAO,GACjC,CAAC,KAAK,CACP;AA2CD,QAAO;EAAE,sCAxCN,WAAW;GACV;GACA;GACA;GACA;GACA;GACA,QAAQ;GACR;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAEsB;EAAc"}
1
+ {"version":3,"file":"use-cartesian-chart.cjs","names":["getRootProps: PropGetter","useChartContext","getRootProps: PropGetter<\"line\">","getRootProps: PropGetter<\"path\">"],"sources":["../../../../src/components/chart/use-cartesian-chart.ts"],"sourcesContent":["\"use client\"\n\nimport type {\n AreaProps,\n BarProps,\n CartesianGridProps,\n LineProps,\n ReferenceLineProps,\n XAxisProps,\n YAxisProps,\n} from \"recharts\"\nimport type { CartesianChartProps } from \"recharts/types/util/types\"\nimport type { HTMLProps, PropGetter, SimpleDirection } from \"../../core\"\nimport type { Dict, Merge } from \"../../utils\"\nimport { isValidElement, useCallback, useMemo } from \"react\"\nimport { dataAttr, isFunction, isObject, isUndefined } from \"../../utils\"\nimport { useChartContext } from \"./use-chart\"\n\nexport interface UseCartesianChartProps<Y extends Dict>\n extends\n HTMLProps,\n Pick<\n CartesianChartProps,\n | \"accessibilityLayer\"\n | \"compact\"\n | \"layout\"\n | \"responsive\"\n | \"syncId\"\n | \"syncMethod\"\n > {\n /**\n * Chart data.\n */\n data?: Y[]\n}\n\nexport const useCartesianChart = <Y extends Dict>({\n accessibilityLayer = true,\n compact,\n data,\n layout = \"horizontal\",\n responsive,\n syncId,\n syncMethod,\n ...rest\n}: UseCartesianChartProps<Y>) => {\n const getRootProps: PropGetter = useCallback(\n (props) => ({ ...props, ...rest }),\n [rest],\n )\n\n const getChartProps: PropGetter<CartesianChartProps> = useCallback(\n (props) => ({\n accessibilityLayer,\n compact,\n data,\n layout,\n margin: { left: 16, right: 16 },\n responsive,\n syncId,\n syncMethod,\n ...props,\n }),\n [accessibilityLayer, compact, data, layout, responsive, syncId, syncMethod],\n )\n\n return {\n getChartProps,\n getRootProps,\n }\n}\n\nexport type UseCartesianChartReturn<Y extends Dict> = ReturnType<\n typeof useCartesianChart<Y>\n>\n\nexport interface UseChartXAxisProps extends Merge<\n HTMLProps<\"svg\">,\n Pick<\n XAxisProps,\n | \"allowDataOverflow\"\n | \"allowDecimals\"\n | \"allowDuplicatedCategory\"\n | \"angle\"\n | \"axisLine\"\n | \"dataKey\"\n | \"domain\"\n | \"height\"\n | \"hide\"\n | \"includeHidden\"\n | \"interval\"\n | \"label\"\n | \"minTickGap\"\n | \"mirror\"\n | \"name\"\n | \"orientation\"\n | \"padding\"\n | \"range\"\n | \"reversed\"\n | \"scale\"\n | \"tick\"\n | \"tickCount\"\n | \"tickFormatter\"\n | \"tickLine\"\n | \"tickMargin\"\n | \"ticks\"\n | \"tickSize\"\n | \"type\"\n | \"unit\"\n | \"xAxisId\"\n >\n> {}\n\nexport const useChartXAxis = ({\n type,\n name,\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine = false,\n children,\n dataKey,\n domain,\n height,\n hide,\n includeHidden,\n interval,\n label: labelProp = false,\n minTickGap = 8,\n mirror,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick: tickProp = true,\n tickCount,\n tickFormatter,\n tickLine: tickLineProp = false,\n tickMargin = 8,\n ticks,\n tickSize,\n unit,\n xAxisId,\n ...rest\n}: UseChartXAxisProps = {}) => {\n const tick = useMemo<UseChartXAxisProps[\"tick\"]>(() => {\n if (!tickProp) return tickProp\n if (isFunction(tickProp) || isValidElement(tickProp)) return tickProp\n\n return { ...(isObject(tickProp) ? tickProp : {}), fill: \"\" }\n }, [tickProp])\n const tickLine = useMemo<UseChartXAxisProps[\"tickLine\"]>(() => {\n if (!tickLineProp) return tickLineProp\n\n return {\n fill: \"\",\n stroke: \"\",\n ...(isObject(tickLineProp) ? tickLineProp : {}),\n }\n }, [tickLineProp])\n const label = useMemo<UseChartXAxisProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 0,\n position: \"insideBottom\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n\n const getRootProps: PropGetter<\"svg\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getXAxisProps: PropGetter<XAxisProps> = useCallback(\n (props) => ({\n type,\n name,\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine,\n children,\n dataKey,\n domain,\n height: height ?? (label ? 52 : undefined),\n hide,\n includeHidden,\n interval,\n label,\n minTickGap,\n mirror,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick,\n tickCount,\n tickFormatter,\n tickLine,\n tickMargin,\n ticks,\n tickSize,\n unit,\n xAxisId,\n ...props,\n }),\n [\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine,\n children,\n dataKey,\n domain,\n height,\n hide,\n includeHidden,\n interval,\n label,\n minTickGap,\n mirror,\n name,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick,\n tickCount,\n tickFormatter,\n tickLine,\n tickMargin,\n tickSize,\n ticks,\n type,\n unit,\n xAxisId,\n ],\n )\n\n return { getRootProps, getXAxisProps }\n}\n\nexport type UseChartXAxisReturn = ReturnType<typeof useChartXAxis>\n\nexport interface UseChartYAxisProps extends Merge<\n HTMLProps<\"svg\">,\n Pick<\n YAxisProps,\n | \"allowDataOverflow\"\n | \"allowDecimals\"\n | \"allowDuplicatedCategory\"\n | \"angle\"\n | \"axisLine\"\n | \"dataKey\"\n | \"domain\"\n | \"hide\"\n | \"includeHidden\"\n | \"interval\"\n | \"label\"\n | \"minTickGap\"\n | \"mirror\"\n | \"name\"\n | \"padding\"\n | \"range\"\n | \"reversed\"\n | \"scale\"\n | \"tick\"\n | \"tickCount\"\n | \"tickFormatter\"\n | \"tickLine\"\n | \"tickMargin\"\n | \"ticks\"\n | \"tickSize\"\n | \"type\"\n | \"unit\"\n | \"width\"\n | \"yAxisId\"\n >\n> {\n /**\n * The orientation of axis.\n *\n * @defaultValue \"start\"\n */\n orientation?: SimpleDirection\n}\n\nexport const useChartYAxis = ({\n type,\n name,\n allowDataOverflow,\n allowDecimals = true,\n allowDuplicatedCategory,\n angle,\n axisLine = false,\n children,\n dataKey,\n domain,\n hide,\n includeHidden,\n interval,\n label: labelProp = false,\n minTickGap,\n mirror,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick: tickProp = true,\n tickCount,\n tickFormatter,\n tickLine: tickLineProp = false,\n tickMargin,\n ticks,\n tickSize,\n unit,\n width,\n yAxisId,\n ...rest\n}: UseChartYAxisProps = {}) => {\n const tick = useMemo<UseChartYAxisProps[\"tick\"]>(() => {\n if (!tickProp) return tickProp\n if (isFunction(tickProp) || isValidElement(tickProp)) return tickProp\n\n return { fill: \"\", ...(isObject(tickProp) ? tickProp : {}) }\n }, [tickProp])\n const tickLine = useMemo<UseChartYAxisProps[\"tickLine\"]>(() => {\n if (!tickLineProp) return tickLineProp\n\n return {\n fill: \"\",\n stroke: \"\",\n ...(isObject(tickLineProp) ? tickLineProp : {}),\n }\n }, [tickLineProp])\n const label = useMemo<UseChartYAxisProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n angle: -90,\n fill: \"\",\n offset: 4,\n position: \"insideLeft\",\n transform:\n orientation === \"end\" ? \"translate(10, 0)\" : \"translate(-10, 0)\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp, orientation])\n\n const getRootProps: PropGetter<\"svg\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getYAxisProps: PropGetter<YAxisProps> = useCallback(\n (props = {}) => ({\n type,\n name,\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine,\n children,\n dataKey,\n domain,\n hide,\n includeHidden,\n interval,\n label,\n minTickGap,\n mirror,\n orientation:\n orientation === \"end\"\n ? \"right\"\n : orientation === \"start\"\n ? \"left\"\n : undefined,\n padding,\n range,\n reversed,\n scale,\n tick,\n tickCount,\n tickFormatter,\n tickLine,\n tickMargin,\n ticks,\n tickSize,\n unit,\n width: width ?? (label ? 64 : undefined),\n yAxisId,\n ...props,\n }),\n [\n allowDataOverflow,\n allowDecimals,\n allowDuplicatedCategory,\n angle,\n axisLine,\n children,\n dataKey,\n domain,\n hide,\n includeHidden,\n interval,\n label,\n minTickGap,\n mirror,\n name,\n orientation,\n padding,\n range,\n reversed,\n scale,\n tick,\n tickCount,\n tickFormatter,\n tickLine,\n tickMargin,\n tickSize,\n ticks,\n type,\n unit,\n width,\n yAxisId,\n ],\n )\n\n return { getRootProps, getYAxisProps }\n}\n\nexport type UseChartYAxisReturn = ReturnType<typeof useChartYAxis>\n\nexport interface UseChartLineProps extends Merge<\n HTMLProps<\"line\">,\n Pick<\n LineProps,\n | \"activeDot\"\n | \"animateNewValues\"\n | \"animationBegin\"\n | \"animationDuration\"\n | \"animationEasing\"\n | \"connectNulls\"\n | \"data\"\n | \"dataKey\"\n | \"dot\"\n | \"hide\"\n | \"isAnimationActive\"\n | \"label\"\n | \"legendType\"\n | \"name\"\n | \"onAnimationEnd\"\n | \"onAnimationStart\"\n | \"shape\"\n | \"stroke\"\n | \"tooltipType\"\n | \"type\"\n | \"unit\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartLine = ({\n type = \"monotone\",\n name,\n activeDot: activeDotProp,\n animateNewValues,\n animationBegin,\n animationDuration,\n animationEasing,\n children,\n connectNulls,\n data,\n dataKey: dataKeyProp,\n dot: dotProp,\n hide,\n isAnimationActive = false,\n label: labelProp = false,\n legendType,\n shape,\n stroke = \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...rest\n}: UseChartLineProps = {}) => {\n const { highlightedDataKey } = useChartContext()\n const label = useMemo<UseChartLineProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 12,\n position: \"top\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n const dot = useMemo<UseChartLineProps[\"dot\"]>(() => {\n if (!dotProp) return dotProp\n if (isFunction(dotProp) || isValidElement(dotProp)) return dotProp\n\n return { fill: \"\", stroke: \"\", ...(isObject(dotProp) ? dotProp : {}) }\n }, [dotProp])\n const activeDot = useMemo<UseChartLineProps[\"activeDot\"]>(() => {\n if (!activeDotProp) return activeDotProp\n if (isFunction(activeDotProp) || isValidElement(activeDotProp))\n return activeDotProp\n\n return {\n fill: \"\",\n stroke: \"\",\n ...(isObject(activeDotProp) ? activeDotProp : {}),\n }\n }, [activeDotProp])\n\n const getRootProps: PropGetter<\"line\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getLineProps: PropGetter<LineProps> = useCallback(\n ({ dataKey = dataKeyProp, ...props } = {}) => ({\n type,\n name,\n \"data-active\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey === dataKey,\n ),\n \"data-inactive\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey !== dataKey,\n ),\n activeDot,\n animateNewValues,\n animationBegin,\n animationDuration,\n animationEasing,\n children,\n connectNulls,\n data,\n dataKey,\n dot,\n hide,\n isAnimationActive,\n label,\n legendType,\n shape,\n stroke,\n strokeWidth: \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...props,\n }),\n [\n activeDot,\n animateNewValues,\n animationBegin,\n animationDuration,\n animationEasing,\n children,\n connectNulls,\n data,\n dataKeyProp,\n dot,\n hide,\n highlightedDataKey,\n isAnimationActive,\n label,\n legendType,\n name,\n onAnimationEnd,\n onAnimationStart,\n shape,\n stroke,\n tooltipType,\n type,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getLineProps, getRootProps }\n}\n\nexport type UseChartLineReturn = ReturnType<typeof useChartLine>\n\nexport interface UseChartAreaProps extends Merge<\n HTMLProps<\"line\">,\n Pick<\n AreaProps,\n | \"activeDot\"\n | \"animationBegin\"\n | \"animationDuration\"\n | \"animationEasing\"\n | \"baseLine\"\n | \"baseValue\"\n | \"connectNulls\"\n | \"data\"\n | \"dataKey\"\n | \"dot\"\n | \"hide\"\n | \"isAnimationActive\"\n | \"isRange\"\n | \"label\"\n | \"legendType\"\n | \"name\"\n | \"onAnimationEnd\"\n | \"onAnimationStart\"\n | \"stackId\"\n | \"stroke\"\n | \"tooltipType\"\n | \"type\"\n | \"unit\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartArea = ({\n type = \"monotone\",\n name,\n activeDot: activeDotProp,\n animationBegin,\n animationDuration,\n animationEasing,\n baseLine,\n baseValue,\n children,\n connectNulls,\n data,\n dataKey: dataKeyProp,\n dot: dotProp,\n hide,\n isAnimationActive = false,\n label: labelProp = false,\n legendType,\n stackId,\n stroke = \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...rest\n}: UseChartAreaProps) => {\n const { highlightedDataKey } = useChartContext()\n const label = useMemo<UseChartAreaProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 12,\n position: \"top\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n const dot = useMemo<UseChartAreaProps[\"dot\"]>(() => {\n if (!dotProp) return dotProp\n if (isFunction(dotProp) || isValidElement(dotProp)) return dotProp\n\n return { fill: \"\", stroke: \"\", ...(isObject(dotProp) ? dotProp : {}) }\n }, [dotProp])\n const activeDot = useMemo<UseChartAreaProps[\"activeDot\"]>(() => {\n if (!activeDotProp) return activeDotProp\n if (isFunction(activeDotProp) || isValidElement(activeDotProp))\n return activeDotProp\n\n return {\n fill: \"\",\n stroke: \"\",\n ...(isObject(activeDotProp) ? activeDotProp : {}),\n }\n }, [activeDotProp])\n\n const getRootProps: PropGetter<\"line\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getAreaProps: PropGetter<\n Partial<AreaProps>,\n undefined,\n AreaProps\n > = useCallback(\n ({ dataKey = dataKeyProp, ...props } = {}) => ({\n type,\n name,\n \"data-active\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey === dataKey,\n ),\n \"data-inactive\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey !== dataKey,\n ),\n activeDot,\n animationBegin,\n animationDuration,\n animationEasing,\n baseLine,\n baseValue,\n children,\n connectNulls,\n data,\n dataKey,\n dot,\n fill: \"\",\n fillOpacity: \"\",\n hide,\n isAnimationActive,\n label,\n legendType,\n stackId,\n stroke,\n strokeWidth: \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...props,\n }),\n [\n activeDot,\n animationBegin,\n animationDuration,\n animationEasing,\n baseLine,\n baseValue,\n children,\n connectNulls,\n data,\n dataKeyProp,\n dot,\n hide,\n highlightedDataKey,\n isAnimationActive,\n label,\n legendType,\n name,\n onAnimationEnd,\n onAnimationStart,\n stackId,\n stroke,\n tooltipType,\n type,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getAreaProps, getRootProps }\n}\n\nexport type UseChartAreaReturn = ReturnType<typeof useChartArea>\n\nexport interface UseChartBarProps extends Merge<\n HTMLProps<\"path\">,\n Pick<\n BarProps,\n | \"activeBar\"\n | \"animationBegin\"\n | \"animationDuration\"\n | \"animationEasing\"\n | \"background\"\n | \"barSize\"\n | \"dangerouslySetInnerHTML\"\n | \"dataKey\"\n | \"fill\"\n | \"hide\"\n | \"index\"\n | \"isAnimationActive\"\n | \"label\"\n | \"legendType\"\n | \"maxBarSize\"\n | \"minPointSize\"\n | \"name\"\n | \"onAnimationEnd\"\n | \"onAnimationStart\"\n | \"radius\"\n | \"shape\"\n | \"stackId\"\n | \"tooltipType\"\n | \"unit\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartBar = ({\n name,\n activeBar,\n animationBegin,\n animationDuration,\n animationEasing,\n background,\n barSize,\n children,\n dangerouslySetInnerHTML,\n dataKey: dataKeyProp,\n fill,\n hide,\n index,\n isAnimationActive = false,\n label: labelProp = false,\n legendType,\n maxBarSize,\n minPointSize,\n radius = 4,\n shape,\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...rest\n}: UseChartBarProps = {}) => {\n const { highlightedDataKey } = useChartContext()\n\n const label = useMemo<UseChartBarProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 12,\n position: \"top\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n\n const getRootProps: PropGetter<\"path\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getBarProps: PropGetter<BarProps> = useCallback(\n ({ dataKey = dataKeyProp, ...props } = {}) => ({\n name,\n \"data-active\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey === dataKey,\n ),\n \"data-inactive\": dataAttr(\n !isUndefined(highlightedDataKey) && highlightedDataKey !== dataKey,\n ),\n activeBar,\n animationBegin,\n animationDuration,\n animationEasing,\n background,\n barSize,\n children,\n dangerouslySetInnerHTML,\n dataKey,\n fill,\n hide,\n index,\n isAnimationActive,\n label,\n legendType,\n maxBarSize,\n minPointSize,\n radius,\n shape,\n stroke: \"\",\n strokeWidth: \"\",\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n onAnimationEnd,\n onAnimationStart,\n ...props,\n }),\n [\n activeBar,\n animationBegin,\n animationDuration,\n animationEasing,\n background,\n barSize,\n children,\n dangerouslySetInnerHTML,\n dataKeyProp,\n fill,\n hide,\n highlightedDataKey,\n index,\n isAnimationActive,\n label,\n legendType,\n maxBarSize,\n minPointSize,\n name,\n onAnimationEnd,\n onAnimationStart,\n radius,\n shape,\n tooltipType,\n unit,\n xAxisId,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getBarProps, getRootProps }\n}\n\nexport type UseChartBarReturn = ReturnType<typeof useChartBar>\n\nexport interface UseChartReferenceLineProps extends Merge<\n HTMLProps<\"line\">,\n Pick<\n ReferenceLineProps,\n | \"ifOverflow\"\n | \"label\"\n | \"position\"\n | \"segment\"\n | \"shape\"\n | \"x\"\n | \"xAxisId\"\n | \"y\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartReferenceLine = ({\n children,\n ifOverflow,\n label: labelProp = false,\n position,\n segment,\n shape,\n viewBox,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ...rest\n}: UseChartReferenceLineProps = {}) => {\n const label = useMemo<UseChartReferenceLineProps[\"label\"]>(() => {\n if (!labelProp) return labelProp\n if (isFunction(labelProp) || isValidElement(labelProp)) return labelProp\n\n return {\n fill: \"\",\n offset: 8,\n position: \"insideBottomLeft\",\n ...(isObject(labelProp) ? labelProp : {}),\n }\n }, [labelProp])\n\n const getRootProps: PropGetter<\"line\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getReferenceLineProps: PropGetter<Omit<ReferenceLineProps, \"ref\">> =\n useCallback(\n (props) => ({\n children,\n fill: \"\",\n fillOpacity: \"\",\n ifOverflow,\n label,\n position,\n segment,\n shape,\n stroke: \"\",\n strokeWidth: \"\",\n viewBox,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ...props,\n }),\n [\n children,\n ifOverflow,\n label,\n position,\n segment,\n shape,\n viewBox,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getReferenceLineProps, getRootProps }\n}\n\nexport type UseChartReferenceLineReturn = ReturnType<\n typeof useChartReferenceLine\n>\n\nexport interface UseChartGridProps extends Merge<\n HTMLProps<\"line\">,\n Pick<\n CartesianGridProps,\n | \"horizontal\"\n | \"horizontalCoordinatesGenerator\"\n | \"horizontalFill\"\n | \"horizontalPoints\"\n | \"horizontalValues\"\n | \"syncWithTicks\"\n | \"vertical\"\n | \"verticalCoordinatesGenerator\"\n | \"verticalFill\"\n | \"verticalPoints\"\n | \"verticalValues\"\n | \"x\"\n | \"xAxisId\"\n | \"y\"\n | \"yAxisId\"\n | \"zIndex\"\n >\n> {}\n\nexport const useChartGrid = ({\n horizontal,\n horizontalCoordinatesGenerator,\n horizontalFill,\n horizontalPoints,\n horizontalValues,\n syncWithTicks,\n vertical = false,\n verticalCoordinatesGenerator,\n verticalFill,\n verticalPoints,\n verticalValues,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ...rest\n}: UseChartGridProps = {}) => {\n const getRootProps: PropGetter<\"line\"> = useCallback(\n (props) => ({ ...rest, ...props }),\n [rest],\n )\n\n const getGridProps: PropGetter<CartesianGridProps> = useCallback(\n (props) => ({\n horizontal,\n horizontalCoordinatesGenerator,\n horizontalFill,\n horizontalPoints,\n horizontalValues,\n stroke: \"\",\n syncWithTicks,\n vertical,\n verticalCoordinatesGenerator,\n verticalFill,\n verticalPoints,\n verticalValues,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ...props,\n }),\n [\n horizontal,\n horizontalCoordinatesGenerator,\n horizontalFill,\n horizontalPoints,\n horizontalValues,\n syncWithTicks,\n vertical,\n verticalCoordinatesGenerator,\n verticalFill,\n verticalPoints,\n verticalValues,\n x,\n xAxisId,\n y,\n yAxisId,\n zIndex,\n ],\n )\n\n return { getGridProps, getRootProps }\n}\n\nexport type UseChartGridReturn = ReturnType<typeof useChartGrid>\n"],"mappings":";;;;;;;;AAoCA,MAAa,qBAAqC,EAChD,qBAAqB,MACrB,SACA,MACA,SAAS,cACT,YACA,QACA,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A;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,QAAQ,WAAW,QAAQ,KAAK;GAChC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAEqC;;AAgDxC,MAAa,iBAAiB,EAC5B,MACA,MACA,mBACA,gBAAgB,MAChB,yBACA,OACA,WAAW,OACX,UACA,SACA,QACA,MACA,eACA,UACA,OAAO,YAAY,OACnB,YACA,QACA,aACA,SACA,OACA,UACA,OACA,MAAM,WAAW,MACjB,WACA,eACA,UAAU,eAAe,OACzB,YACA,OACA,UACA,MACA,OACA,SACA,GAAG,SACmB,EAAE,KAAK;CAC7B,MAAM,gCAAiD;AACrD,MAAI,CAAC,SAAU,QAAO;AACtB,wDAAe,SAAS,8BAAmB,SAAS,CAAE,QAAO;AAE7D,SAAO;GAAE,MAAM;GAAI,mDAAa,SAAS,GAAG,WAAW,EAAE;GAAG;IAC3D,CAAC,SAAS,CAAC;CACd,MAAM,oCAAyD;AAC7D,MAAI,CAAC,aAAc,QAAO;AAE1B,SAAO;GACL,MAAM;GACN,QAAQ;GACR,mDAAa,aAAa,GAAG,eAAe,EAAE;GAC/C;IACA,CAAC,aAAa,CAAC;CAClB,MAAM,iCAAmD;AACvD,MAAI,CAAC,UAAW,QAAO;AACvB,wDAAe,UAAU,8BAAmB,UAAU,CAAE,QAAO;AAE/D,SAAO;GACL,OAAO;GACP,MAAM;GACN,QAAQ;GACR,UAAU;GACV,WACE,gBAAgB,QAAQ,qBAAqB;GAC/C,mDAAa,UAAU,GAAG,YAAY,EAAE;GACzC;IACA,CAAC,WAAW,YAAY,CAAC;AAkF5B,QAAO;EAAE,sCA/EN,WAAW;GAAE,GAAG;GAAM,GAAG;GAAO,GACjC,CAAC,KAAK,CACP;EA6EsB,uCA1EpB,QAAQ,EAAE,MAAM;GACf;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,aACE,gBAAgB,QACZ,UACA,gBAAgB,UACd,SACA;GACR;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO,UAAU,QAAQ,KAAK;GAC9B;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAEqC;;AAoCxC,MAAa,gBAAgB,EAC3B,OAAO,YACP,MACA,WAAW,eACX,kBACA,gBACA,mBACA,iBACA,UACA,cACA,MACA,SAAS,aACT,KAAK,SACL,MACA,oBAAoB,OACpB,OAAO,YAAY,OACnB,YACA,OACA,SAAS,IACT,aACA,MACA,SACA,SACA,QACA,gBACA,kBACA,GAAG,SACkB,EAAE,KAAK;CAC5B,MAAM,EAAE,uBAAuBC,mCAAiB;CAChD,MAAM,iCAAkD;AACtD,MAAI,CAAC,UAAW,QAAO;AACvB,wDAAe,UAAU,8BAAmB,UAAU,CAAE,QAAO;AAE/D,SAAO;GACL,MAAM;GACN,QAAQ;GACR,UAAU;GACV,mDAAa,UAAU,GAAG,YAAY,EAAE;GACzC;IACA,CAAC,UAAU,CAAC;CACf,MAAM,+BAA8C;AAClD,MAAI,CAAC,QAAS,QAAO;AACrB,wDAAe,QAAQ,8BAAmB,QAAQ,CAAE,QAAO;AAE3D,SAAO;GAAE,MAAM;GAAI,QAAQ;GAAI,mDAAa,QAAQ,GAAG,UAAU,EAAE;GAAG;IACrE,CAAC,QAAQ,CAAC;CACb,MAAM,qCAA0D;AAC9D,MAAI,CAAC,cAAe,QAAO;AAC3B,wDAAe,cAAc,8BAAmB,cAAc,CAC5D,QAAO;AAET,SAAO;GACL,MAAM;GACN,QAAQ;GACR,mDAAa,cAAc,GAAG,gBAAgB,EAAE;GACjD;IACA,CAAC,cAAc,CAAC;CAEnB,MAAMC,uCACH,WAAW;EAAE,GAAG;EAAM,GAAG;EAAO,GACjC,CAAC,KAAK,CACP;AAoED,QAAO;EAAE,sCAjEN,EAAE,UAAU,aAAa,GAAG,UAAU,EAAE,MAAM;GAC7C;GACA;GACA,+DACE,oDAAa,mBAAmB,IAAI,uBAAuB,QAC5D;GACD,iEACE,oDAAa,mBAAmB,IAAI,uBAAuB,QAC5D;GACD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,aAAa;GACb;GACA;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAEsB;EAAc;;AAsCvC,MAAa,gBAAgB,EAC3B,OAAO,YACP,MACA,WAAW,eACX,gBACA,mBACA,iBACA,UACA,WACA,UACA,cACA,MACA,SAAS,aACT,KAAK,SACL,MACA,oBAAoB,OACpB,OAAO,YAAY,OACnB,YACA,SACA,SAAS,IACT,aACA,MACA,SACA,SACA,QACA,gBACA,kBACA,GAAG,WACoB;CACvB,MAAM,EAAE,uBAAuBD,mCAAiB;CAChD,MAAM,iCAAkD;AACtD,MAAI,CAAC,UAAW,QAAO;AACvB,wDAAe,UAAU,8BAAmB,UAAU,CAAE,QAAO;AAE/D,SAAO;GACL,MAAM;GACN,QAAQ;GACR,UAAU;GACV,mDAAa,UAAU,GAAG,YAAY,EAAE;GACzC;IACA,CAAC,UAAU,CAAC;CACf,MAAM,+BAA8C;AAClD,MAAI,CA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ACN,aAAa;GACb;GACA;GACA;GACA;GACA;GACA,QAAQ;GACR,aAAa;GACb;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAE6B;EAAc;;AA8BhD,MAAa,gBAAgB,EAC3B,YACA,gCACA,gBACA,kBACA,kBACA,eACA,WAAW,OACX,8BACA,cACA,gBACA,gBACA,GACA,SACA,GACA,SACA,QACA,GAAG,SACkB,EAAE,KAAK;CAC5B,MAAMA,uCACH,WAAW;EAAE,GAAG;EAAM,GAAG;EAAO,GACjC,CAAC,KAAK,CACP;AA2CD,QAAO;EAAE,sCAxCN,WAAW;GACV;GACA;GACA;GACA;GACA;GACA,QAAQ;GACR;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACJ,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EAEsB;EAAc"}