@grupor5/raya 0.2.1 → 0.2.2

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 (180) hide show
  1. package/README.md +47 -4
  2. package/dist/atoms/avatar/index.d.mts +12 -0
  3. package/dist/atoms/avatar/index.d.ts +12 -0
  4. package/dist/atoms/avatar/index.js +99 -0
  5. package/dist/atoms/avatar/index.mjs +76 -0
  6. package/dist/atoms/badge/index.d.mts +16 -0
  7. package/dist/atoms/badge/index.d.ts +16 -0
  8. package/dist/atoms/badge/index.js +149 -0
  9. package/dist/atoms/badge/index.mjs +146 -0
  10. package/dist/atoms/button/index.d.mts +11 -0
  11. package/dist/atoms/button/index.d.ts +11 -0
  12. package/dist/atoms/button/index.js +307 -0
  13. package/dist/atoms/button/index.mjs +301 -0
  14. package/dist/atoms/checkbox/index.d.mts +6 -0
  15. package/dist/atoms/checkbox/index.d.ts +6 -0
  16. package/dist/atoms/checkbox/index.js +98 -0
  17. package/dist/atoms/checkbox/index.mjs +75 -0
  18. package/dist/atoms/input/index.d.mts +12 -0
  19. package/dist/atoms/input/index.d.ts +12 -0
  20. package/dist/atoms/input/index.js +104 -0
  21. package/dist/atoms/input/index.mjs +82 -0
  22. package/dist/atoms/label/index.d.mts +8 -0
  23. package/dist/atoms/label/index.d.ts +8 -0
  24. package/dist/atoms/label/index.js +77 -0
  25. package/dist/atoms/label/index.mjs +54 -0
  26. package/dist/atoms/radio/index.d.mts +7 -0
  27. package/dist/atoms/radio/index.d.ts +7 -0
  28. package/dist/atoms/radio/index.js +97 -0
  29. package/dist/atoms/radio/index.mjs +73 -0
  30. package/dist/atoms/switch/index.d.mts +6 -0
  31. package/dist/atoms/switch/index.d.ts +6 -0
  32. package/dist/atoms/switch/index.js +97 -0
  33. package/dist/atoms/switch/index.mjs +74 -0
  34. package/dist/atoms/tag/index.d.mts +14 -0
  35. package/dist/atoms/tag/index.d.ts +14 -0
  36. package/dist/atoms/tag/index.js +128 -0
  37. package/dist/atoms/tag/index.mjs +122 -0
  38. package/dist/atoms/textarea/index.d.mts +11 -0
  39. package/dist/atoms/textarea/index.d.ts +11 -0
  40. package/dist/atoms/textarea/index.js +125 -0
  41. package/dist/atoms/textarea/index.mjs +103 -0
  42. package/dist/atoms/typography/index.d.mts +20 -0
  43. package/dist/atoms/typography/index.d.ts +20 -0
  44. package/dist/atoms/typography/index.js +140 -0
  45. package/dist/atoms/typography/index.mjs +115 -0
  46. package/dist/hooks/index.d.mts +1 -0
  47. package/dist/hooks/index.d.ts +1 -0
  48. package/dist/hooks/index.js +17 -0
  49. package/dist/hooks/index.mjs +15 -0
  50. package/dist/hooks/use-pagination.d.mts +10 -0
  51. package/dist/hooks/use-pagination.d.ts +10 -0
  52. package/dist/hooks/use-pagination.js +54 -0
  53. package/dist/hooks/use-pagination.mjs +51 -0
  54. package/dist/hooks/use-toast.d.mts +2 -0
  55. package/dist/hooks/use-toast.d.ts +2 -0
  56. package/dist/hooks/use-toast.js +2 -0
  57. package/dist/hooks/use-toast.mjs +1 -0
  58. package/dist/hooks/useModal.d.mts +7 -0
  59. package/dist/hooks/useModal.d.ts +7 -0
  60. package/dist/hooks/useModal.js +17 -0
  61. package/dist/hooks/useModal.mjs +15 -0
  62. package/dist/index.d.mts +50 -1298
  63. package/dist/index.d.ts +50 -1298
  64. package/dist/molecules/accordion/index.d.mts +17 -0
  65. package/dist/molecules/accordion/index.d.ts +17 -0
  66. package/dist/molecules/accordion/index.js +154 -0
  67. package/dist/molecules/accordion/index.mjs +128 -0
  68. package/dist/molecules/alert/index.d.mts +14 -0
  69. package/dist/molecules/alert/index.d.ts +14 -0
  70. package/dist/molecules/alert/index.js +425 -0
  71. package/dist/molecules/alert/index.mjs +402 -0
  72. package/dist/molecules/card/index.d.mts +10 -0
  73. package/dist/molecules/card/index.d.ts +10 -0
  74. package/dist/molecules/card/index.js +128 -0
  75. package/dist/molecules/card/index.mjs +101 -0
  76. package/dist/molecules/chart/index.d.mts +80 -0
  77. package/dist/molecules/chart/index.d.ts +80 -0
  78. package/dist/molecules/chart/index.js +300 -0
  79. package/dist/molecules/chart/index.mjs +272 -0
  80. package/dist/molecules/data-table/index.d.mts +57 -0
  81. package/dist/molecules/data-table/index.d.ts +57 -0
  82. package/dist/molecules/data-table/index.js +1456 -0
  83. package/dist/molecules/data-table/index.mjs +1430 -0
  84. package/dist/molecules/date-picker/index.d.mts +12 -0
  85. package/dist/molecules/date-picker/index.d.ts +12 -0
  86. package/dist/molecules/date-picker/index.js +756 -0
  87. package/dist/molecules/date-picker/index.mjs +734 -0
  88. package/dist/molecules/dropdown/index.d.mts +21 -0
  89. package/dist/molecules/dropdown/index.d.ts +21 -0
  90. package/dist/molecules/dropdown/index.js +221 -0
  91. package/dist/molecules/dropdown/index.mjs +198 -0
  92. package/dist/molecules/form/index.d.mts +19 -0
  93. package/dist/molecules/form/index.d.ts +19 -0
  94. package/dist/molecules/form/index.js +139 -0
  95. package/dist/molecules/form/index.mjs +114 -0
  96. package/dist/molecules/pagination/index.d.mts +15 -0
  97. package/dist/molecules/pagination/index.d.ts +15 -0
  98. package/dist/molecules/pagination/index.js +605 -0
  99. package/dist/molecules/pagination/index.mjs +583 -0
  100. package/dist/molecules/progress-bar/index.d.mts +15 -0
  101. package/dist/molecules/progress-bar/index.d.ts +15 -0
  102. package/dist/molecules/progress-bar/index.js +166 -0
  103. package/dist/molecules/progress-bar/index.mjs +144 -0
  104. package/dist/molecules/select/index.d.mts +15 -0
  105. package/dist/molecules/select/index.d.ts +15 -0
  106. package/dist/molecules/select/index.js +201 -0
  107. package/dist/molecules/select/index.mjs +169 -0
  108. package/dist/molecules/stepper/index.d.mts +67 -0
  109. package/dist/molecules/stepper/index.d.ts +67 -0
  110. package/dist/molecules/stepper/index.js +287 -0
  111. package/dist/molecules/stepper/index.mjs +260 -0
  112. package/dist/molecules/tabs/index.d.mts +9 -0
  113. package/dist/molecules/tabs/index.d.ts +9 -0
  114. package/dist/molecules/tabs/index.js +112 -0
  115. package/dist/molecules/tabs/index.mjs +86 -0
  116. package/dist/tokens/badge.d.mts +39 -0
  117. package/dist/tokens/badge.d.ts +39 -0
  118. package/dist/tokens/badge.js +61 -0
  119. package/dist/tokens/badge.mjs +59 -0
  120. package/dist/tokens/buttons.d.mts +277 -0
  121. package/dist/tokens/buttons.d.ts +277 -0
  122. package/dist/tokens/buttons.js +191 -0
  123. package/dist/tokens/buttons.mjs +173 -0
  124. package/dist/tokens/colors.d.mts +65 -0
  125. package/dist/tokens/colors.d.ts +65 -0
  126. package/dist/tokens/colors.js +68 -0
  127. package/dist/tokens/colors.mjs +66 -0
  128. package/dist/tokens/effects.d.mts +124 -0
  129. package/dist/tokens/effects.d.ts +124 -0
  130. package/dist/tokens/effects.js +130 -0
  131. package/dist/tokens/effects.mjs +115 -0
  132. package/dist/tokens/grids.d.mts +331 -0
  133. package/dist/tokens/grids.d.ts +331 -0
  134. package/dist/tokens/grids.js +305 -0
  135. package/dist/tokens/grids.mjs +292 -0
  136. package/dist/tokens/icons.d.mts +134 -0
  137. package/dist/tokens/icons.d.ts +134 -0
  138. package/dist/tokens/icons.js +108 -0
  139. package/dist/tokens/icons.mjs +97 -0
  140. package/dist/tokens/index.d.mts +6 -0
  141. package/dist/tokens/index.d.ts +6 -0
  142. package/dist/tokens/index.js +775 -0
  143. package/dist/tokens/index.mjs +743 -0
  144. package/dist/tokens/progress-bar.d.mts +31 -0
  145. package/dist/tokens/progress-bar.d.ts +31 -0
  146. package/dist/tokens/progress-bar.js +70 -0
  147. package/dist/tokens/progress-bar.mjs +68 -0
  148. package/dist/tokens/spacing.d.mts +90 -0
  149. package/dist/tokens/spacing.d.ts +90 -0
  150. package/dist/tokens/spacing.js +120 -0
  151. package/dist/tokens/spacing.mjs +109 -0
  152. package/dist/tokens/stroke.d.mts +292 -0
  153. package/dist/tokens/stroke.d.ts +292 -0
  154. package/dist/tokens/stroke.js +202 -0
  155. package/dist/tokens/stroke.mjs +186 -0
  156. package/dist/tokens/tab.d.mts +31 -0
  157. package/dist/tokens/tab.d.ts +31 -0
  158. package/dist/tokens/tab.js +48 -0
  159. package/dist/tokens/tab.mjs +46 -0
  160. package/dist/tokens/tag.d.mts +53 -0
  161. package/dist/tokens/tag.d.ts +53 -0
  162. package/dist/tokens/tag.js +80 -0
  163. package/dist/tokens/tag.mjs +78 -0
  164. package/dist/tokens/typography.d.mts +394 -0
  165. package/dist/tokens/typography.d.ts +394 -0
  166. package/dist/tokens/typography.js +302 -0
  167. package/dist/tokens/typography.mjs +292 -0
  168. package/dist/utils/classNames.d.mts +3 -0
  169. package/dist/utils/classNames.d.ts +3 -0
  170. package/dist/utils/classNames.js +8 -0
  171. package/dist/utils/classNames.mjs +6 -0
  172. package/dist/utils/cn.d.mts +5 -0
  173. package/dist/utils/cn.d.ts +5 -0
  174. package/dist/utils/cn.js +11 -0
  175. package/dist/utils/cn.mjs +9 -0
  176. package/dist/utils/index.d.mts +3 -0
  177. package/dist/utils/index.d.ts +3 -0
  178. package/dist/utils/index.js +15 -0
  179. package/dist/utils/index.mjs +12 -0
  180. package/package.json +34 -1
@@ -0,0 +1,80 @@
1
+ import * as recharts_types_util_useElementOffset from 'recharts/types/util/useElementOffset';
2
+ import * as recharts_types_state_cartesianAxisSlice from 'recharts/types/state/cartesianAxisSlice';
3
+ import * as recharts_types_chart_types from 'recharts/types/chart/types';
4
+ import * as recharts_types_util_payload_getUniqPayload from 'recharts/types/util/payload/getUniqPayload';
5
+ import * as recharts_types_state_tooltipSlice from 'recharts/types/state/tooltipSlice';
6
+ import * as recharts_types_component_Cursor from 'recharts/types/component/Cursor';
7
+ import * as recharts_types_component_Tooltip from 'recharts/types/component/Tooltip';
8
+ import * as recharts_types_util_types from 'recharts/types/util/types';
9
+ import * as recharts_types_component_DefaultTooltipContent from 'recharts/types/component/DefaultTooltipContent';
10
+ import * as react_jsx_runtime from 'react/jsx-runtime';
11
+ import * as React from 'react';
12
+ import * as RechartsPrimitive from 'recharts';
13
+
14
+ declare const THEMES: {
15
+ readonly light: "";
16
+ readonly dark: ".dark";
17
+ };
18
+ type ChartConfig = {
19
+ [k in string]: {
20
+ label?: React.ReactNode;
21
+ icon?: React.ComponentType;
22
+ } & ({
23
+ color?: string;
24
+ theme?: never;
25
+ } | {
26
+ color?: never;
27
+ theme: Record<keyof typeof THEMES, string>;
28
+ });
29
+ };
30
+ declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
31
+ config: ChartConfig;
32
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
33
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
34
+ declare const ChartStyle: ({ id, config }: {
35
+ id: string;
36
+ config: ChartConfig;
37
+ }) => react_jsx_runtime.JSX.Element | null;
38
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
39
+ declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<Omit<RechartsPrimitive.DefaultTooltipContentProps<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType>, "viewBox" | "active" | "label" | "payload" | "coordinate" | "accessibilityLayer"> & {
40
+ active?: boolean;
41
+ includeHidden?: boolean | undefined;
42
+ allowEscapeViewBox?: recharts_types_util_types.AllowInDimension;
43
+ animationDuration?: recharts_types_util_types.AnimationDuration;
44
+ animationEasing?: recharts_types_util_types.AnimationTiming;
45
+ content?: recharts_types_component_Tooltip.ContentType<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType> | undefined;
46
+ cursor?: recharts_types_component_Cursor.CursorDefinition;
47
+ filterNull?: boolean;
48
+ defaultIndex?: number | recharts_types_state_tooltipSlice.TooltipIndex;
49
+ isAnimationActive?: boolean;
50
+ offset?: number;
51
+ payloadUniqBy?: recharts_types_util_payload_getUniqPayload.UniqueOption<recharts_types_component_DefaultTooltipContent.Payload<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType>> | undefined;
52
+ portal?: HTMLElement | null;
53
+ position?: Partial<recharts_types_util_types.Coordinate>;
54
+ reverseDirection?: recharts_types_util_types.AllowInDimension;
55
+ shared?: boolean;
56
+ trigger?: recharts_types_chart_types.TooltipTrigger;
57
+ useTranslate3d?: boolean;
58
+ wrapperStyle?: React.CSSProperties;
59
+ axisId?: recharts_types_state_cartesianAxisSlice.AxisId;
60
+ } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
61
+ hideLabel?: boolean;
62
+ hideIndicator?: boolean;
63
+ indicator?: "line" | "dot" | "dashed";
64
+ nameKey?: string;
65
+ labelKey?: string;
66
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
67
+ declare const ChartLegend: typeof RechartsPrimitive.Legend;
68
+ declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Omit<RechartsPrimitive.DefaultLegendContentProps, "ref" | "payload"> & {
69
+ wrapperStyle?: React.CSSProperties;
70
+ width?: number;
71
+ height?: number;
72
+ payloadUniqBy?: recharts_types_util_payload_getUniqPayload.UniqueOption<RechartsPrimitive.LegendPayload>;
73
+ onBBoxUpdate?: (box: recharts_types_util_useElementOffset.ElementOffset | null) => void;
74
+ portal?: HTMLElement | null;
75
+ } & {
76
+ hideIcon?: boolean;
77
+ nameKey?: string;
78
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
79
+
80
+ export { type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
@@ -0,0 +1,80 @@
1
+ import * as recharts_types_util_useElementOffset from 'recharts/types/util/useElementOffset';
2
+ import * as recharts_types_state_cartesianAxisSlice from 'recharts/types/state/cartesianAxisSlice';
3
+ import * as recharts_types_chart_types from 'recharts/types/chart/types';
4
+ import * as recharts_types_util_payload_getUniqPayload from 'recharts/types/util/payload/getUniqPayload';
5
+ import * as recharts_types_state_tooltipSlice from 'recharts/types/state/tooltipSlice';
6
+ import * as recharts_types_component_Cursor from 'recharts/types/component/Cursor';
7
+ import * as recharts_types_component_Tooltip from 'recharts/types/component/Tooltip';
8
+ import * as recharts_types_util_types from 'recharts/types/util/types';
9
+ import * as recharts_types_component_DefaultTooltipContent from 'recharts/types/component/DefaultTooltipContent';
10
+ import * as react_jsx_runtime from 'react/jsx-runtime';
11
+ import * as React from 'react';
12
+ import * as RechartsPrimitive from 'recharts';
13
+
14
+ declare const THEMES: {
15
+ readonly light: "";
16
+ readonly dark: ".dark";
17
+ };
18
+ type ChartConfig = {
19
+ [k in string]: {
20
+ label?: React.ReactNode;
21
+ icon?: React.ComponentType;
22
+ } & ({
23
+ color?: string;
24
+ theme?: never;
25
+ } | {
26
+ color?: never;
27
+ theme: Record<keyof typeof THEMES, string>;
28
+ });
29
+ };
30
+ declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
31
+ config: ChartConfig;
32
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
33
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
34
+ declare const ChartStyle: ({ id, config }: {
35
+ id: string;
36
+ config: ChartConfig;
37
+ }) => react_jsx_runtime.JSX.Element | null;
38
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
39
+ declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<Omit<RechartsPrimitive.DefaultTooltipContentProps<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType>, "viewBox" | "active" | "label" | "payload" | "coordinate" | "accessibilityLayer"> & {
40
+ active?: boolean;
41
+ includeHidden?: boolean | undefined;
42
+ allowEscapeViewBox?: recharts_types_util_types.AllowInDimension;
43
+ animationDuration?: recharts_types_util_types.AnimationDuration;
44
+ animationEasing?: recharts_types_util_types.AnimationTiming;
45
+ content?: recharts_types_component_Tooltip.ContentType<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType> | undefined;
46
+ cursor?: recharts_types_component_Cursor.CursorDefinition;
47
+ filterNull?: boolean;
48
+ defaultIndex?: number | recharts_types_state_tooltipSlice.TooltipIndex;
49
+ isAnimationActive?: boolean;
50
+ offset?: number;
51
+ payloadUniqBy?: recharts_types_util_payload_getUniqPayload.UniqueOption<recharts_types_component_DefaultTooltipContent.Payload<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType>> | undefined;
52
+ portal?: HTMLElement | null;
53
+ position?: Partial<recharts_types_util_types.Coordinate>;
54
+ reverseDirection?: recharts_types_util_types.AllowInDimension;
55
+ shared?: boolean;
56
+ trigger?: recharts_types_chart_types.TooltipTrigger;
57
+ useTranslate3d?: boolean;
58
+ wrapperStyle?: React.CSSProperties;
59
+ axisId?: recharts_types_state_cartesianAxisSlice.AxisId;
60
+ } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
61
+ hideLabel?: boolean;
62
+ hideIndicator?: boolean;
63
+ indicator?: "line" | "dot" | "dashed";
64
+ nameKey?: string;
65
+ labelKey?: string;
66
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
67
+ declare const ChartLegend: typeof RechartsPrimitive.Legend;
68
+ declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Omit<RechartsPrimitive.DefaultLegendContentProps, "ref" | "payload"> & {
69
+ wrapperStyle?: React.CSSProperties;
70
+ width?: number;
71
+ height?: number;
72
+ payloadUniqBy?: recharts_types_util_payload_getUniqPayload.UniqueOption<RechartsPrimitive.LegendPayload>;
73
+ onBBoxUpdate?: (box: recharts_types_util_useElementOffset.ElementOffset | null) => void;
74
+ portal?: HTMLElement | null;
75
+ } & {
76
+ hideIcon?: boolean;
77
+ nameKey?: string;
78
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
79
+
80
+ export { type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
@@ -0,0 +1,300 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var RechartsPrimitive = require('recharts');
5
+ var clsx = require('clsx');
6
+ var tailwindMerge = require('tailwind-merge');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+ var RechartsPrimitive__namespace = /*#__PURE__*/_interopNamespace(RechartsPrimitive);
29
+
30
+ var __defProp = Object.defineProperty;
31
+ var __defProps = Object.defineProperties;
32
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
33
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
34
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
35
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
36
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
37
+ var __spreadValues = (a, b) => {
38
+ for (var prop in b || (b = {}))
39
+ if (__hasOwnProp.call(b, prop))
40
+ __defNormalProp(a, prop, b[prop]);
41
+ if (__getOwnPropSymbols)
42
+ for (var prop of __getOwnPropSymbols(b)) {
43
+ if (__propIsEnum.call(b, prop))
44
+ __defNormalProp(a, prop, b[prop]);
45
+ }
46
+ return a;
47
+ };
48
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
49
+ var __objRest = (source, exclude) => {
50
+ var target = {};
51
+ for (var prop in source)
52
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
53
+ target[prop] = source[prop];
54
+ if (source != null && __getOwnPropSymbols)
55
+ for (var prop of __getOwnPropSymbols(source)) {
56
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
57
+ target[prop] = source[prop];
58
+ }
59
+ return target;
60
+ };
61
+ function cn(...inputs) {
62
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
63
+ }
64
+ var THEMES = { light: "", dark: ".dark" };
65
+ var ChartContext = React__namespace.createContext(null);
66
+ function useChart() {
67
+ const context = React__namespace.useContext(ChartContext);
68
+ if (!context) {
69
+ throw new Error("useChart must be used within a <ChartContainer />");
70
+ }
71
+ return context;
72
+ }
73
+ var ChartContainer = React__namespace.forwardRef((_a, ref) => {
74
+ var _b = _a, { id, className, children, config } = _b, props = __objRest(_b, ["id", "className", "children", "config"]);
75
+ const uniqueId = React__namespace.useId();
76
+ const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
77
+ return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
78
+ "div",
79
+ __spreadProps(__spreadValues({
80
+ "data-chart": chartId,
81
+ ref,
82
+ className: cn(
83
+ "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
84
+ className
85
+ )
86
+ }, props), {
87
+ children: [
88
+ /* @__PURE__ */ jsxRuntime.jsx(ChartStyle, { id: chartId, config }),
89
+ /* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive__namespace.ResponsiveContainer, { children })
90
+ ]
91
+ })
92
+ ) });
93
+ });
94
+ ChartContainer.displayName = "Chart";
95
+ var ChartStyle = ({ id, config }) => {
96
+ const colorConfig = Object.entries(config).filter(
97
+ ([, config2]) => config2.theme || config2.color
98
+ );
99
+ if (!colorConfig.length) {
100
+ return null;
101
+ }
102
+ return /* @__PURE__ */ jsxRuntime.jsx(
103
+ "style",
104
+ {
105
+ dangerouslySetInnerHTML: {
106
+ __html: Object.entries(THEMES).map(
107
+ ([theme, prefix]) => `
108
+ ${prefix} [data-chart=${id}] {
109
+ ${colorConfig.map(([key, itemConfig]) => {
110
+ var _a;
111
+ const color = ((_a = itemConfig.theme) == null ? void 0 : _a[theme]) || itemConfig.color;
112
+ return color ? ` --color-${key}: ${color};` : null;
113
+ }).join("\n")}
114
+ }
115
+ `
116
+ ).join("\n")
117
+ }
118
+ }
119
+ );
120
+ };
121
+ var ChartTooltip = RechartsPrimitive__namespace.Tooltip;
122
+ var ChartTooltipContent = React__namespace.forwardRef(
123
+ ({
124
+ active,
125
+ payload,
126
+ className,
127
+ indicator = "dot",
128
+ hideLabel = false,
129
+ hideIndicator = false,
130
+ label,
131
+ labelFormatter,
132
+ labelClassName,
133
+ formatter,
134
+ color,
135
+ nameKey,
136
+ labelKey
137
+ }, ref) => {
138
+ const { config } = useChart();
139
+ const tooltipLabel = React__namespace.useMemo(() => {
140
+ var _a;
141
+ if (hideLabel || !(payload == null ? void 0 : payload.length)) {
142
+ return null;
143
+ }
144
+ const [item] = payload;
145
+ const key = `${labelKey || (item == null ? void 0 : item.dataKey) || (item == null ? void 0 : item.name) || "value"}`;
146
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
147
+ const value = !labelKey && typeof label === "string" ? ((_a = config[label]) == null ? void 0 : _a.label) || label : itemConfig == null ? void 0 : itemConfig.label;
148
+ if (labelFormatter) {
149
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
150
+ }
151
+ if (!value) {
152
+ return null;
153
+ }
154
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("font-medium", labelClassName), children: value });
155
+ }, [
156
+ label,
157
+ labelFormatter,
158
+ payload,
159
+ hideLabel,
160
+ labelClassName,
161
+ config,
162
+ labelKey
163
+ ]);
164
+ if (!active || !(payload == null ? void 0 : payload.length)) {
165
+ return null;
166
+ }
167
+ const nestLabel = payload.length === 1 && indicator !== "dot";
168
+ return /* @__PURE__ */ jsxRuntime.jsxs(
169
+ "div",
170
+ {
171
+ ref,
172
+ className: cn(
173
+ "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
174
+ className
175
+ ),
176
+ children: [
177
+ !nestLabel ? tooltipLabel : null,
178
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
179
+ const key = `${nameKey || item.name || item.dataKey || "value"}`;
180
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
181
+ const indicatorColor = color || item.payload.fill || item.color;
182
+ return /* @__PURE__ */ jsxRuntime.jsx(
183
+ "div",
184
+ {
185
+ className: cn(
186
+ "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
187
+ indicator === "dot" && "items-center"
188
+ ),
189
+ children: formatter && (item == null ? void 0 : item.value) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
190
+ (itemConfig == null ? void 0 : itemConfig.icon) ? /* @__PURE__ */ jsxRuntime.jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsxRuntime.jsx(
191
+ "div",
192
+ {
193
+ className: cn(
194
+ "shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",
195
+ {
196
+ "h-2.5 w-2.5": indicator === "dot",
197
+ "w-1": indicator === "line",
198
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
199
+ "my-0.5": nestLabel && indicator === "dashed"
200
+ }
201
+ ),
202
+ style: {
203
+ "--color-bg": indicatorColor,
204
+ "--color-border": indicatorColor
205
+ }
206
+ }
207
+ ),
208
+ /* @__PURE__ */ jsxRuntime.jsxs(
209
+ "div",
210
+ {
211
+ className: cn(
212
+ "flex flex-1 justify-between leading-none",
213
+ nestLabel ? "items-end" : "items-center"
214
+ ),
215
+ children: [
216
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1.5", children: [
217
+ nestLabel ? tooltipLabel : null,
218
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: (itemConfig == null ? void 0 : itemConfig.label) || item.name })
219
+ ] }),
220
+ item.value && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
221
+ ]
222
+ }
223
+ )
224
+ ] })
225
+ },
226
+ item.dataKey
227
+ );
228
+ }) })
229
+ ]
230
+ }
231
+ );
232
+ }
233
+ );
234
+ ChartTooltipContent.displayName = "ChartTooltip";
235
+ var ChartLegend = RechartsPrimitive__namespace.Legend;
236
+ var ChartLegendContent = React__namespace.forwardRef(
237
+ ({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
238
+ const { config } = useChart();
239
+ if (!(payload == null ? void 0 : payload.length)) {
240
+ return null;
241
+ }
242
+ return /* @__PURE__ */ jsxRuntime.jsx(
243
+ "div",
244
+ {
245
+ ref,
246
+ className: cn(
247
+ "flex items-center justify-center gap-4",
248
+ verticalAlign === "top" ? "pb-3" : "pt-3",
249
+ className
250
+ ),
251
+ children: payload.map((item) => {
252
+ const key = `${nameKey || item.dataKey || "value"}`;
253
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
254
+ return /* @__PURE__ */ jsxRuntime.jsxs(
255
+ "div",
256
+ {
257
+ className: cn(
258
+ "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
259
+ ),
260
+ children: [
261
+ (itemConfig == null ? void 0 : itemConfig.icon) && !hideIcon ? /* @__PURE__ */ jsxRuntime.jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsxRuntime.jsx(
262
+ "div",
263
+ {
264
+ className: "h-2 w-2 shrink-0 rounded-[2px]",
265
+ style: {
266
+ backgroundColor: item.color
267
+ }
268
+ }
269
+ ),
270
+ itemConfig == null ? void 0 : itemConfig.label
271
+ ]
272
+ },
273
+ item.value
274
+ );
275
+ })
276
+ }
277
+ );
278
+ }
279
+ );
280
+ ChartLegendContent.displayName = "ChartLegend";
281
+ function getPayloadConfigFromPayload(config, payload, key) {
282
+ if (typeof payload !== "object" || payload === null) {
283
+ return void 0;
284
+ }
285
+ const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
286
+ let configLabelKey = key;
287
+ if (key in payload && typeof payload[key] === "string") {
288
+ configLabelKey = payload[key];
289
+ } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
290
+ configLabelKey = payloadPayload[key];
291
+ }
292
+ return configLabelKey in config ? config[configLabelKey] : config[key];
293
+ }
294
+
295
+ exports.ChartContainer = ChartContainer;
296
+ exports.ChartLegend = ChartLegend;
297
+ exports.ChartLegendContent = ChartLegendContent;
298
+ exports.ChartStyle = ChartStyle;
299
+ exports.ChartTooltip = ChartTooltip;
300
+ exports.ChartTooltipContent = ChartTooltipContent;