@caffeinebounce/ui 0.62.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 (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -0
  3. package/dist/FinancialStatementTable-BNUrdTU4.d.cts +249 -0
  4. package/dist/FinancialStatementTable-BNUrdTU4.d.ts +249 -0
  5. package/dist/NewsletterSignup-BPreFi5W.d.cts +37 -0
  6. package/dist/NewsletterSignup-BPreFi5W.d.ts +37 -0
  7. package/dist/TestimonialsSection-DtPu2OeR.d.ts +736 -0
  8. package/dist/TestimonialsSection-z-yotRfv.d.cts +736 -0
  9. package/dist/UnifiedTableControls-CG299y9h.d.ts +1233 -0
  10. package/dist/UnifiedTableControls-CIjRpNhy.d.cts +1233 -0
  11. package/dist/blog.d.cts +99 -0
  12. package/dist/blog.d.ts +99 -0
  13. package/dist/blog.js +292 -0
  14. package/dist/blog.mjs +279 -0
  15. package/dist/button-BHnoRUkF.d.cts +34 -0
  16. package/dist/button-BHnoRUkF.d.ts +34 -0
  17. package/dist/charts.d.cts +80 -0
  18. package/dist/charts.d.ts +80 -0
  19. package/dist/charts.js +19 -0
  20. package/dist/charts.mjs +2 -0
  21. package/dist/chunk-33JR5SYE.js +44 -0
  22. package/dist/chunk-3NDB4YPC.js +247 -0
  23. package/dist/chunk-5RW4PYZ6.js +1504 -0
  24. package/dist/chunk-5THF4YP6.mjs +155 -0
  25. package/dist/chunk-6BUBNZPG.mjs +164 -0
  26. package/dist/chunk-6DVWMJ3H.mjs +7029 -0
  27. package/dist/chunk-6TGV2DNP.js +120 -0
  28. package/dist/chunk-72JGQ7IJ.mjs +1498 -0
  29. package/dist/chunk-7DHKQODW.mjs +2932 -0
  30. package/dist/chunk-7IKHZKAC.js +160 -0
  31. package/dist/chunk-ADIDI7AJ.js +11 -0
  32. package/dist/chunk-BFWX5GJZ.mjs +940 -0
  33. package/dist/chunk-BMFQG6RA.mjs +5537 -0
  34. package/dist/chunk-C4UT5V3P.js +65 -0
  35. package/dist/chunk-CC4KUIKC.js +2004 -0
  36. package/dist/chunk-D3QXPL47.mjs +1814 -0
  37. package/dist/chunk-DQWHYBV2.js +36 -0
  38. package/dist/chunk-E42B4GSB.js +993 -0
  39. package/dist/chunk-ESZ7CBA2.js +1007 -0
  40. package/dist/chunk-EYJJQVV4.js +111 -0
  41. package/dist/chunk-FRRS2YZH.mjs +129 -0
  42. package/dist/chunk-G5TQWWQA.mjs +37 -0
  43. package/dist/chunk-GAIQJCAZ.js +5612 -0
  44. package/dist/chunk-GMBGWOCR.mjs +48 -0
  45. package/dist/chunk-GUSTCU2W.mjs +105 -0
  46. package/dist/chunk-HBLKVQIQ.mjs +23 -0
  47. package/dist/chunk-HMAMMC72.js +26 -0
  48. package/dist/chunk-IMKLN273.mjs +9 -0
  49. package/dist/chunk-J6OLBSZR.js +250 -0
  50. package/dist/chunk-JAE45W2T.js +28 -0
  51. package/dist/chunk-JORVSG52.js +606 -0
  52. package/dist/chunk-KB7UXIQZ.mjs +984 -0
  53. package/dist/chunk-KGGQ5NZV.js +186 -0
  54. package/dist/chunk-KHCC5UKW.mjs +22 -0
  55. package/dist/chunk-KRRIRS6A.mjs +1945 -0
  56. package/dist/chunk-LQCVRWVF.js +48 -0
  57. package/dist/chunk-MHZXUOGN.mjs +168 -0
  58. package/dist/chunk-MPZFPU4X.js +349 -0
  59. package/dist/chunk-MVYRNJA6.js +74 -0
  60. package/dist/chunk-N6AFNFZR.mjs +565 -0
  61. package/dist/chunk-OFQLWSUR.mjs +214 -0
  62. package/dist/chunk-OLAAXLXY.mjs +219 -0
  63. package/dist/chunk-OZZWDIOY.js +1859 -0
  64. package/dist/chunk-PZRI43EZ.js +111 -0
  65. package/dist/chunk-Q256HRYD.js +176 -0
  66. package/dist/chunk-Q52ZEL62.mjs +223 -0
  67. package/dist/chunk-R26Y7LGJ.js +142 -0
  68. package/dist/chunk-RBUYW6QQ.js +39 -0
  69. package/dist/chunk-RVEFPVZF.mjs +43 -0
  70. package/dist/chunk-SORWLKOK.js +96 -0
  71. package/dist/chunk-STEP6C4C.mjs +33 -0
  72. package/dist/chunk-T5R6HUDG.mjs +22 -0
  73. package/dist/chunk-T6ZBA6VJ.js +7109 -0
  74. package/dist/chunk-UM7WMXIU.js +2995 -0
  75. package/dist/chunk-VBD4Q5LL.mjs +117 -0
  76. package/dist/chunk-WOITB4JL.js +195 -0
  77. package/dist/chunk-YKZEKJMZ.mjs +71 -0
  78. package/dist/chunk-YL7RZRHM.mjs +103 -0
  79. package/dist/chunk-YSLD2HLP.mjs +346 -0
  80. package/dist/chunk-ZFLZA7UP.mjs +140 -0
  81. package/dist/chunk-ZKUIUE7W.mjs +26 -0
  82. package/dist/chunk-ZOA7B32D.js +248 -0
  83. package/dist/data-table.d.cts +46 -0
  84. package/dist/data-table.d.ts +46 -0
  85. package/dist/data-table.js +270 -0
  86. package/dist/data-table.mjs +13 -0
  87. package/dist/editor.d.cts +89 -0
  88. package/dist/editor.d.ts +89 -0
  89. package/dist/editor.js +10 -0
  90. package/dist/editor.mjs +1 -0
  91. package/dist/forms.d.cts +142 -0
  92. package/dist/forms.d.ts +142 -0
  93. package/dist/forms.js +24 -0
  94. package/dist/forms.mjs +11 -0
  95. package/dist/hooks-8ORd7T1A.d.cts +751 -0
  96. package/dist/hooks-B2jU1GVT.d.ts +751 -0
  97. package/dist/hooks.d.cts +6 -0
  98. package/dist/hooks.d.ts +6 -0
  99. package/dist/hooks.js +99 -0
  100. package/dist/hooks.mjs +10 -0
  101. package/dist/index.d.cts +3141 -0
  102. package/dist/index.d.ts +3141 -0
  103. package/dist/index.js +7332 -0
  104. package/dist/index.mjs +5876 -0
  105. package/dist/layouts-DPfDDF53.d.cts +1001 -0
  106. package/dist/layouts-DPfDDF53.d.ts +1001 -0
  107. package/dist/layouts.d.cts +4 -0
  108. package/dist/layouts.d.ts +4 -0
  109. package/dist/layouts.js +100 -0
  110. package/dist/layouts.mjs +11 -0
  111. package/dist/marketing-3d.d.cts +51 -0
  112. package/dist/marketing-3d.d.ts +51 -0
  113. package/dist/marketing-3d.js +553 -0
  114. package/dist/marketing-3d.mjs +526 -0
  115. package/dist/marketing.d.cts +583 -0
  116. package/dist/marketing.d.ts +583 -0
  117. package/dist/marketing.js +299 -0
  118. package/dist/marketing.mjs +10 -0
  119. package/dist/media.d.cts +29 -0
  120. package/dist/media.d.ts +29 -0
  121. package/dist/media.js +189 -0
  122. package/dist/media.mjs +182 -0
  123. package/dist/navigation.d.cts +591 -0
  124. package/dist/navigation.d.ts +591 -0
  125. package/dist/navigation.js +108 -0
  126. package/dist/navigation.mjs +15 -0
  127. package/dist/portal.d.cts +58 -0
  128. package/dist/portal.d.ts +58 -0
  129. package/dist/portal.js +403 -0
  130. package/dist/portal.mjs +395 -0
  131. package/dist/primitives.d.cts +508 -0
  132. package/dist/primitives.d.ts +508 -0
  133. package/dist/primitives.js +295 -0
  134. package/dist/primitives.mjs +14 -0
  135. package/dist/settings.d.cts +216 -0
  136. package/dist/settings.d.ts +216 -0
  137. package/dist/settings.js +34 -0
  138. package/dist/settings.mjs +9 -0
  139. package/dist/shared-Dqn36QHZ.d.cts +4 -0
  140. package/dist/shared-Dqn36QHZ.d.ts +4 -0
  141. package/dist/styles.css +1213 -0
  142. package/package.json +189 -0
  143. package/styles.css +1 -0
@@ -0,0 +1,247 @@
1
+ 'use strict';
2
+
3
+ var chunkADIDI7AJ_js = require('./chunk-ADIDI7AJ.js');
4
+ var React = require('react');
5
+ var recharts = require('recharts');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ var ChartContext = React__namespace.createContext(null);
29
+ function useChart() {
30
+ const context = React__namespace.useContext(ChartContext);
31
+ if (!context) {
32
+ throw new Error("useChart must be used within a <ChartContainer />");
33
+ }
34
+ return context;
35
+ }
36
+ var ChartContainer = React__namespace.forwardRef(({ id, className, children, config, ...props }, ref) => {
37
+ const uniqueId = React__namespace.useId();
38
+ const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
39
+ const containerRef = React__namespace.useRef(null);
40
+ const [_dimensions, setDimensions] = React__namespace.useState(null);
41
+ React__namespace.useImperativeHandle(ref, () => containerRef.current);
42
+ React__namespace.useEffect(() => {
43
+ const container = containerRef.current;
44
+ if (!container) return;
45
+ const updateDimensions = () => {
46
+ const { width, height } = container.getBoundingClientRect();
47
+ if (width > 0 && height > 0) {
48
+ setDimensions({ width: Math.floor(width), height: Math.floor(height) });
49
+ }
50
+ };
51
+ const timeout = setTimeout(updateDimensions, 50);
52
+ const resizeObserver = new ResizeObserver((entries) => {
53
+ for (const entry of entries) {
54
+ const { width, height } = entry.contentRect;
55
+ if (width > 0 && height > 0) {
56
+ setDimensions({
57
+ width: Math.floor(width),
58
+ height: Math.floor(height)
59
+ });
60
+ }
61
+ }
62
+ });
63
+ resizeObserver.observe(container);
64
+ return () => {
65
+ clearTimeout(timeout);
66
+ resizeObserver.disconnect();
67
+ };
68
+ }, []);
69
+ return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
70
+ "div",
71
+ {
72
+ "data-chart": chartId,
73
+ ref: containerRef,
74
+ className: chunkADIDI7AJ_js.cn(
75
+ "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",
76
+ className
77
+ ),
78
+ ...props,
79
+ children: [
80
+ /* @__PURE__ */ jsxRuntime.jsx(ChartStyle, { id: chartId, config }),
81
+ children
82
+ ]
83
+ }
84
+ ) });
85
+ });
86
+ ChartContainer.displayName = "ChartContainer";
87
+ var ChartStyle = ({ id, config }) => {
88
+ const colorConfig = Object.entries(config).filter(
89
+ ([_, config2]) => config2.theme || config2.color
90
+ );
91
+ if (!colorConfig.length) {
92
+ return null;
93
+ }
94
+ return /* @__PURE__ */ jsxRuntime.jsx(
95
+ "style",
96
+ {
97
+ dangerouslySetInnerHTML: {
98
+ __html: Object.entries(config).map(([key, item]) => {
99
+ const color = item.theme || item.color;
100
+ if (color && typeof color === "string") {
101
+ return `
102
+ [data-chart=${id}] {
103
+ --color-${key}: ${color};
104
+ }
105
+ `;
106
+ }
107
+ if (color && typeof color === "object") {
108
+ return `
109
+ [data-chart=${id}] {
110
+ --color-${key}: ${color.light};
111
+ }
112
+ .dark [data-chart=${id}] {
113
+ --color-${key}: ${color.dark};
114
+ }
115
+ `;
116
+ }
117
+ return "";
118
+ }).join("\n")
119
+ }
120
+ }
121
+ );
122
+ };
123
+ var ChartTooltip = recharts.Tooltip;
124
+ var ChartTooltipContent = React__namespace.forwardRef(
125
+ ({
126
+ active,
127
+ payload,
128
+ className,
129
+ indicator = "dot",
130
+ hideLabel = false,
131
+ hideIndicator = false,
132
+ label,
133
+ labelFormatter,
134
+ labelKey,
135
+ nameKey,
136
+ color
137
+ }, ref) => {
138
+ const { config } = useChart();
139
+ const tooltipLabel = React__namespace.useMemo(() => {
140
+ if (hideLabel || !payload?.length) {
141
+ return null;
142
+ }
143
+ const [item] = payload;
144
+ const key = `${labelKey || item.dataKey || item.name || "value"}`;
145
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
146
+ const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
147
+ if (labelFormatter) {
148
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkADIDI7AJ_js.cn("font-medium", className), children: labelFormatter(value, payload) });
149
+ }
150
+ if (!value) {
151
+ return null;
152
+ }
153
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkADIDI7AJ_js.cn("font-medium", className), children: value });
154
+ }, [
155
+ label,
156
+ labelFormatter,
157
+ payload,
158
+ hideLabel,
159
+ className,
160
+ config,
161
+ labelKey
162
+ ]);
163
+ if (!active || !payload?.length) {
164
+ return null;
165
+ }
166
+ const nestLabel = payload.length === 1 && indicator !== "dot";
167
+ return /* @__PURE__ */ jsxRuntime.jsxs(
168
+ "div",
169
+ {
170
+ ref,
171
+ className: chunkADIDI7AJ_js.cn(
172
+ "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",
173
+ className
174
+ ),
175
+ children: [
176
+ !nestLabel ? tooltipLabel : null,
177
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-1.5", children: payload.map((item, _index) => {
178
+ const key = `${nameKey || item.name || item.dataKey || "value"}`;
179
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
180
+ const indicatorColor = color || item.payload?.fill || item.color;
181
+ return /* @__PURE__ */ jsxRuntime.jsxs(
182
+ "div",
183
+ {
184
+ className: chunkADIDI7AJ_js.cn(
185
+ "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
186
+ indicator === "dot" && "items-center"
187
+ ),
188
+ children: [
189
+ itemConfig?.icon ? /* @__PURE__ */ jsxRuntime.jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsxRuntime.jsx(
190
+ "div",
191
+ {
192
+ className: chunkADIDI7AJ_js.cn(
193
+ "shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",
194
+ {
195
+ "h-2.5 w-2.5": indicator === "dot",
196
+ "w-1": indicator === "line",
197
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
198
+ "my-0.5": nestLabel && indicator === "dashed"
199
+ }
200
+ ),
201
+ style: {
202
+ "--color-bg": indicatorColor,
203
+ "--color-border": indicatorColor
204
+ }
205
+ }
206
+ ),
207
+ /* @__PURE__ */ jsxRuntime.jsxs(
208
+ "div",
209
+ {
210
+ className: chunkADIDI7AJ_js.cn(
211
+ "flex flex-1 justify-between leading-none",
212
+ nestLabel ? "items-end" : "items-center"
213
+ ),
214
+ children: [
215
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1.5", children: [
216
+ nestLabel ? tooltipLabel : null,
217
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
218
+ ] }),
219
+ item.value && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
220
+ ]
221
+ }
222
+ )
223
+ ]
224
+ },
225
+ item.dataKey
226
+ );
227
+ }) })
228
+ ]
229
+ }
230
+ );
231
+ }
232
+ );
233
+ ChartTooltipContent.displayName = "ChartTooltipContent";
234
+ function getPayloadConfigFromPayload(config, payload, key) {
235
+ const payloadPayload = payload.payload;
236
+ let configLabelKey = key;
237
+ if (key in payload && typeof payload[key] === "string") {
238
+ configLabelKey = payload[key];
239
+ } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
240
+ configLabelKey = payloadPayload[key];
241
+ }
242
+ return configLabelKey in config ? config[configLabelKey] : config[key];
243
+ }
244
+
245
+ exports.ChartContainer = ChartContainer;
246
+ exports.ChartTooltip = ChartTooltip;
247
+ exports.ChartTooltipContent = ChartTooltipContent;