@codefast/ui 0.3.11-canary.1 → 0.3.11

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 (149) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +34 -14
  3. package/dist/components/accordion.d.ts +29 -10
  4. package/dist/components/accordion.js +38 -37
  5. package/dist/components/alert-dialog.d.ts +60 -24
  6. package/dist/components/alert-dialog.js +69 -72
  7. package/dist/components/alert.d.ts +27 -15
  8. package/dist/components/alert.js +29 -31
  9. package/dist/components/aspect-ratio.d.ts +8 -4
  10. package/dist/components/aspect-ratio.js +7 -5
  11. package/dist/components/avatar.d.ts +17 -6
  12. package/dist/components/avatar.js +19 -17
  13. package/dist/components/badge.d.ts +21 -14
  14. package/dist/components/badge.js +19 -22
  15. package/dist/components/breadcrumb.d.ts +35 -12
  16. package/dist/components/breadcrumb.js +48 -54
  17. package/dist/components/button-group.d.ts +29 -14
  18. package/dist/components/button-group.js +27 -32
  19. package/dist/components/button.d.ts +35 -25
  20. package/dist/components/button.js +50 -48
  21. package/dist/components/calendar.d.ts +24 -9
  22. package/dist/components/calendar.js +92 -98
  23. package/dist/components/card.d.ts +34 -10
  24. package/dist/components/card.js +39 -37
  25. package/dist/components/carousel.d.ts +55 -24
  26. package/dist/components/carousel.js +113 -130
  27. package/dist/components/chart.d.ts +72 -36
  28. package/dist/components/chart.js +154 -166
  29. package/dist/components/checkbox-cards.d.ts +15 -8
  30. package/dist/components/checkbox-cards.js +22 -25
  31. package/dist/components/checkbox-group.d.ts +16 -8
  32. package/dist/components/checkbox-group.js +19 -19
  33. package/dist/components/checkbox.d.ts +9 -4
  34. package/dist/components/checkbox.js +14 -14
  35. package/dist/components/collapsible.d.ts +14 -6
  36. package/dist/components/collapsible.js +18 -16
  37. package/dist/components/command.d.ts +55 -23
  38. package/dist/components/command.js +70 -85
  39. package/dist/components/context-menu.d.ts +72 -22
  40. package/dist/components/context-menu.js +88 -109
  41. package/dist/components/dialog.d.ts +53 -22
  42. package/dist/components/dialog.js +71 -85
  43. package/dist/components/drawer.d.ts +60 -28
  44. package/dist/components/drawer.js +59 -67
  45. package/dist/components/dropdown-menu.d.ts +73 -22
  46. package/dist/components/dropdown-menu.js +95 -112
  47. package/dist/components/empty.d.ts +37 -15
  48. package/dist/components/empty.js +43 -45
  49. package/dist/components/field.d.ts +63 -25
  50. package/dist/components/field.js +88 -104
  51. package/dist/components/form.d.ts +37 -15
  52. package/dist/components/form.js +65 -70
  53. package/dist/components/hover-card.d.ts +21 -7
  54. package/dist/components/hover-card.js +24 -24
  55. package/dist/components/input-group.d.ts +53 -28
  56. package/dist/components/input-group.js +63 -77
  57. package/dist/components/input-number.d.ts +28 -7
  58. package/dist/components/input-number.js +55 -59
  59. package/dist/components/input-otp.d.ts +24 -10
  60. package/dist/components/input-otp.js +33 -37
  61. package/dist/components/input-password.d.ts +12 -5
  62. package/dist/components/input-password.js +31 -32
  63. package/dist/components/input-search.d.ts +18 -8
  64. package/dist/components/input-search.js +43 -41
  65. package/dist/components/input.d.ts +10 -4
  66. package/dist/components/input.js +9 -7
  67. package/dist/components/item.d.ts +69 -32
  68. package/dist/components/item.js +89 -92
  69. package/dist/components/kbd.d.ts +13 -5
  70. package/dist/components/kbd.js +13 -11
  71. package/dist/components/label.d.ts +9 -4
  72. package/dist/components/label.js +9 -7
  73. package/dist/components/menubar.d.ts +80 -23
  74. package/dist/components/menubar.js +97 -118
  75. package/dist/components/native-select.d.ts +16 -6
  76. package/dist/components/native-select.js +25 -26
  77. package/dist/components/navigation-menu.d.ts +36 -12
  78. package/dist/components/navigation-menu.js +60 -75
  79. package/dist/components/pagination.d.ts +35 -14
  80. package/dist/components/pagination.js +54 -69
  81. package/dist/components/popover.d.ts +24 -8
  82. package/dist/components/popover.js +28 -28
  83. package/dist/components/progress-circle.d.ts +106 -88
  84. package/dist/components/progress-circle.js +106 -138
  85. package/dist/components/progress.d.ts +10 -4
  86. package/dist/components/progress.js +14 -14
  87. package/dist/components/radio-cards.d.ts +10 -4
  88. package/dist/components/radio-cards.js +22 -23
  89. package/dist/components/radio-group.d.ts +13 -5
  90. package/dist/components/radio-group.js +18 -16
  91. package/dist/components/radio.d.ts +12 -5
  92. package/dist/components/radio.js +10 -8
  93. package/dist/components/resizable.d.ts +18 -7
  94. package/dist/components/resizable.js +22 -22
  95. package/dist/components/scroll-area.d.ts +33 -20
  96. package/dist/components/scroll-area.js +84 -88
  97. package/dist/components/select.d.ts +50 -16
  98. package/dist/components/select.js +77 -96
  99. package/dist/components/separator.d.ts +29 -19
  100. package/dist/components/separator.js +36 -34
  101. package/dist/components/sheet.d.ts +62 -29
  102. package/dist/components/sheet.js +79 -100
  103. package/dist/components/sidebar.d.ts +160 -66
  104. package/dist/components/sidebar.js +294 -336
  105. package/dist/components/skeleton.d.ts +9 -4
  106. package/dist/components/skeleton.js +8 -6
  107. package/dist/components/slider.d.ts +13 -4
  108. package/dist/components/slider.js +34 -40
  109. package/dist/components/sonner.d.ts +10 -7
  110. package/dist/components/sonner.js +16 -14
  111. package/dist/components/spinner.d.ts +12 -5
  112. package/dist/components/spinner.js +33 -35
  113. package/dist/components/switch.d.ts +9 -4
  114. package/dist/components/switch.js +13 -11
  115. package/dist/components/table.d.ts +37 -11
  116. package/dist/components/table.js +47 -45
  117. package/dist/components/tabs.d.ts +21 -7
  118. package/dist/components/tabs.js +24 -22
  119. package/dist/components/textarea.d.ts +9 -4
  120. package/dist/components/textarea.js +8 -6
  121. package/dist/components/toggle-group.d.ts +24 -9
  122. package/dist/components/toggle-group.js +41 -42
  123. package/dist/components/toggle.d.ts +25 -17
  124. package/dist/components/toggle.js +30 -28
  125. package/dist/components/tooltip.d.ts +24 -8
  126. package/dist/components/tooltip.js +29 -32
  127. package/dist/hooks/use-animated-value.d.ts +4 -1
  128. package/dist/hooks/use-animated-value.js +57 -36
  129. package/dist/hooks/use-copy-to-clipboard.d.ts +11 -5
  130. package/dist/hooks/use-copy-to-clipboard.js +39 -20
  131. package/dist/hooks/use-is-mobile.d.ts +4 -1
  132. package/dist/hooks/use-is-mobile.js +21 -1
  133. package/dist/hooks/use-media-query.d.ts +4 -1
  134. package/dist/hooks/use-media-query.js +45 -18
  135. package/dist/hooks/use-mutation-observer.d.ts +6 -2
  136. package/dist/hooks/use-mutation-observer.js +34 -16
  137. package/dist/hooks/use-pagination.d.ts +22 -14
  138. package/dist/hooks/use-pagination.js +100 -49
  139. package/dist/index.d.ts +69 -130
  140. package/dist/index.js +11 -11
  141. package/dist/primitives/checkbox-group.d.ts +105 -83
  142. package/dist/primitives/checkbox-group.js +111 -84
  143. package/dist/primitives/input-number.d.ts +51 -40
  144. package/dist/primitives/input-number.js +483 -350
  145. package/dist/primitives/input.d.ts +48 -42
  146. package/dist/primitives/input.js +65 -43
  147. package/dist/primitives/progress-circle.d.ts +79 -48
  148. package/dist/primitives/progress-circle.js +154 -105
  149. package/package.json +6 -7
@@ -1,152 +1,135 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Button } from "./button.js";
3
3
  import { cn } from "@codefast/tailwind-variants";
4
- import { createContextScope } from "@radix-ui/react-context";
5
- import embla_carousel_react from "embla-carousel-react";
6
4
  import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
7
6
  import { useCallback, useEffect, useState } from "react";
8
- import { Button } from "./button.js";
7
+ import { createContextScope } from "@radix-ui/react-context";
8
+ import useEmblaCarousel from "embla-carousel-react";
9
+ //#region src/components/carousel.tsx
9
10
  const CAROUSEL_NAME = "Carousel";
10
11
  const [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);
11
12
  const [CarouselContextProvider, useCarouselContext] = createCarouselContext(CAROUSEL_NAME);
12
13
  function Carousel({ __scopeCarousel, children, className, opts, orientation, plugins, setApi, ...props }) {
13
- const [carouselRef, api] = embla_carousel_react({
14
- ...opts,
15
- axis: "vertical" === orientation ? "y" : "x"
16
- }, plugins);
17
- const [canScrollPrevious, setCanScrollPrevious] = useState(false);
18
- const [canScrollNext, setCanScrollNext] = useState(false);
19
- const onSelect = useCallback((carouselApi)=>{
20
- if (!carouselApi) return;
21
- setCanScrollPrevious(carouselApi.canScrollPrev());
22
- setCanScrollNext(carouselApi.canScrollNext());
23
- }, []);
24
- const scrollPrevious = useCallback(()=>{
25
- api?.scrollPrev();
26
- }, [
27
- api
28
- ]);
29
- const scrollNext = useCallback(()=>{
30
- api?.scrollNext();
31
- }, [
32
- api
33
- ]);
34
- const handleKeyDown = useCallback((event)=>{
35
- if ("ArrowLeft" === event.key) {
36
- event.preventDefault();
37
- scrollPrevious();
38
- } else if ("ArrowRight" === event.key) {
39
- event.preventDefault();
40
- scrollNext();
41
- }
42
- }, [
43
- scrollPrevious,
44
- scrollNext
45
- ]);
46
- useEffect(()=>{
47
- if (!api || !setApi) return;
48
- setApi(api);
49
- }, [
50
- api,
51
- setApi
52
- ]);
53
- useEffect(()=>{
54
- if (!api) return;
55
- queueMicrotask(()=>{
56
- onSelect(api);
57
- });
58
- api.on("reInit", onSelect);
59
- api.on("select", onSelect);
60
- return ()=>{
61
- api.off("select", onSelect);
62
- };
63
- }, [
64
- api,
65
- onSelect
66
- ]);
67
- return /*#__PURE__*/ jsx(CarouselContextProvider, {
68
- api: api,
69
- canScrollNext: canScrollNext,
70
- canScrollPrev: canScrollPrevious,
71
- carouselRef: carouselRef,
72
- opts: opts,
73
- orientation: orientation ?? (opts?.axis === "y" ? "vertical" : "horizontal"),
74
- scope: __scopeCarousel,
75
- scrollNext: scrollNext,
76
- scrollPrev: scrollPrevious,
77
- children: /*#__PURE__*/ jsx("div", {
78
- className: cn("relative", className),
79
- "data-slot": "carousel",
80
- onKeyDownCapture: handleKeyDown,
81
- ...props,
82
- children: children
83
- })
84
- });
14
+ const [carouselRef, api] = useEmblaCarousel({
15
+ ...opts,
16
+ axis: orientation === "vertical" ? "y" : "x"
17
+ }, plugins);
18
+ const [canScrollPrevious, setCanScrollPrevious] = useState(false);
19
+ const [canScrollNext, setCanScrollNext] = useState(false);
20
+ const onSelect = useCallback((carouselApi) => {
21
+ if (!carouselApi) return;
22
+ setCanScrollPrevious(carouselApi.canScrollPrev());
23
+ setCanScrollNext(carouselApi.canScrollNext());
24
+ }, []);
25
+ const scrollPrevious = useCallback(() => {
26
+ api?.scrollPrev();
27
+ }, [api]);
28
+ const scrollNext = useCallback(() => {
29
+ api?.scrollNext();
30
+ }, [api]);
31
+ const handleKeyDown = useCallback((event) => {
32
+ if (event.key === "ArrowLeft") {
33
+ event.preventDefault();
34
+ scrollPrevious();
35
+ } else if (event.key === "ArrowRight") {
36
+ event.preventDefault();
37
+ scrollNext();
38
+ }
39
+ }, [scrollPrevious, scrollNext]);
40
+ useEffect(() => {
41
+ if (!api || !setApi) return;
42
+ setApi(api);
43
+ }, [api, setApi]);
44
+ useEffect(() => {
45
+ if (!api) return;
46
+ queueMicrotask(() => {
47
+ onSelect(api);
48
+ });
49
+ api.on("reInit", onSelect);
50
+ api.on("select", onSelect);
51
+ return () => {
52
+ api.off("select", onSelect);
53
+ };
54
+ }, [api, onSelect]);
55
+ return /* @__PURE__ */ jsx(CarouselContextProvider, {
56
+ api,
57
+ canScrollNext,
58
+ canScrollPrev: canScrollPrevious,
59
+ carouselRef,
60
+ opts,
61
+ orientation: orientation ?? (opts?.axis === "y" ? "vertical" : "horizontal"),
62
+ scope: __scopeCarousel,
63
+ scrollNext,
64
+ scrollPrev: scrollPrevious,
65
+ children: /* @__PURE__ */ jsx("div", {
66
+ className: cn("relative", className),
67
+ "data-slot": "carousel",
68
+ onKeyDownCapture: handleKeyDown,
69
+ ...props,
70
+ children
71
+ })
72
+ });
85
73
  }
86
74
  const CAROUSEL_CONTENT_NAME = "CarouselContent";
87
75
  function CarouselContent({ __scopeCarousel, className, classNames, ...props }) {
88
- const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);
89
- return /*#__PURE__*/ jsx("div", {
90
- ref: carouselRef,
91
- className: cn("overflow-hidden", classNames?.wrapper),
92
- "data-slot": "carousel-content",
93
- children: /*#__PURE__*/ jsx("div", {
94
- className: cn("flex", "horizontal" === orientation ? "-ml-4" : "-mt-4 flex-col", classNames?.content, className),
95
- ...props
96
- })
97
- });
76
+ const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);
77
+ return /* @__PURE__ */ jsx("div", {
78
+ ref: carouselRef,
79
+ className: cn("overflow-hidden", classNames?.wrapper),
80
+ "data-slot": "carousel-content",
81
+ children: /* @__PURE__ */ jsx("div", {
82
+ className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", classNames?.content, className),
83
+ ...props
84
+ })
85
+ });
98
86
  }
99
87
  const CAROUSEL_ITEM_NAME = "CarouselItem";
100
88
  function CarouselItem({ __scopeCarousel, className, ...props }) {
101
- const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);
102
- return /*#__PURE__*/ jsx("div", {
103
- "aria-roledescription": "slide",
104
- className: cn("min-w-0 shrink-0 grow-0 basis-full", "horizontal" === orientation ? "pl-4" : "pt-4", className),
105
- "data-slot": "carousel-item",
106
- role: "group",
107
- ...props
108
- });
89
+ const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);
90
+ return /* @__PURE__ */ jsx("div", {
91
+ "aria-roledescription": "slide",
92
+ className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
93
+ "data-slot": "carousel-item",
94
+ role: "group",
95
+ ...props
96
+ });
109
97
  }
110
98
  const CAROUSEL_PREVIOUS_NAME = "CarouselPrevious";
111
99
  function CarouselPrevious({ __scopeCarousel, className, size = "icon", variant = "outline", ...props }) {
112
- const { canScrollPrev, orientation, scrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);
113
- return /*#__PURE__*/ jsxs(Button, {
114
- "aria-label": "Previous slide",
115
- className: cn("absolute size-8 shadow-none", "horizontal" === orientation ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
116
- "data-slot": "carousel-previous",
117
- disabled: !canScrollPrev,
118
- size: size,
119
- variant: variant,
120
- onClick: scrollPrev,
121
- ...props,
122
- children: [
123
- /*#__PURE__*/ jsx(ArrowLeftIcon, {}),
124
- /*#__PURE__*/ jsx("span", {
125
- className: "sr-only",
126
- children: "Previous slide"
127
- })
128
- ]
129
- });
100
+ const { canScrollPrev, orientation, scrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);
101
+ return /* @__PURE__ */ jsxs(Button, {
102
+ "aria-label": "Previous slide",
103
+ className: cn("absolute size-8 shadow-none", orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
104
+ "data-slot": "carousel-previous",
105
+ disabled: !canScrollPrev,
106
+ size,
107
+ variant,
108
+ onClick: scrollPrev,
109
+ ...props,
110
+ children: [/* @__PURE__ */ jsx(ArrowLeftIcon, {}), /* @__PURE__ */ jsx("span", {
111
+ className: "sr-only",
112
+ children: "Previous slide"
113
+ })]
114
+ });
130
115
  }
131
116
  const CAROUSEL_NEXT_NAME = "CarouselNext";
132
117
  function CarouselNext({ __scopeCarousel, className, size = "icon", variant = "outline", ...props }) {
133
- const { canScrollNext, orientation, scrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);
134
- return /*#__PURE__*/ jsxs(Button, {
135
- "aria-label": "Next slide",
136
- className: cn("absolute size-8 shadow-none", "horizontal" === orientation ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
137
- "data-slot": "carousel-next",
138
- disabled: !canScrollNext,
139
- size: size,
140
- variant: variant,
141
- onClick: scrollNext,
142
- ...props,
143
- children: [
144
- /*#__PURE__*/ jsx(ArrowRightIcon, {}),
145
- /*#__PURE__*/ jsx("span", {
146
- className: "sr-only",
147
- children: "Next slide"
148
- })
149
- ]
150
- });
118
+ const { canScrollNext, orientation, scrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);
119
+ return /* @__PURE__ */ jsxs(Button, {
120
+ "aria-label": "Next slide",
121
+ className: cn("absolute size-8 shadow-none", orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
122
+ "data-slot": "carousel-next",
123
+ disabled: !canScrollNext,
124
+ size,
125
+ variant,
126
+ onClick: scrollNext,
127
+ ...props,
128
+ children: [/* @__PURE__ */ jsx(ArrowRightIcon, {}), /* @__PURE__ */ jsx("span", {
129
+ className: "sr-only",
130
+ children: "Next slide"
131
+ })]
132
+ });
151
133
  }
134
+ //#endregion
152
135
  export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, createCarouselScope };
@@ -1,57 +1,93 @@
1
- import type { Scope } from "@radix-ui/react-context";
2
- import type { ComponentProps, ComponentType, JSX, ReactNode } from "react";
3
- import type { NameType, Payload, ValueType } from "recharts/types/component/DefaultTooltipContent";
4
- import type { TooltipContentProps, TooltipProps } from "recharts";
1
+ import * as _$react from "react";
2
+ import { ComponentProps, ComponentType, JSX, ReactNode } from "react";
3
+ import * as _$_radix_ui_react_context0 from "@radix-ui/react-context";
4
+ import { Scope } from "@radix-ui/react-context";
5
5
  import * as RechartsPrimitive from "recharts";
6
- type ExtractProps<T> = T extends (props: infer P) => ReactNode ? P : never;
6
+ import { TooltipContentProps, TooltipProps } from "recharts";
7
+ import { NameType, Payload, ValueType } from "recharts/types/component/DefaultTooltipContent";
8
+
9
+ //#region src/components/chart.d.ts
10
+ type ExtractProps<T> = T extends ((props: infer P) => ReactNode) ? P : never;
7
11
  type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
8
12
  declare const THEMES: {
9
- readonly dark: ".dark";
10
- readonly light: "";
13
+ readonly dark: ".dark";
14
+ readonly light: "";
11
15
  };
12
16
  type ChartConfig = Record<string, {
13
- label?: ReactNode;
14
- icon?: ComponentType;
17
+ label?: ReactNode;
18
+ icon?: ComponentType;
15
19
  } & ({
16
- color?: never;
17
- theme: Record<keyof typeof THEMES, string>;
20
+ color?: never;
21
+ theme: Record<keyof typeof THEMES, string>;
18
22
  } | {
19
- color?: string;
20
- theme?: never;
23
+ color?: string;
24
+ theme?: never;
21
25
  })>;
22
26
  type ScopedProps<P> = P & {
23
- __scopeChart?: Scope;
27
+ __scopeChart?: Scope;
24
28
  };
25
- declare const createChartScope: import("@radix-ui/react-context").CreateScope;
29
+ declare const createChartScope: _$_radix_ui_react_context0.CreateScope;
26
30
  interface ChartContainerProps extends ComponentProps<"div"> {
27
- children: ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
28
- config: ChartConfig;
31
+ children: ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
32
+ config: ChartConfig;
29
33
  }
30
- declare function ChartContainer({ __scopeChart, children, className, config, id, ...props }: ScopedProps<ChartContainerProps>): JSX.Element;
34
+ declare function ChartContainer({
35
+ __scopeChart,
36
+ children,
37
+ className,
38
+ config,
39
+ id,
40
+ ...props
41
+ }: ScopedProps<ChartContainerProps>): JSX.Element;
31
42
  interface ChartStyleProps {
32
- config: ChartConfig;
33
- id: string;
43
+ config: ChartConfig;
44
+ id: string;
34
45
  }
35
- declare function ChartStyle({ config, id }: ChartStyleProps): ReactNode;
46
+ declare function ChartStyle({
47
+ config,
48
+ id
49
+ }: ChartStyleProps): ReactNode;
36
50
  type ChartTooltipProps<TValue extends ValueType, TName extends NameType> = TooltipProps<TValue, TName>;
37
51
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
38
52
  type ChartTooltipContentProps<TValue extends ValueType, TName extends NameType> = Omit<MakeOptional<TooltipContentProps<TValue, TName>, "accessibilityLayer" | "active" | "activeIndex" | "coordinate" | "payload">, "payload"> & {
39
- hideIndicator?: boolean;
40
- hideLabel?: boolean;
41
- indicator?: "dashed" | "dot" | "line";
42
- labelKey?: string;
43
- nameKey?: string;
44
- color?: string | undefined;
45
- className?: string | undefined;
46
- payload?: Payload<TValue, TName>[];
53
+ hideIndicator?: boolean;
54
+ hideLabel?: boolean;
55
+ indicator?: "dashed" | "dot" | "line";
56
+ labelKey?: string;
57
+ nameKey?: string;
58
+ color?: string | undefined;
59
+ className?: string | undefined;
60
+ payload?: Payload<TValue, TName>[];
47
61
  };
48
- declare function ChartTooltipContent<TValue extends ValueType, TName extends NameType>({ __scopeChart, active, className, color, formatter, hideIndicator, hideLabel, indicator, label, labelClassName, labelFormatter, labelKey, nameKey, payload, }: ScopedProps<ChartTooltipContentProps<TValue, TName>>): ReactNode;
62
+ declare function ChartTooltipContent<TValue extends ValueType, TName extends NameType>({
63
+ __scopeChart,
64
+ active,
65
+ className,
66
+ color,
67
+ formatter,
68
+ hideIndicator,
69
+ hideLabel,
70
+ indicator,
71
+ label,
72
+ labelClassName,
73
+ labelFormatter,
74
+ labelKey,
75
+ nameKey,
76
+ payload
77
+ }: ScopedProps<ChartTooltipContentProps<TValue, TName>>): ReactNode;
49
78
  type ChartLegendProps = ComponentProps<typeof RechartsPrimitive.Legend>;
50
- declare const ChartLegend: import("react").MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
79
+ declare const ChartLegend: _$react.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
51
80
  type ChartLegendContentProps = ComponentProps<"div"> & ExtractProps<RechartsPrimitive.LegendProps["content"]> & {
52
- hideIcon?: boolean;
53
- nameKey?: string;
81
+ hideIcon?: boolean;
82
+ nameKey?: string;
54
83
  };
55
- declare function ChartLegendContent({ __scopeChart, className, hideIcon, nameKey, payload, verticalAlign, }: ScopedProps<ChartLegendContentProps>): ReactNode;
56
- export type { ChartConfig, ChartContainerProps, ChartLegendContentProps, ChartLegendProps, ChartStyleProps, ChartTooltipContentProps, ChartTooltipProps, };
57
- export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, createChartScope, };
84
+ declare function ChartLegendContent({
85
+ __scopeChart,
86
+ className,
87
+ hideIcon,
88
+ nameKey,
89
+ payload,
90
+ verticalAlign
91
+ }: ScopedProps<ChartLegendContentProps>): ReactNode;
92
+ //#endregion
93
+ export { type ChartConfig, ChartContainer, type ChartContainerProps, ChartLegend, ChartLegendContent, type ChartLegendContentProps, type ChartLegendProps, ChartStyle, type ChartStyleProps, ChartTooltip, ChartTooltipContent, type ChartTooltipContentProps, type ChartTooltipProps, createChartScope };