@yamada-ui/react 2.1.3-dev-20260312162557 → 2.1.3-dev-20260314005850

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 (265) hide show
  1. package/dist/cjs/components/chart/cartesian-chart.cjs.map +1 -1
  2. package/dist/cjs/components/chart/chart.cjs +1 -1
  3. package/dist/cjs/components/chart/chart.cjs.map +1 -1
  4. package/dist/cjs/components/chart/polar-chart.cjs.map +1 -1
  5. package/dist/cjs/components/chart/use-cartesian-chart.cjs +6 -2
  6. package/dist/cjs/components/chart/use-cartesian-chart.cjs.map +1 -1
  7. package/dist/cjs/components/chart/use-polar-chart.cjs.map +1 -1
  8. package/dist/cjs/core/css/styles.cjs +8 -0
  9. package/dist/cjs/core/css/styles.cjs.map +1 -1
  10. package/dist/cjs/core/system/styled.cjs +1 -1
  11. package/dist/cjs/core/system/styled.cjs.map +1 -1
  12. package/dist/esm/components/chart/cartesian-chart.js.map +1 -1
  13. package/dist/esm/components/chart/chart.js +1 -1
  14. package/dist/esm/components/chart/chart.js.map +1 -1
  15. package/dist/esm/components/chart/polar-chart.js.map +1 -1
  16. package/dist/esm/components/chart/use-cartesian-chart.js +6 -2
  17. package/dist/esm/components/chart/use-cartesian-chart.js.map +1 -1
  18. package/dist/esm/components/chart/use-polar-chart.js.map +1 -1
  19. package/dist/esm/core/css/styles.js +8 -0
  20. package/dist/esm/core/css/styles.js.map +1 -1
  21. package/dist/esm/core/system/styled.js +1 -1
  22. package/dist/esm/core/system/styled.js.map +1 -1
  23. package/dist/types/components/accordion/accordion.d.ts +2 -4
  24. package/dist/types/components/accordion/accordion.style.d.ts +1 -1
  25. package/dist/types/components/accordion/use-accordion.d.ts +11 -11
  26. package/dist/types/components/airy/airy.d.ts +2 -3
  27. package/dist/types/components/alert/alert.d.ts +2 -5
  28. package/dist/types/components/alpha-slider/alpha-slider.d.ts +2 -3
  29. package/dist/types/components/aspect-ratio/aspect-ratio.d.ts +2 -2
  30. package/dist/types/components/autocomplete/autocomplete.d.ts +2 -4
  31. package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
  32. package/dist/types/components/autocomplete/use-autocomplete.d.ts +5 -7
  33. package/dist/types/components/avatar/avatar.d.ts +5 -5
  34. package/dist/types/components/avatar/use-avatar-group.d.ts +2 -2
  35. package/dist/types/components/badge/badge.d.ts +2 -2
  36. package/dist/types/components/bleed/bleed.d.ts +2 -2
  37. package/dist/types/components/blockquote/blockquote.d.ts +2 -2
  38. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  39. package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
  40. package/dist/types/components/breadcrumb/use-breadcrumb.d.ts +2 -2
  41. package/dist/types/components/button/button-group.d.ts +0 -1
  42. package/dist/types/components/button/button.d.ts +2 -3
  43. package/dist/types/components/button/icon-button.d.ts +2 -2
  44. package/dist/types/components/calendar/calendar.d.ts +2 -3
  45. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  46. package/dist/types/components/calendar/use-calendar.d.ts +8 -9
  47. package/dist/types/components/card/card.d.ts +2 -2
  48. package/dist/types/components/carousel/carousel.d.ts +2 -3
  49. package/dist/types/components/carousel/carousel.style.d.ts +2 -2
  50. package/dist/types/components/carousel/use-carousel.d.ts +3 -3
  51. package/dist/types/components/center/center.d.ts +2 -2
  52. package/dist/types/components/chart/area-chart.d.ts +2 -2
  53. package/dist/types/components/chart/bar-chart.d.ts +2 -2
  54. package/dist/types/components/chart/chart.d.ts +5 -5
  55. package/dist/types/components/chart/line-chart.d.ts +2 -2
  56. package/dist/types/components/chart/pie-chart.d.ts +2 -2
  57. package/dist/types/components/chart/radar-chart.d.ts +2 -2
  58. package/dist/types/components/chart/use-cartesian-chart.d.ts +7 -5
  59. package/dist/types/components/chart/use-chart.d.ts +2 -2
  60. package/dist/types/components/chart/use-polar-chart.d.ts +2 -2
  61. package/dist/types/components/checkbox/checkbox-group.d.ts +0 -2
  62. package/dist/types/components/checkbox/checkbox.d.ts +5 -6
  63. package/dist/types/components/checkbox/checkbox.style.d.ts +1 -1
  64. package/dist/types/components/checkbox/use-checkbox-group.d.ts +2 -3
  65. package/dist/types/components/checkbox/use-checkbox.d.ts +0 -1
  66. package/dist/types/components/checkbox-card/checkbox-card-group.d.ts +0 -3
  67. package/dist/types/components/checkbox-card/checkbox-card.d.ts +5 -7
  68. package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
  69. package/dist/types/components/circle-progress/circle-progress.d.ts +2 -3
  70. package/dist/types/components/close-button/close-button.d.ts +2 -3
  71. package/dist/types/components/code/code.d.ts +2 -2
  72. package/dist/types/components/collapse/collapse.d.ts +2 -3
  73. package/dist/types/components/color-picker/color-picker.d.ts +2 -6
  74. package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
  75. package/dist/types/components/color-picker/use-color-picker.d.ts +2 -5
  76. package/dist/types/components/color-selector/color-selector.d.ts +2 -6
  77. package/dist/types/components/color-selector/color-selector.style.d.ts +2 -2
  78. package/dist/types/components/color-selector/use-color-selector.d.ts +3 -5
  79. package/dist/types/components/color-swatch/color-swatch.d.ts +2 -2
  80. package/dist/types/components/container/container.d.ts +2 -2
  81. package/dist/types/components/data-list/data-list.d.ts +2 -2
  82. package/dist/types/components/data-list/data-list.style.d.ts +1 -1
  83. package/dist/types/components/date-picker/date-picker.d.ts +2 -5
  84. package/dist/types/components/date-picker/use-date-picker.d.ts +4 -7
  85. package/dist/types/components/drawer/drawer.d.ts +2 -5
  86. package/dist/types/components/drawer/use-drawer.d.ts +0 -2
  87. package/dist/types/components/dropzone/dropzone.d.ts +4 -7
  88. package/dist/types/components/dropzone/use-dropzone.d.ts +0 -1
  89. package/dist/types/components/editable/editable.d.ts +4 -5
  90. package/dist/types/components/editable/use-editable.d.ts +2 -3
  91. package/dist/types/components/em/em.d.ts +2 -2
  92. package/dist/types/components/empty-state/empty-state.d.ts +2 -2
  93. package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
  94. package/dist/types/components/fade/fade.d.ts +2 -3
  95. package/dist/types/components/fade-scale/fade-scale.d.ts +0 -1
  96. package/dist/types/components/field/field.d.ts +3 -3
  97. package/dist/types/components/field/use-field-props.d.ts +3 -3
  98. package/dist/types/components/fieldset/fieldset.d.ts +3 -4
  99. package/dist/types/components/file-button/file-button.d.ts +2 -4
  100. package/dist/types/components/file-button/use-file-button.d.ts +18 -20
  101. package/dist/types/components/file-input/file-input.d.ts +2 -4
  102. package/dist/types/components/file-input/use-file-input.d.ts +15 -16
  103. package/dist/types/components/flex/flex.d.ts +2 -2
  104. package/dist/types/components/flip/flip.d.ts +4 -5
  105. package/dist/types/components/flip/flip.style.d.ts +1 -1
  106. package/dist/types/components/float/float.d.ts +2 -2
  107. package/dist/types/components/form/form.d.ts +3 -4
  108. package/dist/types/components/format/format-byte.d.ts +4 -4
  109. package/dist/types/components/format/format-date-time.d.ts +4 -4
  110. package/dist/types/components/format/format-number.d.ts +2 -2
  111. package/dist/types/components/format/use-format-byte.d.ts +0 -1
  112. package/dist/types/components/format/use-format-date-time.d.ts +0 -1
  113. package/dist/types/components/format/use-format-number.d.ts +0 -1
  114. package/dist/types/components/grid/grid-item.d.ts +2 -2
  115. package/dist/types/components/grid/grid.d.ts +2 -2
  116. package/dist/types/components/group/group.d.ts +2 -3
  117. package/dist/types/components/group/use-group.d.ts +2 -2
  118. package/dist/types/components/heading/heading.d.ts +2 -2
  119. package/dist/types/components/highlight/highlight.d.ts +0 -2
  120. package/dist/types/components/hue-slider/hue-slider.d.ts +3 -4
  121. package/dist/types/components/icon/icon.d.ts +4 -4
  122. package/dist/types/components/image/image.d.ts +2 -2
  123. package/dist/types/components/indicator/indicator.d.ts +4 -5
  124. package/dist/types/components/infinite-scroll-area/infinite-scroll-area.d.ts +2 -2
  125. package/dist/types/components/infinite-scroll-area/infinite-scroll-area.style.d.ts +2 -2
  126. package/dist/types/components/input/input-addon.d.ts +2 -2
  127. package/dist/types/components/input/input-element.d.ts +2 -2
  128. package/dist/types/components/input/input-group.d.ts +0 -2
  129. package/dist/types/components/input/input.d.ts +2 -3
  130. package/dist/types/components/kbd/kbd.d.ts +2 -2
  131. package/dist/types/components/link/link.d.ts +2 -2
  132. package/dist/types/components/link-box/link-box.d.ts +2 -2
  133. package/dist/types/components/list/list.d.ts +2 -2
  134. package/dist/types/components/list/list.style.d.ts +2 -2
  135. package/dist/types/components/loading/loading-provider.d.ts +2 -2
  136. package/dist/types/components/loading/loading.d.ts +3 -4
  137. package/dist/types/components/loading/use-loading-component.d.ts +0 -1
  138. package/dist/types/components/mark/mark.d.ts +2 -2
  139. package/dist/types/components/menu/menu.d.ts +2 -3
  140. package/dist/types/components/menu/menu.style.d.ts +2 -2
  141. package/dist/types/components/menu/use-menu.d.ts +11 -11
  142. package/dist/types/components/modal/modal.d.ts +2 -6
  143. package/dist/types/components/native-accordion/native-accordion.d.ts +2 -2
  144. package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
  145. package/dist/types/components/native-accordion/use-native-accordion.d.ts +2 -2
  146. package/dist/types/components/native-popover/native-popover.d.ts +2 -2
  147. package/dist/types/components/native-select/native-select.d.ts +2 -4
  148. package/dist/types/components/native-select/use-native-select.d.ts +0 -1
  149. package/dist/types/components/native-table/native-table.d.ts +4 -4
  150. package/dist/types/components/notice/notice.style.d.ts +1 -1
  151. package/dist/types/components/notice/use-notice.d.ts +0 -3
  152. package/dist/types/components/number-input/number-input.d.ts +2 -3
  153. package/dist/types/components/number-input/number-input.style.d.ts +1 -1
  154. package/dist/types/components/number-input/use-number-input.d.ts +0 -1
  155. package/dist/types/components/pagination/pagination.d.ts +2 -3
  156. package/dist/types/components/pagination/pagination.style.d.ts +1 -1
  157. package/dist/types/components/pagination/use-pagination.d.ts +2 -2
  158. package/dist/types/components/password-input/password-input.d.ts +2 -3
  159. package/dist/types/components/password-input/strength-meter.style.d.ts +1 -1
  160. package/dist/types/components/password-input/use-password-input.d.ts +2 -3
  161. package/dist/types/components/picture/picture.d.ts +0 -1
  162. package/dist/types/components/pin-input/pin-input.d.ts +2 -4
  163. package/dist/types/components/pin-input/use-pin-input.d.ts +7 -8
  164. package/dist/types/components/popover/popover.d.ts +2 -3
  165. package/dist/types/components/progress/progress.d.ts +4 -4
  166. package/dist/types/components/progress/use-progress.d.ts +706 -706
  167. package/dist/types/components/qr-code/qr-code.d.ts +2 -2
  168. package/dist/types/components/radio/radio-group.d.ts +0 -2
  169. package/dist/types/components/radio/radio.d.ts +5 -6
  170. package/dist/types/components/radio/radio.style.d.ts +1 -1
  171. package/dist/types/components/radio/use-radio-group.d.ts +2 -3
  172. package/dist/types/components/radio/use-radio.d.ts +0 -1
  173. package/dist/types/components/radio-card/radio-card-group.d.ts +0 -3
  174. package/dist/types/components/radio-card/radio-card.d.ts +5 -7
  175. package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
  176. package/dist/types/components/rating/rating.style.d.ts +2 -2
  177. package/dist/types/components/rating/use-rating.d.ts +7 -8
  178. package/dist/types/components/reorder/reorder.d.ts +2 -3
  179. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  180. package/dist/types/components/reorder/use-reorder.d.ts +3 -3
  181. package/dist/types/components/resizable/resizable.d.ts +2 -2
  182. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  183. package/dist/types/components/resizable/use-resizable.d.ts +2 -2
  184. package/dist/types/components/ripple/ripple.d.ts +2 -3
  185. package/dist/types/components/ripple/use-ripple.d.ts +2 -2
  186. package/dist/types/components/rotate/rotate.d.ts +2 -3
  187. package/dist/types/components/saturation-slider/saturation-slider.d.ts +2 -2
  188. package/dist/types/components/saturation-slider/use-saturation-slider.d.ts +2 -3
  189. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  190. package/dist/types/components/segmented-control/segmented-control.d.ts +2 -3
  191. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  192. package/dist/types/components/segmented-control/use-segmented-control.d.ts +9 -10
  193. package/dist/types/components/select/select.d.ts +2 -4
  194. package/dist/types/components/select/select.style.d.ts +1 -1
  195. package/dist/types/components/select/use-select.d.ts +4 -6
  196. package/dist/types/components/separator/separator.d.ts +2 -2
  197. package/dist/types/components/simple-grid/simple-grid.d.ts +2 -3
  198. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  199. package/dist/types/components/slide/slide.d.ts +2 -3
  200. package/dist/types/components/slide-fade/slide-fade.d.ts +2 -3
  201. package/dist/types/components/slider/slider.d.ts +2 -2
  202. package/dist/types/components/slider/use-slider.d.ts +2 -3
  203. package/dist/types/components/snacks/snacks.d.ts +0 -2
  204. package/dist/types/components/snacks/use-snacks.d.ts +0 -1
  205. package/dist/types/components/stack/h-stack.d.ts +2 -2
  206. package/dist/types/components/stack/stack.d.ts +2 -2
  207. package/dist/types/components/stack/v-stack.d.ts +2 -2
  208. package/dist/types/components/stack/z-stack.d.ts +2 -2
  209. package/dist/types/components/stat/stat.d.ts +2 -2
  210. package/dist/types/components/status/status.d.ts +2 -2
  211. package/dist/types/components/status/status.style.d.ts +2 -2
  212. package/dist/types/components/steps/steps.d.ts +2 -2
  213. package/dist/types/components/steps/steps.style.d.ts +1 -1
  214. package/dist/types/components/steps/use-steps.d.ts +10 -10
  215. package/dist/types/components/switch/switch.d.ts +2 -2
  216. package/dist/types/components/switch/use-switch.d.ts +0 -1
  217. package/dist/types/components/table/table.d.ts +2 -4
  218. package/dist/types/components/tabs/use-tabs.d.ts +16 -16
  219. package/dist/types/components/tag/tag.d.ts +2 -2
  220. package/dist/types/components/tag/tag.style.d.ts +1 -1
  221. package/dist/types/components/text/text.d.ts +2 -2
  222. package/dist/types/components/textarea/textarea.d.ts +2 -4
  223. package/dist/types/components/textarea/use-autosize.d.ts +2 -2
  224. package/dist/types/components/timeline/timeline.d.ts +5 -5
  225. package/dist/types/components/timeline/timeline.style.d.ts +2 -2
  226. package/dist/types/components/tip/tip.d.ts +0 -2
  227. package/dist/types/components/toggle/toggle-group.d.ts +1 -1
  228. package/dist/types/components/toggle/toggle.d.ts +5 -7
  229. package/dist/types/components/toggle/use-toggle-group.d.ts +2 -2
  230. package/dist/types/components/toggle/use-toggle.d.ts +2 -3
  231. package/dist/types/components/tooltip/tooltip.d.ts +2 -4
  232. package/dist/types/components/visually-hidden/visually-hidden.d.ts +2 -2
  233. package/dist/types/components/wrap/wrap.d.ts +2 -3
  234. package/dist/types/core/components/create-component.d.ts +10 -8
  235. package/dist/types/core/components/index.types.d.ts +1 -0
  236. package/dist/types/core/components/use-component-style.d.ts +2 -0
  237. package/dist/types/core/components/utils.d.ts +1 -0
  238. package/dist/types/core/constant.d.ts +1 -0
  239. package/dist/types/core/css/calc.d.ts +1 -0
  240. package/dist/types/core/css/config.d.ts +1 -0
  241. package/dist/types/core/css/css.d.ts +1 -0
  242. package/dist/types/core/css/index.types.d.ts +1 -0
  243. package/dist/types/core/css/styles.d.ts +112 -15
  244. package/dist/types/core/css/token.d.ts +1 -0
  245. package/dist/types/core/css/use-css.d.ts +1 -0
  246. package/dist/types/core/css/utils.d.ts +2 -0
  247. package/dist/types/core/generated-theme-tokens.types.d.ts +1 -0
  248. package/dist/types/core/index.d.ts +2 -0
  249. package/dist/types/core/system/color-mode-provider.d.ts +2 -2
  250. package/dist/types/core/system/config.d.ts +1 -0
  251. package/dist/types/core/system/create-system.d.ts +1 -0
  252. package/dist/types/core/system/factory.d.ts +1 -0
  253. package/dist/types/core/system/index.types.d.ts +1 -0
  254. package/dist/types/core/system/storage-script.d.ts +3 -3
  255. package/dist/types/core/system/styled.d.ts +3 -2
  256. package/dist/types/core/system/system-provider.d.ts +2 -2
  257. package/dist/types/core/system/var.d.ts +2 -0
  258. package/dist/types/hooks/use-async-callback/index.d.ts +0 -1
  259. package/dist/types/hooks/use-breakpoint/use-breakpoint-state.d.ts +2 -2
  260. package/dist/types/hooks/use-combobox/index.d.ts +0 -1
  261. package/dist/types/index.d.ts +0 -103
  262. package/dist/types/providers/i18n-provider/i18n-provider.d.ts +3 -3
  263. package/dist/types/providers/ui-provider/ui-provider.d.ts +2 -3
  264. package/dist/types/utils/children.d.ts +2 -2
  265. package/package.json +8 -8
@@ -30,7 +30,7 @@ const Insertion = ({ cache, htmlTag, serialized }) => {
30
30
  let className = serialized.name;
31
31
  let next = serialized.next;
32
32
  while (next !== void 0) {
33
- className = (0, require_utils_index.utils_exports.cx)(className, next.name);
33
+ className = (0, require_utils_index.utils_exports.cx)(className, next.name) ?? "";
34
34
  next = next.next;
35
35
  }
36
36
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", {
@@ -1 +1 @@
1
- {"version":3,"file":"styled.cjs","names":["Insertion: FC<InsertionProps>","createContext","getDisplayName","createShouldForwardProp","props","className: string | undefined","useSystem","useTheme","useComponentStyle","forwardProps","css","colorScheme","Slot"],"sources":["../../../../src/core/system/styled.tsx"],"sourcesContent":["\"use client\"\n\nimport type { EmotionCache, SerializedStyles } from \"@emotion/utils\"\nimport type { FC } from \"react\"\nimport type { Dict } from \"../../utils\"\nimport type { As, ShouldForwardProp, StyledComponent } from \"../components\"\nimport type { CSSModifierObject, CSSPropObject } from \"../css\"\nimport type {\n ColorScheme,\n ComponentStyle,\n System,\n UsageTheme,\n} from \"./index.types\"\nimport { withEmotionCache } from \"@emotion/react\"\nimport { serializeStyles } from \"@emotion/serialize\"\nimport { useInsertionEffectAlwaysWithSyncFallback } from \"@emotion/use-insertion-effect-with-fallbacks\"\nimport {\n getRegisteredStyles,\n insertStyles,\n registerStyles,\n} from \"@emotion/utils\"\nimport { useMemo, useRef } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport { Slot } from \"../../components/slot\"\nimport {\n createContext,\n createdDom,\n cx,\n filterEmpty,\n filterUndefined,\n isString,\n isUndefined,\n runIfFn,\n splitObject,\n toArray,\n toKebabCase,\n} from \"../../utils\"\nimport {\n createShouldForwardProp,\n getDisplayName,\n useComponentStyle,\n} from \"../components\"\nimport { css } from \"../css\"\nimport { useSystem } from \"./system-provider\"\nimport { useTheme } from \"./theme-provider\"\n\ninterface InsertionProps {\n cache: EmotionCache\n htmlTag: boolean\n serialized: SerializedStyles\n}\n\nconst Insertion: FC<InsertionProps> = ({ cache, htmlTag, serialized }) => {\n registerStyles(cache, serialized, htmlTag)\n\n const style = useInsertionEffectAlwaysWithSyncFallback(() =>\n insertStyles(cache, serialized, htmlTag),\n )\n\n if (!createdDom() && !isUndefined(style)) {\n let className = serialized.name\n let next = serialized.next\n\n while (next !== undefined) {\n className = cx(className, next.name)\n next = next.next\n }\n\n return (\n <style\n data-emotion={cx(cache.key, className)}\n dangerouslySetInnerHTML={{ __html: style }}\n nonce={cache.sheet.nonce}\n />\n )\n } else {\n return null\n }\n}\n\nconst useSplitProps = <Y extends Dict, M extends Dict>(\n props: Dict,\n shouldForwardProp?: ShouldForwardProp,\n) => {\n const propsRef = useRef(props)\n\n if (!isEqual(propsRef.current, props)) propsRef.current = props\n\n const computedProps = propsRef.current\n\n return useMemo(\n () => splitObject<Y, M>(computedProps, shouldForwardProp),\n [computedProps, shouldForwardProp],\n )\n}\n\nexport const [ColorSchemeContext, useColorSchemeContext] =\n createContext<ColorScheme>({\n name: \"ColorSchemeContext\",\n strict: false,\n })\n\nexport interface StyledOptions<\n Y extends CSSPropObject = CSSPropObject,\n M extends CSSModifierObject = CSSModifierObject,\n D extends CSSModifierObject = CSSModifierObject,\n H extends number | string | symbol = string,\n> extends Omit<ComponentStyle<Y, M, D>, \"className\"> {\n className?: ((system: System) => string) | string\n displayName?: string\n forwardAsChild?: boolean\n name?: string\n shouldForwardProp?: boolean | ShouldForwardProp\n target?: string\n forwardProps?: string[]\n transferProps?: H[]\n}\n\nexport function createStyled<\n Y extends As,\n M extends object = {},\n D extends CSSPropObject = CSSPropObject,\n H extends CSSModifierObject = CSSModifierObject,\n R extends CSSModifierObject = CSSModifierObject,\n>(\n el: Y,\n {\n name,\n base,\n compounds,\n props,\n sizes,\n variants,\n defaultProps,\n transferProps,\n ...options\n }: StyledOptions<D, H, R, keyof M> = {},\n) {\n const displayName = options.displayName ?? getDisplayName(name, \"\")\n const shouldForwardProp = !options.shouldForwardProp\n ? createShouldForwardProp(options.forwardProps)\n : undefined\n const style = filterUndefined({\n base,\n compounds,\n props,\n sizes,\n variants,\n defaultProps,\n })\n\n const StyledComponent = withEmotionCache<Dict>(function (\n { as: Component = el, asChild, children, ...props },\n cache,\n ref,\n ) {\n let className: string | undefined = \"\"\n\n const system = useSystem()\n const { theme } = useTheme<UsageTheme>()\n const componentStyleOptions = {\n name,\n className: system.utils.getClassName(\n runIfFn(options.className, system) ?? toKebabCase(name ?? \"\"),\n ),\n style,\n transferProps,\n }\n const registered = useRef<string[]>([])\n const htmlTag = isString(Component)\n const forwardAsChild =\n options.forwardAsChild || options.forwardProps?.includes(\"asChild\")\n const [omittedProps, styleProps] = useSplitProps(props, shouldForwardProp)\n const [, rest] = useComponentStyle<any, {}>(\n omittedProps,\n componentStyleOptions,\n )\n const [cssArray, colorScheme, forwardProps] = useMemo(() => {\n const { css, colorScheme, ...forwardProps } = rest\n\n return [toArray(css), colorScheme, forwardProps]\n }, [rest])\n\n styleProps.colorScheme ??= colorScheme\n\n if (forwardProps.className)\n className = getRegisteredStyles(\n cache.registered,\n registered.current,\n forwardProps.className,\n ).trim()\n\n const interpolations = useMemo(\n () => [\n ...registered.current,\n ...filterEmpty([...cssArray, styleProps].map(css(system, theme))),\n ],\n [cssArray, system, styleProps, theme],\n )\n\n const serialized = useMemo(\n () => serializeStyles(interpolations, cache.registered),\n [interpolations, cache.registered],\n )\n\n className = cx(\n className,\n !!serialized.styles ? `${cache.key}-${serialized.name}` : undefined,\n )\n className = cx(className, options.target)\n\n if (!className) className = undefined\n\n const mergedProps = { ...forwardProps, className, children }\n\n return (\n <ColorSchemeContext value={styleProps.colorScheme}>\n <Insertion cache={cache} htmlTag={htmlTag} serialized={serialized} />\n\n {asChild && !forwardAsChild ? (\n <Slot ref={ref} {...mergedProps} />\n ) : (\n <Component ref={ref} {...mergedProps} />\n )}\n </ColorSchemeContext>\n )\n }) as StyledComponent<Y, M>\n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gB,cAAc,eAAe;AAE7C,QAAO"}
1
+ {"version":3,"file":"styled.cjs","names":["Insertion: FC<InsertionProps>","createContext","getDisplayName","createShouldForwardProp","props","className: string | undefined","useSystem","useTheme","useComponentStyle","forwardProps","css","colorScheme","Slot"],"sources":["../../../../src/core/system/styled.tsx"],"sourcesContent":["\"use client\"\n\nimport type { EmotionCache, SerializedStyles } from \"@emotion/utils\"\nimport type { FC } from \"react\"\nimport type { Dict } from \"../../utils\"\nimport type { As, ShouldForwardProp, StyledComponent } from \"../components\"\nimport type { CSSModifierObject, CSSPropObject } from \"../css\"\nimport type {\n ColorScheme,\n ComponentStyle,\n System,\n UsageTheme,\n} from \"./index.types\"\nimport { withEmotionCache } from \"@emotion/react\"\nimport { serializeStyles } from \"@emotion/serialize\"\nimport { useInsertionEffectAlwaysWithSyncFallback } from \"@emotion/use-insertion-effect-with-fallbacks\"\nimport {\n getRegisteredStyles,\n insertStyles,\n registerStyles,\n} from \"@emotion/utils\"\nimport { useMemo, useRef } from \"react\"\nimport isEqual from \"react-fast-compare\"\nimport { Slot } from \"../../components/slot\"\nimport {\n createContext,\n createdDom,\n cx,\n filterEmpty,\n filterUndefined,\n isString,\n isUndefined,\n runIfFn,\n splitObject,\n toArray,\n toKebabCase,\n} from \"../../utils\"\nimport {\n createShouldForwardProp,\n getDisplayName,\n useComponentStyle,\n} from \"../components\"\nimport { css } from \"../css\"\nimport { useSystem } from \"./system-provider\"\nimport { useTheme } from \"./theme-provider\"\n\ninterface InsertionProps {\n cache: EmotionCache\n htmlTag: boolean\n serialized: SerializedStyles\n}\n\nconst Insertion: FC<InsertionProps> = ({ cache, htmlTag, serialized }) => {\n registerStyles(cache, serialized, htmlTag)\n\n const style = useInsertionEffectAlwaysWithSyncFallback(() =>\n insertStyles(cache, serialized, htmlTag),\n )\n\n if (!createdDom() && !isUndefined(style)) {\n let className = serialized.name\n let next = serialized.next\n\n while (next !== undefined) {\n className = cx(className, next.name) ?? \"\"\n next = next.next\n }\n\n return (\n <style\n data-emotion={cx(cache.key, className)}\n dangerouslySetInnerHTML={{ __html: style }}\n nonce={cache.sheet.nonce}\n />\n )\n } else {\n return null\n }\n}\n\nconst useSplitProps = <Y extends Dict, M extends Dict>(\n props: Dict,\n shouldForwardProp?: ShouldForwardProp,\n) => {\n const propsRef = useRef(props)\n\n if (!isEqual(propsRef.current, props)) propsRef.current = props\n\n const computedProps = propsRef.current\n\n return useMemo(\n () => splitObject<Y, M>(computedProps, shouldForwardProp),\n [computedProps, shouldForwardProp],\n )\n}\n\nexport const [ColorSchemeContext, useColorSchemeContext] =\n createContext<ColorScheme>({\n name: \"ColorSchemeContext\",\n strict: false,\n })\n\nexport interface StyledOptions<\n Y extends CSSPropObject = CSSPropObject,\n M extends CSSModifierObject = CSSModifierObject,\n D extends CSSModifierObject = CSSModifierObject,\n H extends number | string | symbol = string,\n> extends Omit<ComponentStyle<Y, M, D>, \"className\"> {\n className?: ((system: System) => string) | string\n displayName?: string\n forwardAsChild?: boolean\n name?: string\n shouldForwardProp?: boolean | ShouldForwardProp\n target?: string\n forwardProps?: string[]\n transferProps?: H[]\n}\n\nexport function createStyled<\n Y extends As,\n M extends object = {},\n D extends CSSPropObject = CSSPropObject,\n H extends CSSModifierObject = CSSModifierObject,\n R extends CSSModifierObject = CSSModifierObject,\n>(\n el: Y,\n {\n name,\n base,\n compounds,\n props,\n sizes,\n variants,\n defaultProps,\n transferProps,\n ...options\n }: StyledOptions<D, H, R, keyof M> = {},\n) {\n const displayName = options.displayName ?? getDisplayName(name, \"\")\n const shouldForwardProp = !options.shouldForwardProp\n ? createShouldForwardProp(options.forwardProps)\n : undefined\n const style = filterUndefined({\n base,\n compounds,\n props,\n sizes,\n variants,\n defaultProps,\n })\n\n const StyledComponent = withEmotionCache<Dict>(function (\n { as: Component = el, asChild, children, ...props },\n cache,\n ref,\n ) {\n let className: string | undefined = \"\"\n\n const system = useSystem()\n const { theme } = useTheme<UsageTheme>()\n const componentStyleOptions = {\n name,\n className: system.utils.getClassName(\n runIfFn(options.className, system) ?? toKebabCase(name ?? \"\"),\n ),\n style,\n transferProps,\n }\n const registered = useRef<string[]>([])\n const htmlTag = isString(Component)\n const forwardAsChild =\n options.forwardAsChild || options.forwardProps?.includes(\"asChild\")\n const [omittedProps, styleProps] = useSplitProps(props, shouldForwardProp)\n const [, rest] = useComponentStyle<any, {}>(\n omittedProps,\n componentStyleOptions,\n )\n const [cssArray, colorScheme, forwardProps] = useMemo(() => {\n const { css, colorScheme, ...forwardProps } = rest\n\n return [toArray(css), colorScheme, forwardProps]\n }, [rest])\n\n styleProps.colorScheme ??= colorScheme\n\n if (forwardProps.className)\n className = getRegisteredStyles(\n cache.registered,\n registered.current,\n forwardProps.className,\n ).trim()\n\n const interpolations = useMemo(\n () => [\n ...registered.current,\n ...filterEmpty([...cssArray, styleProps].map(css(system, theme))),\n ],\n [cssArray, system, styleProps, theme],\n )\n\n const serialized = useMemo(\n () => serializeStyles(interpolations, cache.registered),\n [interpolations, cache.registered],\n )\n\n className = cx(\n className,\n !!serialized.styles ? `${cache.key}-${serialized.name}` : undefined,\n )\n className = cx(className, options.target)\n\n if (!className) className = undefined\n\n const mergedProps = { ...forwardProps, className, children }\n\n return (\n <ColorSchemeContext value={styleProps.colorScheme}>\n <Insertion cache={cache} htmlTag={htmlTag} serialized={serialized} />\n\n {asChild && !forwardAsChild ? (\n <Slot ref={ref} {...mergedProps} />\n ) : (\n <Component ref={ref} {...mergedProps} />\n )}\n </ColorSchemeContext>\n )\n }) as StyledComponent<Y, M>\n\n StyledComponent.displayName = displayName || \"StyledComponent\"\n\n return StyledComponent\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAMA,aAAiC,EAAE,OAAO,SAAS,iBAAiB;AACxE,oCAAe,OAAO,YAAY,QAAQ;CAE1C,MAAM,0IACS,OAAO,YAAY,QAAQ,CACzC;AAED,KAAI,oDAAa,IAAI,oDAAa,MAAM,EAAE;EACxC,IAAI,YAAY,WAAW;EAC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cH,SAAO,kBAAkB;EAC1E,MAAM,GAAG,QAAQI,8CACf,cACA,sBACD;EACD,MAAM,CAAC,UAAU,aAAa,yCAA8B;GAC1D,MAAM,EAAE,YAAK,4BAAa,GAAGC,mBAAiB;AAE9C,UAAO;mDAASC,MAAI;IAAEC;IAAaF;IAAa;KAC/C,CAAC,KAAK,CAAC;AAEV,aAAW,gBAAgB;AAE3B,MAAI,aAAa,UACf,qDACE,MAAM,YACN,WAAW,SACX,aAAa,UACd,CAAC,MAAM;EAEV,MAAM,0CACE,CACJ,GAAG,WAAW,SACd,sDAAe,CAAC,GAAG,UAAU,WAAW,CAAC,IAAIC,gBAAI,QAAQ,MAAM,CAAC,CAAC,CAClE,EACD;GAAC;GAAU;GAAQ;GAAY;GAAM,CACtC;EAED,MAAM,8EACkB,gBAAgB,MAAM,WAAW,EACvD,CAAC,gBAAgB,MAAM,WAAW,CACnC;AAED,wDACE,WACA,CAAC,CAAC,WAAW,SAAS,GAAG,MAAM,IAAI,GAAG,WAAW,SAAS,OAC3D;AACD,wDAAe,WAAW,QAAQ,OAAO;AAEzC,MAAI,CAAC,UAAW,aAAY;EAE5B,MAAM,cAAc;GAAE,GAAG;GAAc;GAAW;GAAU;AAE5D,SACE,4CAAC;GAAmB,OAAO,WAAW;cACpC,2CAAC;IAAiB;IAAgB;IAAqB;KAAc,EAEpE,WAAW,CAAC,iBACX,2CAACE;IAAU;IAAK,GAAI;KAAe,GAEnC,2CAAC;IAAe;IAAK,GAAI;KAAe;IAEvB;GAEvB;AAEF,iBAAgB,cAAc,eAAe;AAE7C,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"cartesian-chart.js","names":["props"],"sources":["../../../../src/components/chart/cartesian-chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n ActiveDotProps,\n DotProps,\n LabelListProps,\n LabelProps,\n} from \"recharts\"\nimport type {\n CartesianChartProps as OriginalCartesianChartProps,\n XAxisTickContentProps,\n YAxisTickContentProps,\n} 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 { CartesianChartStyle } from \"./cartesian-chart.style\"\nimport type {\n ChartActiveDot,\n ChartDot,\n ChartLabel,\n ChartLabelList,\n ChartProps,\n ChartTickLine,\n} from \"./chart\"\nimport type {\n UseCartesianChartProps,\n UseChartAreaProps,\n UseChartBarProps,\n UseChartGridProps,\n UseChartLineProps,\n UseChartReferenceLineProps,\n UseChartXAxisProps,\n UseChartYAxisProps,\n} from \"./use-cartesian-chart\"\nimport { cloneElement, isValidElement, useId, useMemo } from \"react\"\nimport {\n Area,\n Bar,\n CartesianGrid,\n Line,\n ReferenceLine,\n XAxis,\n YAxis,\n} from \"recharts\"\nimport {\n createShouldForwardProp,\n createSlotComponent,\n getCSS,\n styled,\n useSystem,\n useTheme,\n varAttr,\n} from \"../../core\"\nimport { cx, isFunction, isObject, splitObject } from \"../../utils\"\nimport { cartesianChartStyle } from \"./cartesian-chart.style\"\nimport { Chart } from \"./chart\"\nimport {\n useCartesianChart,\n useChartArea,\n useChartBar,\n useChartGrid,\n useChartLine,\n useChartReferenceLine,\n useChartXAxis,\n useChartYAxis,\n} from \"./use-cartesian-chart\"\n\nconst shouldForwardProp = createShouldForwardProp()\n\ninterface ComponentContext extends Pick<\n CartesianChartProps,\n | \"areaProps\"\n | \"barProps\"\n | \"gridProps\"\n | \"lineProps\"\n | \"referenceLineProps\"\n | \"xAxisProps\"\n | \"yAxisProps\"\n> {}\n\nexport interface CartesianChartProps<Y extends Dict = Dict>\n extends\n ChartProps,\n UseCartesianChartProps<Y>,\n ThemeProps<CartesianChartStyle> {\n /**\n * The fill color of the active dots.\n */\n activeDotFill?: CSSProps[\"fill\"]\n /**\n * The radius of the active dots.\n */\n activeDotRadius?: CSSProps[\"r\"]\n /**\n * The stroke color of the active dots.\n */\n activeDotStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the active dots.\n */\n activeDotStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The fill opacity of the area end.\n */\n areaEndFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The fill opacity of the area.\n */\n areaFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The fill opacity of the area start.\n */\n areaStartFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The color of the bars.\n */\n barColor?: CSSProps[\"color\"]\n /**\n * The fill color of the bars.\n */\n barFill?: CSSProps[\"fill\"]\n /**\n * The fill opacity of the bars.\n */\n barFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The stroke color of the bars.\n */\n barStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the bars.\n */\n barStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The fill color of the dots.\n */\n dotFill?: CSSProps[\"fill\"]\n /**\n * The radius of the dots.\n */\n dotRadius?: CSSProps[\"r\"]\n /**\n * The stroke color of the dots.\n */\n dotStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the dots.\n */\n dotStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The stroke color of the grid.\n */\n gridStroke?: CSSProps[\"stroke\"]\n /**\n * The opacity of the inactive bars.\n */\n inactiveBarOpacity?: CSSProps[\"opacity\"]\n /**\n * The opacity of the inactive lines.\n */\n inactiveLineOpacity?: CSSProps[\"opacity\"]\n /**\n * The color of the lines.\n */\n lineColor?: CSSProps[\"color\"]\n /**\n * The stroke color of the lines.\n */\n lineStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the lines.\n */\n lineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The color of the reference lines.\n */\n referenceLineColor?: CSSProps[\"color\"]\n /**\n * The stroke color of the reference lines.\n */\n referenceLineStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the reference lines.\n */\n referenceLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The text color of the reference lines.\n */\n referenceLineTextColor?: CSSProps[\"color\"]\n /**\n * The text fill color of the reference lines.\n */\n referenceLineTextFill?: CSSProps[\"fill\"]\n /**\n * If `true`, grid is visible.\n *\n * @default true\n */\n withGrid?: boolean\n /**\n * If `true`, X axis is visible.\n *\n * @default true\n */\n withXAxis?: boolean\n /**\n * If `true`, Y axis is visible.\n *\n * @default false\n */\n withYAxis?: boolean\n /**\n * The stroke color of the x-axis lines.\n */\n xAxisLineStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the x-axis lines.\n */\n xAxisLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The text color of the x-axis.\n */\n xAxisTextColor?: CSSProps[\"color\"]\n /**\n * The text fill color of the x-axis.\n */\n xAxisTextFill?: CSSProps[\"fill\"]\n /**\n * The stroke color of the y-axis lines.\n */\n yAxisLineStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the y-axis lines.\n */\n yAxisLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The text color of the y-axis.\n */\n yAxisTextColor?: CSSProps[\"color\"]\n /**\n * The text fill color of the y-axis.\n */\n yAxisTextFill?: CSSProps[\"fill\"]\n /**\n * Props for the area component.\n */\n areaProps?: Omit<ChartAreaProps, \"data\" | \"dataKey\">\n /**\n * Props for the bar component.\n */\n barProps?: Omit<ChartBarProps, \"dataKey\">\n /**\n * Props for the line chart component.\n */\n chartProps?: Omit<OriginalCartesianChartProps, \"data\">\n /**\n * Props for the grid component.\n */\n gridProps?: ChartGridProps\n /**\n * Props for the line component.\n */\n lineProps?: Omit<ChartLineProps, \"data\" | \"dataKey\">\n /**\n * Props for the reference line component.\n */\n referenceLineProps?: ChartReferenceLineProps\n /**\n * Props for the x axis component.\n */\n xAxisProps?: ChartXAxisProps\n /**\n * Props for the y axis component.\n */\n yAxisProps?: ChartYAxisProps\n}\n\nconst {\n ComponentContext,\n PropsContext: CartesianChartPropsContext,\n useComponentContext,\n usePropsContext: useCartesianChartPropsContext,\n withContext,\n withProvider,\n useSlotComponentProps,\n} = createSlotComponent<\n CartesianChartProps,\n CartesianChartStyle,\n ComponentContext\n>(\"cartesian-chart\", cartesianChartStyle)\n\nexport { CartesianChartPropsContext, useCartesianChartPropsContext }\n\nexport const CartesianChart = withProvider(\n <Y extends Dict = Dict>({\n components: componentsProp,\n render,\n withGrid = true,\n withXAxis = true,\n withYAxis = false,\n areaProps,\n barProps,\n chartProps,\n gridProps,\n lineProps,\n referenceLineProps,\n xAxisProps,\n yAxisProps,\n ...rest\n }: CartesianChartProps<Y>) => {\n const { getChartProps, getRootProps } = useCartesianChart(rest)\n const components = useMemo(\n () => [\n {\n component: ChartGrid,\n fallback: withGrid ? <ChartGrid /> : null,\n },\n {\n component: ChartXAxis,\n fallback: <ChartXAxis hide={!withXAxis} />,\n },\n {\n component: ChartYAxis,\n fallback: <ChartYAxis hide={!withYAxis} />,\n },\n ...componentsProp,\n ],\n [componentsProp, withGrid, withXAxis, withYAxis],\n )\n const componentContext = useMemo(\n () => ({\n areaProps,\n barProps,\n gridProps,\n lineProps,\n referenceLineProps,\n xAxisProps,\n yAxisProps,\n }),\n [\n areaProps,\n barProps,\n gridProps,\n lineProps,\n referenceLineProps,\n xAxisProps,\n yAxisProps,\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 areaEndFillOpacity,\n areaFillOpacity,\n areaStartFillOpacity,\n barColor,\n barFill,\n barFillOpacity,\n barStroke,\n barStrokeWidth,\n dotFill,\n dotRadius,\n dotStroke,\n dotStrokeWidth,\n gridStroke,\n inactiveBarOpacity,\n inactiveLineOpacity,\n lineColor,\n lineStroke,\n lineStrokeWidth,\n referenceLineColor,\n referenceLineStroke,\n referenceLineStrokeWidth,\n referenceLineTextColor,\n referenceLineTextFill,\n xAxisLineStroke,\n xAxisLineStrokeWidth,\n xAxisTextColor,\n xAxisTextFill,\n yAxisLineStroke,\n yAxisLineStrokeWidth,\n yAxisTextColor,\n yAxisTextFill,\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 \"--area-end-fill-opacity\": areaEndFillOpacity,\n \"--area-fill-opacity\": areaFillOpacity,\n \"--area-start-fill-opacity\": areaStartFillOpacity,\n \"--bar-color\": varAttr(barColor, \"colors\"),\n \"--bar-fill\": varAttr(barFill, \"colors\"),\n \"--bar-fill-opacity\": barFillOpacity,\n \"--bar-stroke\": varAttr(barStroke, \"colors\"),\n \"--bar-stroke-width\": barStrokeWidth,\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-bar-opacity\": inactiveBarOpacity,\n \"--inactive-line-opacity\": inactiveLineOpacity,\n \"--line-color\": varAttr(lineColor, \"colors\"),\n \"--line-stroke\": varAttr(lineStroke, \"colors\"),\n \"--line-stroke-width\": lineStrokeWidth,\n \"--reference-line-color\": varAttr(referenceLineColor, \"colors\"),\n \"--reference-line-stroke\": varAttr(referenceLineStroke, \"colors\"),\n \"--reference-line-stroke-width\": referenceLineStrokeWidth,\n \"--reference-line-text-color\": varAttr(referenceLineTextColor, \"colors\"),\n \"--reference-line-text-fill\": varAttr(referenceLineTextFill, \"colors\"),\n \"--x-axis-line-stroke\": varAttr(xAxisLineStroke, \"colors\"),\n \"--x-axis-line-stroke-width\": xAxisLineStrokeWidth,\n \"--x-axis-text-color\": varAttr(xAxisTextColor, \"colors\"),\n \"--x-axis-text-fill\": varAttr(xAxisTextFill, \"colors\"),\n \"--y-axis-line-stroke\": varAttr(yAxisLineStroke, \"colors\"),\n \"--y-axis-line-stroke-width\": yAxisLineStrokeWidth,\n \"--y-axis-text-color\": varAttr(yAxisTextColor, \"colors\"),\n \"--y-axis-text-fill\": varAttr(yAxisTextFill, \"colors\"),\n ...rest,\n }),\n) as GenericsComponent<{\n <Y extends Dict = Dict>(props: CartesianChartProps<Y>): ReactElement\n}>\n\nexport type ChartXAxisTick =\n | ((props: XAxisTickContentProps) => ReactNode)\n | boolean\n | HTMLStyledProps<\"text\">\n | ReactElement\n\nexport interface ChartXAxisProps extends Merge<\n HTMLStyledProps<\"svg\">,\n Omit<UseChartXAxisProps, \"label\" | \"tick\" | \"tickLine\">\n> {\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?: ChartXAxisTick\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n tickLine?: ChartTickLine\n}\n\nexport const ChartXAxis = withContext<\"svg\", ChartXAxisProps>((props) => {\n const { xAxisProps } = useComponentContext()\n const {\n children,\n label: labelProp = false,\n tick: tickProp = true,\n tickLine: tickLineProp = false,\n ...rest\n } = { ...xAxisProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const tickProps = useSlotComponentProps({}, \"xAxisTick\")\n const labelProps = useSlotComponentProps({}, \"xAxisLabel\")\n const tickLineProps = useSlotComponentProps({}, \"xAxisTickLine\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const tick = useMemo<UseChartXAxisProps[\"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<UseChartXAxisProps[\"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 label = useMemo<UseChartXAxisProps[\"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 { getRootProps, getXAxisProps } = useChartXAxis({\n label,\n tick,\n tickLine,\n ...rest,\n })\n\n return (\n <styled.svg asChild {...getRootProps()}>\n <XAxis {...getXAxisProps()}>{children}</XAxis>\n </styled.svg>\n )\n}, \"xAxis\")()\n\nexport type ChartYAxisTick =\n | ((props: YAxisTickContentProps) => ReactNode)\n | boolean\n | HTMLStyledProps<\"text\">\n | ReactElement\n\nexport interface ChartYAxisProps extends Merge<\n HTMLStyledProps<\"svg\">,\n Omit<UseChartYAxisProps, \"label\" | \"tick\" | \"tickLine\">\n> {\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?: ChartYAxisTick\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n tickLine?: ChartTickLine\n}\n\nexport const ChartYAxis = withContext<\"svg\", ChartYAxisProps>((props) => {\n const { yAxisProps } = useComponentContext()\n const {\n children,\n label: labelProp = false,\n tick: tickProp = true,\n tickLine: tickLineProp = false,\n ...rest\n } = { ...yAxisProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const tickProps = useSlotComponentProps({}, \"yAxisTick\")\n const labelProps = useSlotComponentProps({}, \"yAxisLabel\")\n const tickLineProps = useSlotComponentProps({}, \"yAxisTickLine\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const tick = useMemo<UseChartYAxisProps[\"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<UseChartXAxisProps[\"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 label = useMemo<UseChartYAxisProps[\"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 { getRootProps, getYAxisProps } = useChartYAxis({\n label,\n tick,\n tickLine,\n ...rest,\n })\n\n return (\n <styled.svg asChild {...getRootProps()}>\n <YAxis {...getYAxisProps()}>{children}</YAxis>\n </styled.svg>\n )\n}, \"yAxis\")()\n\nexport interface ChartGridProps extends Merge<\n HTMLStyledProps<\"line\">,\n UseChartGridProps\n> {}\n\nexport const ChartGrid = withContext<\"line\", ChartGridProps>((props) => {\n const { gridProps } = useComponentContext()\n const { getGridProps, getRootProps } = useChartGrid({\n ...gridProps,\n ...props,\n })\n\n return (\n <styled.line asChild {...getRootProps()}>\n <CartesianGrid {...getGridProps()} />\n </styled.line>\n )\n}, \"grid\")()\n\nexport interface ChartLineProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"line\">,\n Omit<\n UseChartLineProps,\n \"activeDot\" | \"data\" | \"dataKey\" | \"dot\" | \"label\" | \"stroke\"\n >\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 data to use for the line.\n */\n data?: Y[]\n /**\n * The dot to use for the line.\n *\n * @default false\n */\n dot?: ChartDot\n /**\n * The label list to use for the line.\n *\n * @default false\n */\n label?: ChartLabelList\n}\n\nexport const ChartLine = withContext<\"line\", ChartLineProps>((props) => {\n const { lineProps } = 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 } = { ...lineProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const color = strokeProp ?? 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<UseChartLineProps[\"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<UseChartLineProps[\"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<UseChartLineProps[\"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 { getLineProps, getRootProps } = useChartLine({\n activeDot,\n dataKey,\n dot,\n label,\n stroke,\n ...rest,\n })\n\n return (\n <styled.line asChild {...getRootProps()}>\n <Line {...getLineProps()}>{children}</Line>\n </styled.line>\n )\n}, \"line\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartLineProps<Y>): ReactElement\n}>\n\nexport interface ChartAreaGradient {\n end?: CSSProps[\"stopColor\"]\n start?: CSSProps[\"stopColor\"]\n}\n\nexport interface ChartAreaProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"line\">,\n Omit<\n UseChartAreaProps,\n \"activeDot\" | \"data\" | \"dataKey\" | \"dot\" | \"label\" | \"stroke\"\n >\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 data to use for the area.\n */\n data?: Y[]\n /**\n * The dot to use for the line.\n *\n * @default false\n */\n dot?: ChartDot\n /**\n * The gradient to use for the area.\n */\n gradient?: ChartAreaGradient\n /**\n * The label list to use for the line.\n *\n * @default false\n */\n label?: ChartLabelList\n /**\n * Determines whether the chart area should be represented with a gradient instead of the solid color.\n */\n withGradient?: boolean\n}\n\nexport const ChartArea = withContext<\"line\", ChartAreaProps>((props) => {\n const { areaProps } = useComponentContext()\n const {\n activeDot: activeDotProp = true,\n children,\n dataKey,\n dot: dotProp = false,\n gradient,\n label: labelProp = false,\n stroke: strokeProp,\n withGradient,\n ...rest\n } = { ...areaProps, ...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<UseChartLineProps[\"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({\n ...props,\n className: cx(className, props.className),\n })\n } else if (isValidElement(dotProp)) {\n return cloneElement<any>(dotProp, {\n className,\n })\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<UseChartLineProps[\"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<UseChartLineProps[\"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 { getAreaProps, getRootProps } = useChartArea({\n activeDot,\n dataKey,\n dot,\n fill: color ? `url(#${id})` : \"\",\n label,\n stroke,\n ...rest,\n })\n\n return (\n <>\n <styled.line asChild {...getRootProps()}>\n <Area {...getAreaProps()}>{children}</Area>\n </styled.line>\n\n <defs>\n {withGradient ? (\n <linearGradient id={id} x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <styled.stop\n asChild\n stopColor={color}\n stopOpacity={gradient?.start ?? \"{area-start-fill-opacity}\"}\n >\n <stop offset=\"5%\" />\n </styled.stop>\n <styled.stop\n asChild\n stopColor={color}\n stopOpacity={gradient?.end ?? \"{area-end-fill-opacity}\"}\n >\n <stop offset=\"95%\" />\n </styled.stop>\n </linearGradient>\n ) : (\n <linearGradient id={id} x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <styled.stop\n stopColor={color}\n stopOpacity={rest.fillOpacity ?? \"{area-fill-opacity}\"}\n />\n </linearGradient>\n )}\n </defs>\n </>\n )\n}, \"area\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartAreaProps<Y>): ReactElement\n}>\n\nexport interface ChartBarProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"path\">,\n Omit<UseChartBarProps, \"dataKey\" | \"fill\" | \"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 label list to use for the bar.\n *\n * @default false\n */\n label?: ChartLabelList\n}\n\nexport const ChartBar = withContext<\"path\", ChartBarProps>((props) => {\n const { barProps } = useComponentContext()\n const {\n children,\n dataKey,\n fill: fillProp,\n label: labelProp = false,\n ...rest\n } = { ...barProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const color = fillProp ?? rest.color\n const fill = JSON.stringify(color)\n const labelProps = useSlotComponentProps({}, \"labelList\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const label = useMemo<UseChartBarProps[\"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 { getBarProps, getRootProps } = useChartBar({\n dataKey,\n fill,\n label,\n ...rest,\n })\n\n return (\n <styled.path asChild {...getRootProps()}>\n <Bar {...getBarProps()}>{children}</Bar>\n </styled.path>\n )\n}, \"bar\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartBarProps<Y>): ReactElement\n}>\n\nexport interface ChartReferenceLineProps extends Omit<\n Merge<HTMLStyledProps<\"line\">, UseChartReferenceLineProps>,\n \"label\"\n> {\n /**\n * The label to use for the reference line.\n *\n * @default false\n */\n label?: ChartLabel\n}\n\nexport const ChartReferenceLine = withContext<\"line\", ChartReferenceLineProps>(\n (props) => {\n const { referenceLineProps } = useComponentContext()\n const { label: labelProp = false, ...rest } = {\n ...referenceLineProps,\n ...props,\n }\n const system = useSystem()\n const { theme } = useTheme()\n const labelProps = useSlotComponentProps({}, \"referenceLineLabel\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const label = useMemo<UseChartReferenceLineProps[\"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 { getReferenceLineProps, getRootProps } = useChartReferenceLine({\n label,\n ...rest,\n })\n\n return (\n <styled.line asChild {...getRootProps()}>\n <ReferenceLine {...getReferenceLineProps()} />\n </styled.line>\n )\n },\n \"referenceLine\",\n)()\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2EA,MAAM,oBAAoB,yBAAyB;AAkNnD,MAAM,EACJ,kBACA,cAAc,4BACd,qBACA,iBAAiB,+BACjB,aACA,cACA,0BACE,oBAIF,mBAAmB,oBAAoB;AAIzC,MAAa,iBAAiB,cACJ,EACtB,YAAY,gBACZ,QACA,WAAW,MACX,YAAY,MACZ,YAAY,OACZ,WACA,UACA,YACA,WACA,WACA,oBACA,YACA,YACA,GAAG,WACyB;CAC5B,MAAM,EAAE,eAAe,iBAAiB,kBAAkB,KAAK;CAC/D,MAAM,aAAa,cACX;EACJ;GACE,WAAW;GACX,UAAU,WAAW,oBAAC,cAAY,GAAG;GACtC;EACD;GACE,WAAW;GACX,UAAU,oBAAC,cAAW,MAAM,CAAC,YAAa;GAC3C;EACD;GACE,WAAW;GACX,UAAU,oBAAC,cAAW,MAAM,CAAC,YAAa;GAC3C;EACD,GAAG;EACJ,EACD;EAAC;EAAgB;EAAU;EAAW;EAAU,CACjD;AAsBD,QACE,oBAAC;EAAiB,OAtBK,eAChB;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;YAIG,oBAAC;GACa;GACZ,SAAS,UAAU,OAAO,cAAc;I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AAC;YAC3D,eAAe,UAAU,CAClC,QAAO,aAAkB,WAAW,EAAE,WAAW,CAAC;wCAChC,UAAU,EAAE;IAC9B,MAAM,CAAC,cAAc,6CACnB,WACA,kBACD;AAED,WAAO;KACL,GAAG;KACH,iCAAc,WAAW,aAAa,WAAW,IAAI,WAAW,CAAC;KAClE;SAED,QAAO;IAAE;IAAW,UAAU;IAAW;KAE1C;GAAC;GAAW,WAAW;GAAW,WAAW;GAAK;GAAI,CAAC;EAGxD,GAAG;EACJ,CAAC;AAEF,QACE,oBAAC,OAAO;EAAK;EAAQ,GAAI,cAAc;YACrC,oBAAC,iBAAc,GAAI,uBAAuB,GAAI;GAClC;GAGlB,gBACD,EAAE"}
1
+ {"version":3,"file":"cartesian-chart.js","names":["props"],"sources":["../../../../src/components/chart/cartesian-chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n ActiveDotProps,\n DotProps,\n LabelListProps,\n LabelProps,\n} from \"recharts\"\nimport type {\n CartesianChartProps as OriginalCartesianChartProps,\n XAxisTickContentProps,\n YAxisTickContentProps,\n} 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 { CartesianChartStyle } from \"./cartesian-chart.style\"\nimport type {\n ChartActiveDot,\n ChartDot,\n ChartLabel,\n ChartLabelList,\n ChartProps,\n ChartTickLine,\n} from \"./chart\"\nimport type {\n UseCartesianChartProps,\n UseChartAreaProps,\n UseChartBarProps,\n UseChartGridProps,\n UseChartLineProps,\n UseChartReferenceLineProps,\n UseChartXAxisProps,\n UseChartYAxisProps,\n} from \"./use-cartesian-chart\"\nimport { cloneElement, isValidElement, useId, useMemo } from \"react\"\nimport {\n Area,\n Bar,\n CartesianGrid,\n Line,\n ReferenceLine,\n XAxis,\n YAxis,\n} from \"recharts\"\nimport {\n createShouldForwardProp,\n createSlotComponent,\n getCSS,\n styled,\n useSystem,\n useTheme,\n varAttr,\n} from \"../../core\"\nimport { cx, isFunction, isObject, splitObject } from \"../../utils\"\nimport { cartesianChartStyle } from \"./cartesian-chart.style\"\nimport { Chart } from \"./chart\"\nimport {\n useCartesianChart,\n useChartArea,\n useChartBar,\n useChartGrid,\n useChartLine,\n useChartReferenceLine,\n useChartXAxis,\n useChartYAxis,\n} from \"./use-cartesian-chart\"\n\nconst shouldForwardProp = createShouldForwardProp()\n\ninterface ComponentContext extends Pick<\n CartesianChartProps,\n | \"areaProps\"\n | \"barProps\"\n | \"gridProps\"\n | \"lineProps\"\n | \"referenceLineProps\"\n | \"xAxisProps\"\n | \"yAxisProps\"\n> {}\n\nexport interface CartesianChartProps<Y extends Dict = Dict>\n extends\n ChartProps,\n UseCartesianChartProps<Y>,\n ThemeProps<CartesianChartStyle> {\n /**\n * The fill color of the active dots.\n */\n activeDotFill?: CSSProps[\"fill\"]\n /**\n * The radius of the active dots.\n */\n activeDotRadius?: CSSProps[\"r\"]\n /**\n * The stroke color of the active dots.\n */\n activeDotStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the active dots.\n */\n activeDotStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The fill opacity of the area end.\n */\n areaEndFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The fill opacity of the area.\n */\n areaFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The fill opacity of the area start.\n */\n areaStartFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The color of the bars.\n */\n barColor?: CSSProps[\"color\"]\n /**\n * The fill color of the bars.\n */\n barFill?: CSSProps[\"fill\"]\n /**\n * The fill opacity of the bars.\n */\n barFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The stroke color of the bars.\n */\n barStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the bars.\n */\n barStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The fill color of the dots.\n */\n dotFill?: CSSProps[\"fill\"]\n /**\n * The radius of the dots.\n */\n dotRadius?: CSSProps[\"r\"]\n /**\n * The stroke color of the dots.\n */\n dotStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the dots.\n */\n dotStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The stroke color of the grid.\n */\n gridStroke?: CSSProps[\"stroke\"]\n /**\n * The opacity of the inactive bars.\n */\n inactiveBarOpacity?: CSSProps[\"opacity\"]\n /**\n * The opacity of the inactive lines.\n */\n inactiveLineOpacity?: CSSProps[\"opacity\"]\n /**\n * The color of the lines.\n */\n lineColor?: CSSProps[\"color\"]\n /**\n * The stroke color of the lines.\n */\n lineStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the lines.\n */\n lineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The color of the reference lines.\n */\n referenceLineColor?: CSSProps[\"color\"]\n /**\n * The stroke color of the reference lines.\n */\n referenceLineStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the reference lines.\n */\n referenceLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The text color of the reference lines.\n */\n referenceLineTextColor?: CSSProps[\"color\"]\n /**\n * The text fill color of the reference lines.\n */\n referenceLineTextFill?: CSSProps[\"fill\"]\n /**\n * If `true`, grid is visible.\n *\n * @default true\n */\n withGrid?: boolean\n /**\n * If `true`, X axis is visible.\n *\n * @default true\n */\n withXAxis?: boolean\n /**\n * If `true`, Y axis is visible.\n *\n * @default false\n */\n withYAxis?: boolean\n /**\n * The stroke color of the x-axis lines.\n */\n xAxisLineStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the x-axis lines.\n */\n xAxisLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The text color of the x-axis.\n */\n xAxisTextColor?: CSSProps[\"color\"]\n /**\n * The text fill color of the x-axis.\n */\n xAxisTextFill?: CSSProps[\"fill\"]\n /**\n * The stroke color of the y-axis lines.\n */\n yAxisLineStroke?: CSSProps[\"stroke\"]\n /**\n * The stroke width of the y-axis lines.\n */\n yAxisLineStrokeWidth?: CSSProps[\"strokeWidth\"]\n /**\n * The text color of the y-axis.\n */\n yAxisTextColor?: CSSProps[\"color\"]\n /**\n * The text fill color of the y-axis.\n */\n yAxisTextFill?: CSSProps[\"fill\"]\n /**\n * Props for the area component.\n */\n areaProps?: Omit<ChartAreaProps, \"data\" | \"dataKey\">\n /**\n * Props for the bar component.\n */\n barProps?: Omit<ChartBarProps, \"dataKey\">\n /**\n * Props for the line chart component.\n */\n chartProps?: Omit<OriginalCartesianChartProps, \"data\">\n /**\n * Props for the grid component.\n */\n gridProps?: ChartGridProps\n /**\n * Props for the line component.\n */\n lineProps?: Omit<ChartLineProps, \"data\" | \"dataKey\">\n /**\n * Props for the reference line component.\n */\n referenceLineProps?: ChartReferenceLineProps\n /**\n * Props for the x axis component.\n */\n xAxisProps?: ChartXAxisProps\n /**\n * Props for the y axis component.\n */\n yAxisProps?: ChartYAxisProps\n}\n\nconst {\n ComponentContext,\n PropsContext: CartesianChartPropsContext,\n useComponentContext,\n usePropsContext: useCartesianChartPropsContext,\n withContext,\n withProvider,\n useSlotComponentProps,\n} = createSlotComponent<\n CartesianChartProps,\n CartesianChartStyle,\n ComponentContext\n>(\"cartesian-chart\", cartesianChartStyle)\n\nexport { CartesianChartPropsContext, useCartesianChartPropsContext }\n\nexport const CartesianChart = withProvider(\n <Y extends Dict = Dict>({\n components: componentsProp,\n render,\n withGrid = true,\n withXAxis = true,\n withYAxis = false,\n areaProps,\n barProps,\n chartProps,\n gridProps,\n lineProps,\n referenceLineProps,\n xAxisProps,\n yAxisProps,\n ...rest\n }: CartesianChartProps<Y>) => {\n const { getChartProps, getRootProps } = useCartesianChart(rest)\n const components = useMemo(\n () => [\n {\n component: ChartGrid,\n fallback: withGrid ? <ChartGrid /> : null,\n },\n {\n component: ChartXAxis,\n fallback: <ChartXAxis hide={!withXAxis} />,\n },\n {\n component: ChartYAxis,\n fallback: <ChartYAxis hide={!withYAxis} />,\n },\n ...componentsProp,\n ],\n [componentsProp, withGrid, withXAxis, withYAxis],\n )\n const componentContext = useMemo(\n () => ({\n areaProps,\n barProps,\n gridProps,\n lineProps,\n referenceLineProps,\n xAxisProps,\n yAxisProps,\n }),\n [\n areaProps,\n barProps,\n gridProps,\n lineProps,\n referenceLineProps,\n xAxisProps,\n yAxisProps,\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 areaEndFillOpacity,\n areaFillOpacity,\n areaStartFillOpacity,\n barColor,\n barFill,\n barFillOpacity,\n barStroke,\n barStrokeWidth,\n dotFill,\n dotRadius,\n dotStroke,\n dotStrokeWidth,\n gridStroke,\n inactiveBarOpacity,\n inactiveLineOpacity,\n lineColor,\n lineStroke,\n lineStrokeWidth,\n referenceLineColor,\n referenceLineStroke,\n referenceLineStrokeWidth,\n referenceLineTextColor,\n referenceLineTextFill,\n xAxisLineStroke,\n xAxisLineStrokeWidth,\n xAxisTextColor,\n xAxisTextFill,\n yAxisLineStroke,\n yAxisLineStrokeWidth,\n yAxisTextColor,\n yAxisTextFill,\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 \"--area-end-fill-opacity\": areaEndFillOpacity,\n \"--area-fill-opacity\": areaFillOpacity,\n \"--area-start-fill-opacity\": areaStartFillOpacity,\n \"--bar-color\": varAttr(barColor, \"colors\"),\n \"--bar-fill\": varAttr(barFill, \"colors\"),\n \"--bar-fill-opacity\": barFillOpacity,\n \"--bar-stroke\": varAttr(barStroke, \"colors\"),\n \"--bar-stroke-width\": barStrokeWidth,\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-bar-opacity\": inactiveBarOpacity,\n \"--inactive-line-opacity\": inactiveLineOpacity,\n \"--line-color\": varAttr(lineColor, \"colors\"),\n \"--line-stroke\": varAttr(lineStroke, \"colors\"),\n \"--line-stroke-width\": lineStrokeWidth,\n \"--reference-line-color\": varAttr(referenceLineColor, \"colors\"),\n \"--reference-line-stroke\": varAttr(referenceLineStroke, \"colors\"),\n \"--reference-line-stroke-width\": referenceLineStrokeWidth,\n \"--reference-line-text-color\": varAttr(referenceLineTextColor, \"colors\"),\n \"--reference-line-text-fill\": varAttr(referenceLineTextFill, \"colors\"),\n \"--x-axis-line-stroke\": varAttr(xAxisLineStroke, \"colors\"),\n \"--x-axis-line-stroke-width\": xAxisLineStrokeWidth,\n \"--x-axis-text-color\": varAttr(xAxisTextColor, \"colors\"),\n \"--x-axis-text-fill\": varAttr(xAxisTextFill, \"colors\"),\n \"--y-axis-line-stroke\": varAttr(yAxisLineStroke, \"colors\"),\n \"--y-axis-line-stroke-width\": yAxisLineStrokeWidth,\n \"--y-axis-text-color\": varAttr(yAxisTextColor, \"colors\"),\n \"--y-axis-text-fill\": varAttr(yAxisTextFill, \"colors\"),\n ...rest,\n }),\n) as GenericsComponent<{\n <Y extends Dict = Dict>(props: CartesianChartProps<Y>): ReactElement\n}>\n\nexport type ChartXAxisTick =\n | ((props: XAxisTickContentProps) => ReactNode)\n | boolean\n | HTMLStyledProps<\"text\">\n | ReactElement\n\nexport interface ChartXAxisProps extends Merge<\n HTMLStyledProps<\"svg\">,\n Omit<UseChartXAxisProps, \"label\" | \"tick\" | \"tickLine\">\n> {\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?: ChartXAxisTick\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n tickLine?: ChartTickLine\n}\n\nexport const ChartXAxis = withContext<\"svg\", ChartXAxisProps>((props) => {\n const { xAxisProps } = useComponentContext()\n const {\n children,\n label: labelProp = false,\n tick: tickProp = true,\n tickLine: tickLineProp = false,\n ...rest\n } = { ...xAxisProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const tickProps = useSlotComponentProps({}, \"xAxisTick\")\n const labelProps = useSlotComponentProps({}, \"xAxisLabel\")\n const tickLineProps = useSlotComponentProps({}, \"xAxisTickLine\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const tick = useMemo<UseChartXAxisProps[\"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 XAxisTickContentProps,\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<UseChartXAxisProps[\"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 label = useMemo<UseChartXAxisProps[\"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 { getRootProps, getXAxisProps } = useChartXAxis({\n label,\n tick,\n tickLine,\n ...rest,\n })\n\n return (\n <styled.svg asChild {...getRootProps()}>\n <XAxis {...getXAxisProps()}>{children}</XAxis>\n </styled.svg>\n )\n}, \"xAxis\")()\n\nexport type ChartYAxisTick =\n | ((props: YAxisTickContentProps) => ReactNode)\n | boolean\n | HTMLStyledProps<\"text\">\n | ReactElement\n\nexport interface ChartYAxisProps extends Merge<\n HTMLStyledProps<\"svg\">,\n Omit<UseChartYAxisProps, \"label\" | \"tick\" | \"tickLine\">\n> {\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?: ChartYAxisTick\n /**\n * The tick line to use for the axis.\n *\n * @default false\n */\n tickLine?: ChartTickLine\n}\n\nexport const ChartYAxis = withContext<\"svg\", ChartYAxisProps>((props) => {\n const { yAxisProps } = useComponentContext()\n const {\n children,\n label: labelProp = false,\n tick: tickProp = true,\n tickLine: tickLineProp = false,\n ...rest\n } = { ...yAxisProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const tickProps = useSlotComponentProps({}, \"yAxisTick\")\n const labelProps = useSlotComponentProps({}, \"yAxisLabel\")\n const tickLineProps = useSlotComponentProps({}, \"yAxisTickLine\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const tick = useMemo<UseChartYAxisProps[\"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 YAxisTickContentProps,\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<UseChartXAxisProps[\"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 label = useMemo<UseChartYAxisProps[\"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 { getRootProps, getYAxisProps } = useChartYAxis({\n label,\n tick,\n tickLine,\n ...rest,\n })\n\n return (\n <styled.svg asChild {...getRootProps()}>\n <YAxis {...getYAxisProps()}>{children}</YAxis>\n </styled.svg>\n )\n}, \"yAxis\")()\n\nexport interface ChartGridProps extends Merge<\n HTMLStyledProps<\"line\">,\n UseChartGridProps\n> {}\n\nexport const ChartGrid = withContext<\"line\", ChartGridProps>((props) => {\n const { gridProps } = useComponentContext()\n const { getGridProps, getRootProps } = useChartGrid({\n ...gridProps,\n ...props,\n })\n\n return (\n <styled.line asChild {...getRootProps()}>\n <CartesianGrid {...getGridProps()} />\n </styled.line>\n )\n}, \"grid\")()\n\nexport interface ChartLineProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"line\">,\n Omit<\n UseChartLineProps,\n \"activeDot\" | \"data\" | \"dataKey\" | \"dot\" | \"label\" | \"stroke\"\n >\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 data to use for the line.\n */\n data?: Y[]\n /**\n * The dot to use for the line.\n *\n * @default false\n */\n dot?: ChartDot\n /**\n * The label list to use for the line.\n *\n * @default false\n */\n label?: ChartLabelList\n}\n\nexport const ChartLine = withContext<\"line\", ChartLineProps>((props) => {\n const { lineProps } = 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 } = { ...lineProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const color = strokeProp ?? 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<UseChartLineProps[\"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<UseChartLineProps[\"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<UseChartLineProps[\"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 { getLineProps, getRootProps } = useChartLine({\n activeDot,\n dataKey,\n dot,\n label,\n stroke,\n ...rest,\n })\n\n return (\n <styled.line asChild {...getRootProps()}>\n <Line {...getLineProps()}>{children}</Line>\n </styled.line>\n )\n}, \"line\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartLineProps<Y>): ReactElement\n}>\n\nexport interface ChartAreaGradient {\n end?: CSSProps[\"stopColor\"]\n start?: CSSProps[\"stopColor\"]\n}\n\nexport interface ChartAreaProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"line\">,\n Omit<\n UseChartAreaProps,\n \"activeDot\" | \"data\" | \"dataKey\" | \"dot\" | \"label\" | \"stroke\"\n >\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 data to use for the area.\n */\n data?: Y[]\n /**\n * The dot to use for the line.\n *\n * @default false\n */\n dot?: ChartDot\n /**\n * The gradient to use for the area.\n */\n gradient?: ChartAreaGradient\n /**\n * The label list to use for the line.\n *\n * @default false\n */\n label?: ChartLabelList\n /**\n * Determines whether the chart area should be represented with a gradient instead of the solid color.\n */\n withGradient?: boolean\n}\n\nexport const ChartArea = withContext<\"line\", ChartAreaProps>((props) => {\n const { areaProps } = useComponentContext()\n const {\n activeDot: activeDotProp = true,\n children,\n dataKey,\n dot: dotProp = false,\n gradient,\n label: labelProp = false,\n stroke: strokeProp,\n withGradient,\n ...rest\n } = { ...areaProps, ...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<UseChartLineProps[\"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({\n ...props,\n className: cx(className, props.className),\n })\n } else if (isValidElement(dotProp)) {\n return cloneElement<any>(dotProp, {\n className,\n })\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<UseChartLineProps[\"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<UseChartLineProps[\"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 { getAreaProps, getRootProps } = useChartArea({\n activeDot,\n dataKey,\n dot,\n fill: color ? `url(#${id})` : \"\",\n label,\n stroke,\n ...rest,\n })\n\n return (\n <>\n <styled.line asChild {...getRootProps()}>\n <Area {...getAreaProps()}>{children}</Area>\n </styled.line>\n\n <defs>\n {withGradient ? (\n <linearGradient id={id} x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <styled.stop\n asChild\n stopColor={color}\n stopOpacity={gradient?.start ?? \"{area-start-fill-opacity}\"}\n >\n <stop offset=\"5%\" />\n </styled.stop>\n <styled.stop\n asChild\n stopColor={color}\n stopOpacity={gradient?.end ?? \"{area-end-fill-opacity}\"}\n >\n <stop offset=\"95%\" />\n </styled.stop>\n </linearGradient>\n ) : (\n <linearGradient id={id} x1=\"0\" x2=\"0\" y1=\"0\" y2=\"1\">\n <styled.stop\n stopColor={color}\n stopOpacity={rest.fillOpacity ?? \"{area-fill-opacity}\"}\n />\n </linearGradient>\n )}\n </defs>\n </>\n )\n}, \"area\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartAreaProps<Y>): ReactElement\n}>\n\nexport interface ChartBarProps<Y extends Dict = Dict> extends Merge<\n HTMLStyledProps<\"path\">,\n Omit<UseChartBarProps, \"dataKey\" | \"fill\" | \"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 label list to use for the bar.\n *\n * @default false\n */\n label?: ChartLabelList\n}\n\nexport const ChartBar = withContext<\"path\", ChartBarProps>((props) => {\n const { barProps } = useComponentContext()\n const {\n children,\n dataKey,\n fill: fillProp,\n label: labelProp = false,\n ...rest\n } = { ...barProps, ...props }\n const system = useSystem()\n const { theme } = useTheme()\n const color = fillProp ?? rest.color\n const fill = JSON.stringify(color)\n const labelProps = useSlotComponentProps({}, \"labelList\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const label = useMemo<UseChartBarProps[\"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 { getBarProps, getRootProps } = useChartBar({\n dataKey,\n fill,\n label,\n ...rest,\n })\n\n return (\n <styled.path asChild {...getRootProps()}>\n <Bar {...getBarProps()}>{children}</Bar>\n </styled.path>\n )\n}, \"bar\")() as GenericsComponent<{\n <Y extends Dict>(props: ChartBarProps<Y>): ReactElement\n}>\n\nexport interface ChartReferenceLineProps extends Omit<\n Merge<HTMLStyledProps<\"line\">, UseChartReferenceLineProps>,\n \"label\"\n> {\n /**\n * The label to use for the reference line.\n *\n * @default false\n */\n label?: ChartLabel\n}\n\nexport const ChartReferenceLine = withContext<\"line\", ChartReferenceLineProps>(\n (props) => {\n const { referenceLineProps } = useComponentContext()\n const { label: labelProp = false, ...rest } = {\n ...referenceLineProps,\n ...props,\n }\n const system = useSystem()\n const { theme } = useTheme()\n const labelProps = useSlotComponentProps({}, \"referenceLineLabel\")\n const css = useMemo(() => getCSS(system, theme), [system, theme])\n const label = useMemo<UseChartReferenceLineProps[\"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 { getReferenceLineProps, getRootProps } = useChartReferenceLine({\n label,\n ...rest,\n })\n\n return (\n <styled.line asChild {...getRootProps()}>\n <ReferenceLine {...getReferenceLineProps()} />\n </styled.line>\n )\n },\n \"referenceLine\",\n)()\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2EA,MAAM,oBAAoB,yBAAyB;AAkNnD,MAAM,EACJ,kBACA,cAAc,4BACd,qBACA,iBAAiB,+BACjB,aACA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;EAAK;EAAQ,GAAI,cAAc;YACrC,oBAAC;GAAI,GAAI,aAAa;GAAG;IAAe;GAC5B;GAEf,MAAM,EAAE;AAgBX,MAAa,qBAAqB,aAC/B,UAAU;CACT,MAAM,EAAE,uBAAuB,qBAAqB;CACpD,MAAM,EAAE,OAAO,YAAY,OAAO,GAAG,SAAS;EAC5C,GAAG;EACH,GAAG;EACJ;CACD,MAAM,SAAS,WAAW;CAC1B,MAAM,EAAE,UAAU,UAAU;CAC5B,MAAM,aAAa,sBAAsB,EAAE,EAAE,qBAAqB;CAClE,MAAM,MAAM,cAAc,OAAO,QAAQ,MAAM,EAAE,CAAC,QAAQ,MAAM,CAAC;CAyBjE,MAAM,EAAE,uBAAuB,iBAAiB,sBAAsB;EACpE,OAzBY,cAAmD;AAC/D,OAAI,CAAC,UAAW,QAAO;GAEvB,MAAM,kCAAe,WAAW,WAAW,IAAI,WAAW,IAAI,CAAC;AAE/D,qCAAe,UAAU,CACvB,SAAQ,YACN,UAAU;IAAE,GAAGA;IAAO,iCAAc,WAAWA,QAAM,UAAU;IAAE,CAAC;YAC3D,eAAe,UAAU,CAClC,QAAO,aAAkB,WAAW,EAAE,WAAW,CAAC;wCAChC,UAAU,EAAE;IAC9B,MAAM,CAAC,cAAc,6CACnB,WACA,kBACD;AAED,WAAO;KACL,GAAG;KACH,iCAAc,WAAW,aAAa,WAAW,IAAI,WAAW,CAAC;KAClE;SAED,QAAO;IAAE;IAAW,UAAU;IAAW;KAE1C;GAAC;GAAW,WAAW;GAAW,WAAW;GAAK;GAAI,CAAC;EAGxD,GAAG;EACJ,CAAC;AAEF,QACE,oBAAC,OAAO;EAAK;EAAQ,GAAI,cAAc;YACrC,oBAAC,iBAAc,GAAI,uBAAuB,GAAI;GAClC;GAGlB,gBACD,EAAE"}
@@ -152,7 +152,7 @@ const ChartTooltip = (props) => {
152
152
  cursor: isValidElement(cursor) || !cursor ? cursor : /* @__PURE__ */ jsx(ChartTooltipCursor, { ...(0, utils_exports.isObject)(cursor) ? cursor : {} }),
153
153
  ...rest
154
154
  });
155
- return /* @__PURE__ */ jsx(Tooltip, { ...getRootProps() });
155
+ return /* @__PURE__ */ jsx(Tooltip, { ...(0, utils_exports.cast)(getRootProps()) });
156
156
  };
157
157
  const ChartTooltipCursor = withContext("path", "tooltipCursor")(void 0, ({ bottom: _bottom, brushBottom: _brushBottom, fill, height, left: _left, payload: _payload, payloadIndex: _payloadIndex, points, right: _right, stroke, top: _top, width, x, y, ...rest }) => {
158
158
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"chart.js","names":["createContext"],"sources":["../../../../src/components/chart/chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type {\n JSXElementConstructor,\n PropsWithChildren,\n ReactElement,\n ReactNode,\n RefObject,\n} from \"react\"\nimport type {\n ActiveDotProps,\n DataKey,\n DefaultLegendContentProps,\n DotItemDotProps,\n DotProps,\n LabelProps,\n RenderableText,\n ResponsiveContainerProps,\n TooltipContentProps,\n} from \"recharts\"\nimport type { CSSProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { Dict, Merge } from \"../../utils\"\nimport type { ChartStyle } from \"./chart.style\"\nimport type {\n UseChartLabelListProps,\n UseChartLabelProps,\n UseChartLegendProps,\n UseChartLegendReturn,\n UseChartTooltipProps,\n} from \"./use-chart\"\nimport { Fragment, isValidElement, useMemo, useRef } from \"react\"\nimport {\n Label,\n LabelList,\n Legend,\n ResponsiveContainer,\n Tooltip,\n} from \"recharts\"\nimport { createSlotComponent, styled, varAttr } from \"../../core\"\nimport {\n createContext,\n isArray,\n isNull,\n isNumber,\n isObject,\n isString,\n isUndefined,\n useSplitChildren,\n} from \"../../utils\"\nimport { chartStyle } from \"./chart.style\"\nimport {\n ChartContext,\n useChart,\n useChartLabel,\n useChartLabelList,\n useChartLegend,\n useChartTooltip,\n} from \"./use-chart\"\n\nexport type ChartDot =\n | ((props: DotItemDotProps) => ReactNode)\n | boolean\n | Merge<Partial<DotProps>, HTMLStyledProps<\"circle\">>\n | ReactElement\n\nexport type ChartActiveDot =\n | ((props: ActiveDotProps) => ReactNode)\n | boolean\n | Merge<Partial<ActiveDotProps>, HTMLStyledProps<\"circle\">>\n | ReactElement\n\nexport type ChartLabel =\n | ((props: any) => ReactElement | RenderableText)\n | boolean\n | (Merge<\n HTMLStyledProps<\"text\">,\n Pick<\n LabelProps,\n | \"angle\"\n | \"content\"\n | \"formatter\"\n | \"index\"\n | \"labelRef\"\n | \"offset\"\n | \"parentViewBox\"\n | \"position\"\n | \"textBreakAll\"\n | \"value\"\n | \"viewBox\"\n | \"zIndex\"\n >\n > & { dataKey?: DataKey<any> })\n | number\n | ReactElement\n | string\n\nexport type ChartLabelList =\n | ((props: LabelProps) => ReactElement | RenderableText)\n | boolean\n | ChartLabelListProps\n | ReactElement\n\nexport type ChartTickLine = boolean | HTMLStyledProps<\"line\">\n\nexport type GradientStrategy = \"invert\" | \"shade\" | \"tint\"\n\nexport function mergeSeries<Y>(\n series: Y[],\n color: CSSProps[\"color\"] = \"mono\",\n strategy: GradientStrategy = \"invert\",\n): (Y & { color: CSSProps[\"color\"] })[] {\n const colors = gradients(series.length, color, strategy)\n\n return series.map((item, index) => ({ ...item, color: colors[index] }))\n}\n\nexport function mergeData<Y>(\n data: Y[],\n color: CSSProps[\"fill\"] = \"mono\",\n strategy: GradientStrategy = \"invert\",\n): (Y & { fill: CSSProps[\"fill\"] })[] {\n const colors = gradients(data.length, color, strategy)\n\n return data.map((item, index) => ({ ...item, fill: colors[index] }))\n}\n\nexport function gradients(\n length: number,\n color: CSSProps[\"color\"] = \"mono\",\n strategy: GradientStrategy = \"invert\",\n): CSSProps[\"color\"][] {\n return Array.from({ length }, (_, index) => {\n const value = Math.floor(100 - (100 / length) * index)\n const percent = `${value}%`\n\n if (strategy === \"invert\") {\n return [\n `tint(colors.${color}, ${percent})`,\n `shade(colors.${color}, ${percent})`,\n ]\n } else {\n return `${strategy}(colors.${color}, ${percent})`\n }\n })\n}\n\nfunction parseJSON(value: any) {\n try {\n return JSON.parse(value)\n } catch {\n return value\n }\n}\n\ninterface ComponentContext extends Pick<\n ChartProps,\n \"legendProps\" | \"tooltipProps\"\n> {\n nameKeyRef: RefObject<string | undefined>\n}\n\nexport interface ChartProps extends HTMLStyledProps, ThemeProps<ChartStyle> {\n /**\n * The components to render the chart components.\n */\n components: {\n component: JSXElementConstructor<any>\n fallback: ReactNode\n }[]\n /**\n * The function to render the chart.\n */\n render: (props: PropsWithChildren) => ReactNode\n /**\n * The color of the label list.\n */\n labelListColor?: CSSProps[\"color\"]\n /**\n * The fill of the label list.\n */\n labelListFill?: CSSProps[\"fill\"]\n /**\n * The fill of the tooltip cursor.\n */\n tooltipCursorFill?: CSSProps[\"fill\"]\n /**\n * The fill opacity of the tooltip cursor.\n */\n tooltipCursorFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The stroke of the tooltip cursor.\n */\n tooltipCursorStroke?: CSSProps[\"stroke\"]\n /**\n * If `true`, legend is visible.\n *\n * @default false\n */\n withLegend?: boolean\n /**\n * If `true`, tooltip is visible.\n *\n * @default true\n */\n withTooltip?: boolean\n /**\n * Props for the legend component.\n */\n legendProps?: ChartLegendProps\n /**\n * Props for the responsive container component.\n */\n responsiveContainerProps?: ResponsiveContainerProps\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: ChartTooltipProps\n}\n\nconst {\n ComponentContext,\n PropsContext: ChartPropsContext,\n useComponentContext: useChartComponentContext,\n usePropsContext: useChartPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<ChartProps, ChartStyle, ComponentContext>(\n \"chart\",\n chartStyle,\n)\n\nexport { ChartPropsContext, useChartComponentContext, useChartPropsContext }\n\nexport const Chart = withProvider(\n ({\n children,\n components: componentsProp,\n render,\n withLegend = false,\n withTooltip = true,\n legendProps,\n responsiveContainerProps,\n tooltipProps,\n ...rest\n }: ChartProps) => {\n const { highlightedDataKey, onHighlight } = useChart()\n const nameKeyRef = useRef<string | undefined>(undefined)\n const components = useMemo(\n () => [\n ...componentsProp,\n {\n component: ChartLegend,\n fallback: withLegend ? <ChartLegend /> : null,\n },\n {\n component: ChartTooltip,\n fallback: withTooltip ? <ChartTooltip /> : null,\n },\n ],\n [componentsProp, withLegend, withTooltip],\n )\n const [omittedChildren, ...customComponents] = useSplitChildren(\n children,\n ...components.map(({ component }) => component),\n )\n const context = useMemo(\n () => ({\n highlightedDataKey,\n onHighlight,\n }),\n [highlightedDataKey, onHighlight],\n )\n const componentContext = useMemo(\n () => ({\n nameKeyRef,\n legendProps,\n tooltipProps,\n }),\n [legendProps, tooltipProps],\n )\n\n return (\n <ChartContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.div {...rest}>\n <ResponsiveContainer {...responsiveContainerProps}>\n {render({\n children: (\n <>\n {components.map(({ fallback }, index) => (\n <Fragment key={index}>\n {customComponents[index] ?? fallback}\n </Fragment>\n ))}\n\n {omittedChildren}\n </>\n ),\n })}\n </ResponsiveContainer>\n </styled.div>\n </ComponentContext>\n </ChartContext>\n )\n },\n \"root\",\n)(\n undefined,\n ({\n labelListColor,\n labelListFill,\n tooltipCursorFill,\n tooltipCursorFillOpacity,\n tooltipCursorStroke,\n ...rest\n }) => ({\n \"--label-list-color\": varAttr(labelListColor, \"colors\"),\n \"--label-list-fill\": varAttr(labelListFill, \"colors\"),\n \"--tooltip-cursor-fill\": varAttr(tooltipCursorFill, \"colors\"),\n \"--tooltip-cursor-fill-opacity\": tooltipCursorFillOpacity,\n \"--tooltip-cursor-stroke\": varAttr(tooltipCursorStroke, \"colors\"),\n ...rest,\n }),\n)\n\ninterface ChartLegendContext extends Pick<\n UseChartLegendReturn,\n \"getLegendItemProps\"\n> {}\n\nconst [ChartLegendContext, useChartLegendContext] =\n createContext<ChartLegendContext>({\n name: \"ChartLegendContext\",\n })\n\nexport interface ChartLegendProps extends Merge<\n HTMLStyledProps,\n UseChartLegendProps\n> {\n /**\n * Props for the content component.\n */\n contentProps?: Omit<ChartLegendContentProps, \"formatter\" | \"payload\">\n}\n\nexport const ChartLegend = withContext<\"div\", ChartLegendProps>((props) => {\n const { legendProps } = useChartComponentContext()\n const { contentProps, ...rest } = { ...legendProps, ...props }\n const {\n getLegendContentProps,\n getLegendItemProps,\n getLegendProps,\n getRootProps,\n } = useChartLegend({\n content: ({ formatter, payload }) => (\n <ChartLegendContent\n formatter={formatter}\n payload={payload}\n {...getLegendContentProps(contentProps)}\n />\n ),\n ...rest,\n })\n const context = useMemo(() => ({ getLegendItemProps }), [getLegendItemProps])\n\n return (\n <ChartLegendContext value={context}>\n <styled.div asChild {...getRootProps()}>\n <Legend {...getLegendProps()} />\n </styled.div>\n </ChartLegendContext>\n )\n}, \"legend\")()\n\ninterface ChartLegendContentProps\n extends\n HTMLStyledProps,\n Pick<DefaultLegendContentProps, \"formatter\" | \"payload\"> {\n /**\n * If `true`, swatch is visible.\n */\n withSwatch?: boolean\n}\n\nconst ChartLegendContent = withContext<\"div\", ChartLegendContentProps>(\n ({ formatter, payload, withSwatch = true, ...rest }) => {\n const { nameKeyRef } = useChartComponentContext()\n const { getLegendItemProps } = useChartLegendContext()\n\n return (\n <styled.div {...rest}>\n {payload?.map((data, index) => {\n let value = data.value\n\n if (nameKeyRef.current)\n value = (data.payload as any)?.[nameKeyRef.current]\n\n const dataKey =\n isString(data.dataKey) || isNumber(data.dataKey)\n ? data.dataKey\n : value\n const color = parseJSON(data.color)\n const formattedValue = formatter?.(value, data, index) ?? value\n\n return (\n <ChartLegendItem key={index} {...getLegendItemProps({ dataKey })}>\n {withSwatch ? <ChartLegendSwatch bg={color} /> : null}\n <ChartLegendValue>{formattedValue}</ChartLegendValue>\n </ChartLegendItem>\n )\n })}\n </styled.div>\n )\n },\n \"legendContent\",\n)()\n\ninterface ChartLegendItemProps extends HTMLStyledProps {}\n\nconst ChartLegendItem = withContext<\"div\", ChartLegendItemProps>(\n \"div\",\n \"legendItem\",\n)()\n\ninterface ChartLegendSwatchProps extends HTMLStyledProps {}\n\nconst ChartLegendSwatch = withContext<\"div\", ChartLegendSwatchProps>(\n \"div\",\n \"legendSwatch\",\n)()\n\ninterface ChartLegendValueProps extends HTMLStyledProps<\"span\"> {}\n\nconst ChartLegendValue = withContext<\"span\", ChartLegendValueProps>(\n \"span\",\n \"legendValue\",\n)()\n\nexport interface ChartTooltipProps<\n Y extends (number | string)[] | number | string = number,\n M extends number | string = string,\n> extends Omit<Merge<HTMLStyledProps, UseChartTooltipProps<Y, M>>, \"cursor\"> {\n /**\n * Props for the cursor component.\n */\n cursor?: boolean | ChartTooltipCursorProps | ReactElement\n /**\n * Props for the content component.\n */\n contentProps?: Omit<\n ChartTooltipContentProps,\n \"formatter\" | \"label\" | \"labelFormatter\" | \"payload\"\n >\n}\n\nexport const ChartTooltip = <\n Y extends (number | string)[] | number | string,\n M extends number | string,\n>(\n props: ChartTooltipProps<Y, M>,\n) => {\n const { tooltipProps } = useChartComponentContext()\n const {\n cursor = false,\n contentProps,\n ...rest\n } = {\n ...tooltipProps,\n ...props,\n } as ChartTooltipProps<Y, M>\n const { getContentProps, getRootProps } = useChartTooltip({\n content: ({ formatter, label, labelFormatter, payload }) => (\n <ChartTooltipContent\n formatter={formatter}\n label={label}\n labelFormatter={labelFormatter}\n payload={payload}\n {...getContentProps(contentProps)}\n />\n ),\n cursor:\n isValidElement(cursor) || !cursor ? (\n cursor\n ) : (\n <ChartTooltipCursor {...(isObject(cursor) ? cursor : {})} />\n ),\n ...rest,\n })\n\n return <Tooltip {...getRootProps()} />\n}\n\ninterface ChartTooltipCursorProps extends Omit<\n HTMLStyledProps<\"path\">,\n \"height\" | \"points\" | \"width\"\n> {\n brushBottom?: number\n height?: number\n payload?: Dict[]\n payloadIndex?: number\n points?: { x: number; y: number }[]\n width?: number\n}\n\nconst ChartTooltipCursor = withContext<\"path\", ChartTooltipCursorProps>(\n \"path\",\n \"tooltipCursor\",\n)(\n undefined,\n ({\n bottom: _bottom,\n brushBottom: _brushBottom,\n fill,\n height,\n left: _left,\n payload: _payload,\n payloadIndex: _payloadIndex,\n points,\n right: _right,\n stroke,\n top: _top,\n width,\n x,\n y,\n ...rest\n }) => {\n const d = !!points\n ? `M${points[0]?.x},${points[0]?.y}L${points[1]?.x},${points[1]?.y}`\n : `M ${x},${y} h ${width} v ${height} h -${width} Z`\n return {\n asChild: true,\n children: <path d={d} height={height} width={width} />,\n fill: fill === \"#ccc\" ? undefined : fill,\n stroke: stroke === \"#ccc\" ? undefined : stroke,\n ...rest,\n }\n },\n)\n\ninterface ChartTooltipContentProps\n extends\n HTMLStyledProps,\n Pick<\n TooltipContentProps<any, any>,\n \"formatter\" | \"label\" | \"labelFormatter\" | \"payload\"\n > {\n /**\n * If `true`, swatch is visible.\n */\n withSwatch?: boolean\n}\n\nconst ChartTooltipContent = withContext<\"div\", ChartTooltipContentProps>(\n ({\n formatter,\n label: labelProp,\n labelFormatter,\n payload,\n withSwatch = true,\n ...rest\n }) => {\n const { nameKeyRef } = useChartComponentContext()\n const label = labelFormatter\n ? labelFormatter(labelProp, payload)\n : labelProp\n\n return (\n <styled.div {...rest}>\n {!isUndefined(label) && !isNull(label) ? (\n <ChartTooltipLabel>{label}</ChartTooltipLabel>\n ) : null}\n\n <ChartTooltipList>\n {payload.map((data, index) => {\n if (nameKeyRef.current) data.name = data.payload[nameKeyRef.current]\n\n const color = parseJSON(data.color) || data.payload.fill\n const result =\n formatter?.(data.value, data.name, data, index, payload) ??\n (isArray(data.value) ? data.value.join(\", \") : data.value)\n const [value, name] = isArray(result) ? result : [result, data.name]\n\n return (\n <ChartTooltipItem key={index}>\n {withSwatch ? <ChartTooltipSwatch bg={color} /> : null}\n <ChartTooltipName>{name}</ChartTooltipName>\n <ChartTooltipValue>{value}</ChartTooltipValue>\n </ChartTooltipItem>\n )\n })}\n </ChartTooltipList>\n </styled.div>\n )\n },\n \"tooltipContent\",\n)()\n\ninterface ChartTooltipLabel extends HTMLStyledProps<\"p\"> {}\n\nconst ChartTooltipLabel = withContext<\"p\", ChartTooltipLabel>(\n \"p\",\n \"tooltipLabel\",\n)()\n\ninterface ChartTooltipList extends HTMLStyledProps {}\n\nconst ChartTooltipList = withContext<\"div\", ChartTooltipList>(\n \"div\",\n \"tooltipList\",\n)()\n\ninterface ChartTooltipItem extends HTMLStyledProps {}\n\nconst ChartTooltipItem = withContext<\"div\", ChartTooltipItem>(\n \"div\",\n \"tooltipItem\",\n)()\n\ninterface ChartTooltipSwatch extends HTMLStyledProps {}\n\nconst ChartTooltipSwatch = withContext<\"div\", ChartTooltipSwatch>(\n \"div\",\n \"tooltipSwatch\",\n)()\n\ninterface ChartTooltipName extends HTMLStyledProps<\"span\"> {}\n\nconst ChartTooltipName = withContext<\"span\", ChartTooltipName>(\n \"span\",\n \"tooltipName\",\n)()\n\ninterface ChartTooltipValue extends HTMLStyledProps<\"span\"> {}\n\nconst ChartTooltipValue = withContext<\"span\", ChartTooltipValue>(\n \"span\",\n \"tooltipValue\",\n)()\n\nexport interface ChartLabelListProps extends Merge<\n HTMLStyledProps<\"text\">,\n UseChartLabelListProps\n> {}\n\nexport const ChartLabelList = withContext<\"text\", ChartLabelListProps>(\n (props) => {\n const { getLabelListProps, getRootProps } = useChartLabelList(props)\n\n return (\n <styled.text asChild {...getRootProps()}>\n <LabelList {...getLabelListProps()} />\n </styled.text>\n )\n },\n \"labelList\",\n)()\n\nexport interface ChartLabelProps extends Merge<\n HTMLStyledProps<\"text\">,\n UseChartLabelProps\n> {}\n\nexport const ChartLabel = withContext<\"text\", ChartLabelProps>((props) => {\n const { getLabelProps, getRootProps } = useChartLabel(props)\n\n return (\n <styled.text asChild {...getRootProps()}>\n <Label {...getLabelProps()} />\n </styled.text>\n )\n}, \"label\")()\n"],"mappings":";;;;;;;;;;;;;;;;AA0GA,SAAgB,YACd,QACA,QAA2B,QAC3B,WAA6B,UACS;CACtC,MAAM,SAAS,UAAU,OAAO,QAAQ,OAAO,SAAS;AAExD,QAAO,OAAO,KAAK,MAAM,WAAW;EAAE,GAAG;EAAM,OAAO,OAAO;EAAQ,EAAE;;AAGzE,S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,YACvB,OACA,cACD,EAAE;AAIH,MAAM,qBAAqB,YACzB,OACA,gBACD,EAAE;AAIH,MAAM,mBAAmB,YACvB,QACA,cACD,EAAE;AAIH,MAAM,oBAAoB,YACxB,QACA,eACD,EAAE;AAOH,MAAa,iBAAiB,aAC3B,UAAU;CACT,MAAM,EAAE,mBAAmB,iBAAiB,kBAAkB,MAAM;AAEpE,QACE,oBAAC,OAAO;EAAK;EAAQ,GAAI,cAAc;YACrC,oBAAC,aAAU,GAAI,mBAAmB,GAAI;GAC1B;GAGlB,YACD,EAAE;AAOH,MAAa,aAAa,aAAsC,UAAU;CACxE,MAAM,EAAE,eAAe,iBAAiB,cAAc,MAAM;AAE5D,QACE,oBAAC,OAAO;EAAK;EAAQ,GAAI,cAAc;YACrC,oBAAC,SAAM,GAAI,eAAe,GAAI;GAClB;GAEf,QAAQ,EAAE"}
1
+ {"version":3,"file":"chart.js","names":["createContext"],"sources":["../../../../src/components/chart/chart.tsx"],"sourcesContent":["\"use client\"\n\nimport type {\n JSXElementConstructor,\n PropsWithChildren,\n ReactElement,\n ReactNode,\n RefObject,\n} from \"react\"\nimport type {\n ActiveDotProps,\n DataKey,\n DefaultLegendContentProps,\n DotItemDotProps,\n DotProps,\n LabelProps,\n RenderableText,\n ResponsiveContainerProps,\n TooltipContentProps,\n TooltipProps,\n} from \"recharts\"\nimport type { CSSProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { Dict, Merge } from \"../../utils\"\nimport type { ChartStyle } from \"./chart.style\"\nimport type {\n UseChartLabelListProps,\n UseChartLabelProps,\n UseChartLegendProps,\n UseChartLegendReturn,\n UseChartTooltipProps,\n} from \"./use-chart\"\nimport { Fragment, isValidElement, useMemo, useRef } from \"react\"\nimport {\n Label,\n LabelList,\n Legend,\n ResponsiveContainer,\n Tooltip,\n} from \"recharts\"\nimport { createSlotComponent, styled, varAttr } from \"../../core\"\nimport {\n cast,\n createContext,\n isArray,\n isNull,\n isNumber,\n isObject,\n isString,\n isUndefined,\n useSplitChildren,\n} from \"../../utils\"\nimport { chartStyle } from \"./chart.style\"\nimport {\n ChartContext,\n useChart,\n useChartLabel,\n useChartLabelList,\n useChartLegend,\n useChartTooltip,\n} from \"./use-chart\"\n\nexport type ChartDot =\n | ((props: DotItemDotProps) => ReactNode)\n | boolean\n | Merge<Partial<DotProps>, HTMLStyledProps<\"circle\">>\n | ReactElement\n\nexport type ChartActiveDot =\n | ((props: ActiveDotProps) => ReactNode)\n | boolean\n | Merge<Partial<ActiveDotProps>, HTMLStyledProps<\"circle\">>\n | ReactElement\n\nexport type ChartLabel =\n | ((props: any) => ReactElement | RenderableText)\n | boolean\n | (Merge<\n HTMLStyledProps<\"text\">,\n Pick<\n LabelProps,\n | \"angle\"\n | \"content\"\n | \"formatter\"\n | \"index\"\n | \"labelRef\"\n | \"offset\"\n | \"parentViewBox\"\n | \"position\"\n | \"textBreakAll\"\n | \"value\"\n | \"viewBox\"\n | \"zIndex\"\n >\n > & { dataKey?: DataKey<any> })\n | number\n | ReactElement\n | string\n\nexport type ChartLabelList =\n | ((props: LabelProps) => ReactElement | RenderableText)\n | boolean\n | ChartLabelListProps\n | ReactElement\n\nexport type ChartTickLine = boolean | HTMLStyledProps<\"line\">\n\nexport type GradientStrategy = \"invert\" | \"shade\" | \"tint\"\n\nexport function mergeSeries<Y>(\n series: Y[],\n color: CSSProps[\"color\"] = \"mono\",\n strategy: GradientStrategy = \"invert\",\n): (Y & { color: CSSProps[\"color\"] })[] {\n const colors = gradients(series.length, color, strategy)\n\n return series.map((item, index) => ({ ...item, color: colors[index] }))\n}\n\nexport function mergeData<Y>(\n data: Y[],\n color: CSSProps[\"fill\"] = \"mono\",\n strategy: GradientStrategy = \"invert\",\n): (Y & { fill: CSSProps[\"fill\"] })[] {\n const colors = gradients(data.length, color, strategy)\n\n return data.map((item, index) => ({ ...item, fill: colors[index] }))\n}\n\nexport function gradients(\n length: number,\n color: CSSProps[\"color\"] = \"mono\",\n strategy: GradientStrategy = \"invert\",\n): CSSProps[\"color\"][] {\n return Array.from({ length }, (_, index) => {\n const value = Math.floor(100 - (100 / length) * index)\n const percent = `${value}%`\n\n if (strategy === \"invert\") {\n return [\n `tint(colors.${color}, ${percent})`,\n `shade(colors.${color}, ${percent})`,\n ]\n } else {\n return `${strategy}(colors.${color}, ${percent})`\n }\n })\n}\n\nfunction parseJSON(value: any) {\n try {\n return JSON.parse(value)\n } catch {\n return value\n }\n}\n\ninterface ComponentContext extends Pick<\n ChartProps,\n \"legendProps\" | \"tooltipProps\"\n> {\n nameKeyRef: RefObject<string | undefined>\n}\n\nexport interface ChartProps extends HTMLStyledProps, ThemeProps<ChartStyle> {\n /**\n * The components to render the chart components.\n */\n components: {\n component: JSXElementConstructor<any>\n fallback: ReactNode\n }[]\n /**\n * The function to render the chart.\n */\n render: (props: PropsWithChildren) => ReactNode\n /**\n * The color of the label list.\n */\n labelListColor?: CSSProps[\"color\"]\n /**\n * The fill of the label list.\n */\n labelListFill?: CSSProps[\"fill\"]\n /**\n * The fill of the tooltip cursor.\n */\n tooltipCursorFill?: CSSProps[\"fill\"]\n /**\n * The fill opacity of the tooltip cursor.\n */\n tooltipCursorFillOpacity?: CSSProps[\"fillOpacity\"]\n /**\n * The stroke of the tooltip cursor.\n */\n tooltipCursorStroke?: CSSProps[\"stroke\"]\n /**\n * If `true`, legend is visible.\n *\n * @default false\n */\n withLegend?: boolean\n /**\n * If `true`, tooltip is visible.\n *\n * @default true\n */\n withTooltip?: boolean\n /**\n * Props for the legend component.\n */\n legendProps?: ChartLegendProps\n /**\n * Props for the responsive container component.\n */\n responsiveContainerProps?: ResponsiveContainerProps\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: ChartTooltipProps\n}\n\nconst {\n ComponentContext,\n PropsContext: ChartPropsContext,\n useComponentContext: useChartComponentContext,\n usePropsContext: useChartPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<ChartProps, ChartStyle, ComponentContext>(\n \"chart\",\n chartStyle,\n)\n\nexport { ChartPropsContext, useChartComponentContext, useChartPropsContext }\n\nexport const Chart = withProvider(\n ({\n children,\n components: componentsProp,\n render,\n withLegend = false,\n withTooltip = true,\n legendProps,\n responsiveContainerProps,\n tooltipProps,\n ...rest\n }: ChartProps) => {\n const { highlightedDataKey, onHighlight } = useChart()\n const nameKeyRef = useRef<string | undefined>(undefined)\n const components = useMemo(\n () => [\n ...componentsProp,\n {\n component: ChartLegend,\n fallback: withLegend ? <ChartLegend /> : null,\n },\n {\n component: ChartTooltip,\n fallback: withTooltip ? <ChartTooltip /> : null,\n },\n ],\n [componentsProp, withLegend, withTooltip],\n )\n const [omittedChildren, ...customComponents] = useSplitChildren(\n children,\n ...components.map(({ component }) => component),\n )\n const context = useMemo(\n () => ({\n highlightedDataKey,\n onHighlight,\n }),\n [highlightedDataKey, onHighlight],\n )\n const componentContext = useMemo(\n () => ({\n nameKeyRef,\n legendProps,\n tooltipProps,\n }),\n [legendProps, tooltipProps],\n )\n\n return (\n <ChartContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.div {...rest}>\n <ResponsiveContainer {...responsiveContainerProps}>\n {render({\n children: (\n <>\n {components.map(({ fallback }, index) => (\n <Fragment key={index}>\n {customComponents[index] ?? fallback}\n </Fragment>\n ))}\n\n {omittedChildren}\n </>\n ),\n })}\n </ResponsiveContainer>\n </styled.div>\n </ComponentContext>\n </ChartContext>\n )\n },\n \"root\",\n)(\n undefined,\n ({\n labelListColor,\n labelListFill,\n tooltipCursorFill,\n tooltipCursorFillOpacity,\n tooltipCursorStroke,\n ...rest\n }) => ({\n \"--label-list-color\": varAttr(labelListColor, \"colors\"),\n \"--label-list-fill\": varAttr(labelListFill, \"colors\"),\n \"--tooltip-cursor-fill\": varAttr(tooltipCursorFill, \"colors\"),\n \"--tooltip-cursor-fill-opacity\": tooltipCursorFillOpacity,\n \"--tooltip-cursor-stroke\": varAttr(tooltipCursorStroke, \"colors\"),\n ...rest,\n }),\n)\n\ninterface ChartLegendContext extends Pick<\n UseChartLegendReturn,\n \"getLegendItemProps\"\n> {}\n\nconst [ChartLegendContext, useChartLegendContext] =\n createContext<ChartLegendContext>({\n name: \"ChartLegendContext\",\n })\n\nexport interface ChartLegendProps extends Merge<\n HTMLStyledProps,\n UseChartLegendProps\n> {\n /**\n * Props for the content component.\n */\n contentProps?: Omit<ChartLegendContentProps, \"formatter\" | \"payload\">\n}\n\nexport const ChartLegend = withContext<\"div\", ChartLegendProps>((props) => {\n const { legendProps } = useChartComponentContext()\n const { contentProps, ...rest } = { ...legendProps, ...props }\n const {\n getLegendContentProps,\n getLegendItemProps,\n getLegendProps,\n getRootProps,\n } = useChartLegend({\n content: ({ formatter, payload }) => (\n <ChartLegendContent\n formatter={formatter}\n payload={payload}\n {...getLegendContentProps(contentProps)}\n />\n ),\n ...rest,\n })\n const context = useMemo(() => ({ getLegendItemProps }), [getLegendItemProps])\n\n return (\n <ChartLegendContext value={context}>\n <styled.div asChild {...getRootProps()}>\n <Legend {...getLegendProps()} />\n </styled.div>\n </ChartLegendContext>\n )\n}, \"legend\")()\n\ninterface ChartLegendContentProps\n extends\n HTMLStyledProps,\n Pick<DefaultLegendContentProps, \"formatter\" | \"payload\"> {\n /**\n * If `true`, swatch is visible.\n */\n withSwatch?: boolean\n}\n\nconst ChartLegendContent = withContext<\"div\", ChartLegendContentProps>(\n ({ formatter, payload, withSwatch = true, ...rest }) => {\n const { nameKeyRef } = useChartComponentContext()\n const { getLegendItemProps } = useChartLegendContext()\n\n return (\n <styled.div {...rest}>\n {payload?.map((data, index) => {\n let value = data.value\n\n if (nameKeyRef.current)\n value = (data.payload as any)?.[nameKeyRef.current]\n\n const dataKey =\n isString(data.dataKey) || isNumber(data.dataKey)\n ? data.dataKey\n : value\n const color = parseJSON(data.color)\n const formattedValue = formatter?.(value, data, index) ?? value\n\n return (\n <ChartLegendItem key={index} {...getLegendItemProps({ dataKey })}>\n {withSwatch ? <ChartLegendSwatch bg={color} /> : null}\n <ChartLegendValue>{formattedValue}</ChartLegendValue>\n </ChartLegendItem>\n )\n })}\n </styled.div>\n )\n },\n \"legendContent\",\n)()\n\ninterface ChartLegendItemProps extends HTMLStyledProps {}\n\nconst ChartLegendItem = withContext<\"div\", ChartLegendItemProps>(\n \"div\",\n \"legendItem\",\n)()\n\ninterface ChartLegendSwatchProps extends HTMLStyledProps {}\n\nconst ChartLegendSwatch = withContext<\"div\", ChartLegendSwatchProps>(\n \"div\",\n \"legendSwatch\",\n)()\n\ninterface ChartLegendValueProps extends HTMLStyledProps<\"span\"> {}\n\nconst ChartLegendValue = withContext<\"span\", ChartLegendValueProps>(\n \"span\",\n \"legendValue\",\n)()\n\nexport interface ChartTooltipProps<\n Y extends (number | string)[] | number | string = number,\n M extends number | string = string,\n> extends Omit<Merge<HTMLStyledProps, UseChartTooltipProps<Y, M>>, \"cursor\"> {\n /**\n * Props for the cursor component.\n */\n cursor?: boolean | ChartTooltipCursorProps | ReactElement\n /**\n * Props for the content component.\n */\n contentProps?: Omit<\n ChartTooltipContentProps,\n \"formatter\" | \"label\" | \"labelFormatter\" | \"payload\"\n >\n}\n\nexport const ChartTooltip = <\n Y extends (number | string)[] | number | string,\n M extends number | string,\n>(\n props: ChartTooltipProps<Y, M>,\n) => {\n const { tooltipProps } = useChartComponentContext()\n const {\n cursor = false,\n contentProps,\n ...rest\n } = {\n ...tooltipProps,\n ...props,\n } as ChartTooltipProps<Y, M>\n const { getContentProps, getRootProps } = useChartTooltip<Y, M>({\n content: ({ formatter, label, labelFormatter, payload }) => (\n <ChartTooltipContent\n formatter={formatter}\n label={label}\n labelFormatter={labelFormatter}\n payload={payload}\n {...getContentProps(contentProps)}\n />\n ),\n cursor:\n isValidElement(cursor) || !cursor ? (\n cursor\n ) : (\n <ChartTooltipCursor {...(isObject(cursor) ? cursor : {})} />\n ),\n ...rest,\n })\n\n return <Tooltip {...cast<TooltipProps>(getRootProps())} />\n}\n\ninterface ChartTooltipCursorProps extends Omit<\n HTMLStyledProps<\"path\">,\n \"height\" | \"points\" | \"width\"\n> {\n brushBottom?: number\n height?: number\n payload?: Dict[]\n payloadIndex?: number\n points?: { x: number; y: number }[]\n width?: number\n}\n\nconst ChartTooltipCursor = withContext<\"path\", ChartTooltipCursorProps>(\n \"path\",\n \"tooltipCursor\",\n)(\n undefined,\n ({\n bottom: _bottom,\n brushBottom: _brushBottom,\n fill,\n height,\n left: _left,\n payload: _payload,\n payloadIndex: _payloadIndex,\n points,\n right: _right,\n stroke,\n top: _top,\n width,\n x,\n y,\n ...rest\n }) => {\n const d = !!points\n ? `M${points[0]?.x},${points[0]?.y}L${points[1]?.x},${points[1]?.y}`\n : `M ${x},${y} h ${width} v ${height} h -${width} Z`\n return {\n asChild: true,\n children: <path d={d} height={height} width={width} />,\n fill: fill === \"#ccc\" ? undefined : fill,\n stroke: stroke === \"#ccc\" ? undefined : stroke,\n ...rest,\n }\n },\n)\n\ninterface ChartTooltipContentProps\n extends\n HTMLStyledProps,\n Pick<\n TooltipContentProps<any, any>,\n \"formatter\" | \"label\" | \"labelFormatter\" | \"payload\"\n > {\n /**\n * If `true`, swatch is visible.\n */\n withSwatch?: boolean\n}\n\nconst ChartTooltipContent = withContext<\"div\", ChartTooltipContentProps>(\n ({\n formatter,\n label: labelProp,\n labelFormatter,\n payload,\n withSwatch = true,\n ...rest\n }) => {\n const { nameKeyRef } = useChartComponentContext()\n const label = labelFormatter\n ? labelFormatter(labelProp, payload)\n : labelProp\n\n return (\n <styled.div {...rest}>\n {!isUndefined(label) && !isNull(label) ? (\n <ChartTooltipLabel>{label}</ChartTooltipLabel>\n ) : null}\n\n <ChartTooltipList>\n {payload.map((data, index) => {\n if (nameKeyRef.current) data.name = data.payload[nameKeyRef.current]\n\n const color = parseJSON(data.color) || data.payload.fill\n const result =\n formatter?.(data.value, data.name, data, index, payload) ??\n (isArray(data.value) ? data.value.join(\", \") : data.value)\n const [value, name] = isArray(result) ? result : [result, data.name]\n\n return (\n <ChartTooltipItem key={index}>\n {withSwatch ? <ChartTooltipSwatch bg={color} /> : null}\n <ChartTooltipName>{name}</ChartTooltipName>\n <ChartTooltipValue>{value}</ChartTooltipValue>\n </ChartTooltipItem>\n )\n })}\n </ChartTooltipList>\n </styled.div>\n )\n },\n \"tooltipContent\",\n)()\n\ninterface ChartTooltipLabel extends HTMLStyledProps<\"p\"> {}\n\nconst ChartTooltipLabel = withContext<\"p\", ChartTooltipLabel>(\n \"p\",\n \"tooltipLabel\",\n)()\n\ninterface ChartTooltipList extends HTMLStyledProps {}\n\nconst ChartTooltipList = withContext<\"div\", ChartTooltipList>(\n \"div\",\n \"tooltipList\",\n)()\n\ninterface ChartTooltipItem extends HTMLStyledProps {}\n\nconst ChartTooltipItem = withContext<\"div\", ChartTooltipItem>(\n \"div\",\n \"tooltipItem\",\n)()\n\ninterface ChartTooltipSwatch extends HTMLStyledProps {}\n\nconst ChartTooltipSwatch = withContext<\"div\", ChartTooltipSwatch>(\n \"div\",\n \"tooltipSwatch\",\n)()\n\ninterface ChartTooltipName extends HTMLStyledProps<\"span\"> {}\n\nconst ChartTooltipName = withContext<\"span\", ChartTooltipName>(\n \"span\",\n \"tooltipName\",\n)()\n\ninterface ChartTooltipValue extends HTMLStyledProps<\"span\"> {}\n\nconst ChartTooltipValue = withContext<\"span\", ChartTooltipValue>(\n \"span\",\n \"tooltipValue\",\n)()\n\nexport interface ChartLabelListProps extends Merge<\n HTMLStyledProps<\"text\">,\n UseChartLabelListProps\n> {}\n\nexport const ChartLabelList = withContext<\"text\", ChartLabelListProps>(\n (props) => {\n const { getLabelListProps, getRootProps } = useChartLabelList(props)\n\n return (\n <styled.text asChild {...getRootProps()}>\n <LabelList {...getLabelListProps()} />\n </styled.text>\n )\n },\n \"labelList\",\n)()\n\nexport interface ChartLabelProps extends Merge<\n HTMLStyledProps<\"text\">,\n UseChartLabelProps\n> {}\n\nexport const ChartLabel = withContext<\"text\", ChartLabelProps>((props) => {\n const { getLabelProps, getRootProps } = useChartLabel(props)\n\n return (\n <styled.text asChild {...getRootProps()}>\n <Label {...getLabelPro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