@cupcodev/ui 1.0.2 → 1.0.7
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.
- package/README.md +144 -93
- package/dist/{charts-KwYmX5He.d.cts → charts-DqY2Q-7w.d.cts} +8 -8
- package/dist/{charts-KwYmX5He.d.ts → charts-DqY2Q-7w.d.ts} +8 -8
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.cts +1 -1
- package/dist/charts.d.ts +1 -1
- package/dist/charts.js +0 -1
- package/dist/index.cjs +1154 -976
- package/dist/index.d.cts +70 -55
- package/dist/index.d.ts +70 -55
- package/dist/index.js +1126 -949
- package/package.json +166 -157
- package/styles/base.css +24 -0
- package/styles/dock.css +875 -858
- package/styles/global.css +1192 -1190
- package/styles/index.css +3 -0
- package/styles/tokens.css +305 -305
- package/tailwind-preset.cjs +192 -192
- package/dist/charts 2.cjs +0 -500
- package/dist/charts 2.js +0 -454
- package/dist/charts-KwYmX5He.d 2.cts +0 -97
- package/dist/charts-KwYmX5He.d 2.ts +0 -97
- package/dist/charts.cjs 2.map +0 -1
- package/dist/charts.cjs.map +0 -1
- package/dist/charts.d 2.cts +0 -11
- package/dist/charts.d 2.ts +0 -11
- package/dist/charts.js 2.map +0 -1
- package/dist/charts.js.map +0 -1
- package/dist/index 2.cjs +0 -6568
- package/dist/index 2.js +0 -6207
- package/dist/index.cjs 2.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d 2.cts +0 -1019
- package/dist/index.d 2.ts +0 -1019
- package/dist/index.js 2.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/charts 2.js
DELETED
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
// src/components/ui/chart.tsx
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as RechartsPrimitive from "recharts";
|
|
4
|
-
|
|
5
|
-
// src/lib/utils.ts
|
|
6
|
-
import { clsx } from "clsx";
|
|
7
|
-
import { twMerge } from "tailwind-merge";
|
|
8
|
-
function cn(...inputs) {
|
|
9
|
-
return twMerge(clsx(inputs));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// src/components/ui/chart.tsx
|
|
13
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
var THEMES = { light: "", dark: ".dark" };
|
|
15
|
-
var ChartContext = React.createContext(null);
|
|
16
|
-
function useChart() {
|
|
17
|
-
const context = React.useContext(ChartContext);
|
|
18
|
-
if (!context) {
|
|
19
|
-
throw new Error("useChart must be used within a <ChartContainer />");
|
|
20
|
-
}
|
|
21
|
-
return context;
|
|
22
|
-
}
|
|
23
|
-
var ChartContainer = React.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
24
|
-
const uniqueId = React.useId();
|
|
25
|
-
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
26
|
-
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
"data-chart": chartId,
|
|
30
|
-
ref,
|
|
31
|
-
className: cn(
|
|
32
|
-
"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",
|
|
33
|
-
className
|
|
34
|
-
),
|
|
35
|
-
...props,
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
38
|
-
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
) });
|
|
42
|
-
});
|
|
43
|
-
ChartContainer.displayName = "Chart";
|
|
44
|
-
var ChartStyle = ({ id, config }) => {
|
|
45
|
-
const colorConfig = Object.entries(config).filter(([_, config2]) => config2.theme || config2.color);
|
|
46
|
-
if (!colorConfig.length) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
return /* @__PURE__ */ jsx(
|
|
50
|
-
"style",
|
|
51
|
-
{
|
|
52
|
-
dangerouslySetInnerHTML: {
|
|
53
|
-
__html: Object.entries(THEMES).map(
|
|
54
|
-
([theme, prefix]) => `
|
|
55
|
-
${prefix} [data-chart=${id}] {
|
|
56
|
-
${colorConfig.map(([key, itemConfig]) => {
|
|
57
|
-
var _a;
|
|
58
|
-
const color = ((_a = itemConfig.theme) == null ? void 0 : _a[theme]) || itemConfig.color;
|
|
59
|
-
return color ? ` --color-${key}: ${color};` : null;
|
|
60
|
-
}).join("\n")}
|
|
61
|
-
}
|
|
62
|
-
`
|
|
63
|
-
).join("\n")
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
69
|
-
var ChartTooltipContent = React.forwardRef(
|
|
70
|
-
({
|
|
71
|
-
active,
|
|
72
|
-
payload,
|
|
73
|
-
className,
|
|
74
|
-
indicator = "dot",
|
|
75
|
-
hideLabel = false,
|
|
76
|
-
hideIndicator = false,
|
|
77
|
-
label,
|
|
78
|
-
labelFormatter,
|
|
79
|
-
labelClassName,
|
|
80
|
-
formatter,
|
|
81
|
-
color,
|
|
82
|
-
nameKey,
|
|
83
|
-
labelKey
|
|
84
|
-
}, ref) => {
|
|
85
|
-
const { config } = useChart();
|
|
86
|
-
const tooltipLabel = React.useMemo(() => {
|
|
87
|
-
var _a;
|
|
88
|
-
if (hideLabel || !(payload == null ? void 0 : payload.length)) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
const [item] = payload;
|
|
92
|
-
const key = `${labelKey || item.dataKey || item.name || "value"}`;
|
|
93
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
94
|
-
const value = !labelKey && typeof label === "string" ? ((_a = config[label]) == null ? void 0 : _a.label) || label : itemConfig == null ? void 0 : itemConfig.label;
|
|
95
|
-
if (labelFormatter) {
|
|
96
|
-
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
97
|
-
}
|
|
98
|
-
if (!value) {
|
|
99
|
-
return null;
|
|
100
|
-
}
|
|
101
|
-
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
102
|
-
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
103
|
-
if (!active || !(payload == null ? void 0 : payload.length)) {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
107
|
-
return /* @__PURE__ */ jsxs(
|
|
108
|
-
"div",
|
|
109
|
-
{
|
|
110
|
-
ref,
|
|
111
|
-
className: cn(
|
|
112
|
-
"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",
|
|
113
|
-
className
|
|
114
|
-
),
|
|
115
|
-
children: [
|
|
116
|
-
!nestLabel ? tooltipLabel : null,
|
|
117
|
-
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
118
|
-
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
119
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
120
|
-
const indicatorColor = color || item.payload.fill || item.color;
|
|
121
|
-
return /* @__PURE__ */ jsx(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
className: cn(
|
|
125
|
-
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
126
|
-
indicator === "dot" && "items-center"
|
|
127
|
-
),
|
|
128
|
-
children: formatter && (item == null ? void 0 : item.value) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
129
|
-
(itemConfig == null ? void 0 : itemConfig.icon) ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
130
|
-
"div",
|
|
131
|
-
{
|
|
132
|
-
className: cn("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
|
|
133
|
-
"h-2.5 w-2.5": indicator === "dot",
|
|
134
|
-
"w-1": indicator === "line",
|
|
135
|
-
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
136
|
-
"my-0.5": nestLabel && indicator === "dashed"
|
|
137
|
-
}),
|
|
138
|
-
style: {
|
|
139
|
-
"--color-bg": indicatorColor,
|
|
140
|
-
"--color-border": indicatorColor
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
),
|
|
144
|
-
/* @__PURE__ */ jsxs(
|
|
145
|
-
"div",
|
|
146
|
-
{
|
|
147
|
-
className: cn(
|
|
148
|
-
"flex flex-1 justify-between leading-none",
|
|
149
|
-
nestLabel ? "items-end" : "items-center"
|
|
150
|
-
),
|
|
151
|
-
children: [
|
|
152
|
-
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
153
|
-
nestLabel ? tooltipLabel : null,
|
|
154
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: (itemConfig == null ? void 0 : itemConfig.label) || item.name })
|
|
155
|
-
] }),
|
|
156
|
-
item.value && /* @__PURE__ */ jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
)
|
|
160
|
-
] })
|
|
161
|
-
},
|
|
162
|
-
item.dataKey
|
|
163
|
-
);
|
|
164
|
-
}) })
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
);
|
|
170
|
-
ChartTooltipContent.displayName = "ChartTooltip";
|
|
171
|
-
var ChartLegend = RechartsPrimitive.Legend;
|
|
172
|
-
var ChartLegendContent = React.forwardRef(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
173
|
-
const { config } = useChart();
|
|
174
|
-
if (!(payload == null ? void 0 : payload.length)) {
|
|
175
|
-
return null;
|
|
176
|
-
}
|
|
177
|
-
return /* @__PURE__ */ jsx(
|
|
178
|
-
"div",
|
|
179
|
-
{
|
|
180
|
-
ref,
|
|
181
|
-
className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
|
|
182
|
-
children: payload.map((item) => {
|
|
183
|
-
const key = `${nameKey || item.dataKey || "value"}`;
|
|
184
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
185
|
-
return /* @__PURE__ */ jsxs(
|
|
186
|
-
"div",
|
|
187
|
-
{
|
|
188
|
-
className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
189
|
-
children: [
|
|
190
|
-
(itemConfig == null ? void 0 : itemConfig.icon) && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
191
|
-
"div",
|
|
192
|
-
{
|
|
193
|
-
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
194
|
-
style: {
|
|
195
|
-
backgroundColor: item.color
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
),
|
|
199
|
-
itemConfig == null ? void 0 : itemConfig.label
|
|
200
|
-
]
|
|
201
|
-
},
|
|
202
|
-
item.value
|
|
203
|
-
);
|
|
204
|
-
})
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
});
|
|
208
|
-
ChartLegendContent.displayName = "ChartLegend";
|
|
209
|
-
function getPayloadConfigFromPayload(config, payload, key) {
|
|
210
|
-
if (typeof payload !== "object" || payload === null) {
|
|
211
|
-
return void 0;
|
|
212
|
-
}
|
|
213
|
-
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
214
|
-
let configLabelKey = key;
|
|
215
|
-
if (key in payload && typeof payload[key] === "string") {
|
|
216
|
-
configLabelKey = payload[key];
|
|
217
|
-
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
218
|
-
configLabelKey = payloadPayload[key];
|
|
219
|
-
}
|
|
220
|
-
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
// src/components/ui/carousel.tsx
|
|
224
|
-
import * as React3 from "react";
|
|
225
|
-
import useEmblaCarousel from "embla-carousel-react";
|
|
226
|
-
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
227
|
-
|
|
228
|
-
// src/components/ui/button.tsx
|
|
229
|
-
import * as React2 from "react";
|
|
230
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
231
|
-
import { cva } from "class-variance-authority";
|
|
232
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
233
|
-
var buttonVariants = cva(
|
|
234
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
235
|
-
{
|
|
236
|
-
variants: {
|
|
237
|
-
variant: {
|
|
238
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
239
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
240
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
241
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
242
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
243
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
244
|
-
},
|
|
245
|
-
size: {
|
|
246
|
-
default: "h-10 px-4 py-2",
|
|
247
|
-
sm: "h-9 rounded-md px-3",
|
|
248
|
-
lg: "h-11 rounded-md px-8",
|
|
249
|
-
icon: "h-10 w-10"
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
defaultVariants: {
|
|
253
|
-
variant: "default",
|
|
254
|
-
size: "default"
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
);
|
|
258
|
-
var Button = React2.forwardRef(
|
|
259
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
260
|
-
const Comp = asChild ? Slot : "button";
|
|
261
|
-
return /* @__PURE__ */ jsx2(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
262
|
-
}
|
|
263
|
-
);
|
|
264
|
-
Button.displayName = "Button";
|
|
265
|
-
|
|
266
|
-
// src/components/ui/carousel.tsx
|
|
267
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
268
|
-
var CarouselContext = React3.createContext(null);
|
|
269
|
-
function useCarousel() {
|
|
270
|
-
const context = React3.useContext(CarouselContext);
|
|
271
|
-
if (!context) {
|
|
272
|
-
throw new Error("useCarousel must be used within a <Carousel />");
|
|
273
|
-
}
|
|
274
|
-
return context;
|
|
275
|
-
}
|
|
276
|
-
var Carousel = React3.forwardRef(
|
|
277
|
-
({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
|
|
278
|
-
const [carouselRef, api] = useEmblaCarousel(
|
|
279
|
-
{
|
|
280
|
-
...opts,
|
|
281
|
-
axis: orientation === "horizontal" ? "x" : "y"
|
|
282
|
-
},
|
|
283
|
-
plugins
|
|
284
|
-
);
|
|
285
|
-
const [canScrollPrev, setCanScrollPrev] = React3.useState(false);
|
|
286
|
-
const [canScrollNext, setCanScrollNext] = React3.useState(false);
|
|
287
|
-
const onSelect = React3.useCallback((api2) => {
|
|
288
|
-
if (!api2) {
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
setCanScrollPrev(api2.canScrollPrev());
|
|
292
|
-
setCanScrollNext(api2.canScrollNext());
|
|
293
|
-
}, []);
|
|
294
|
-
const scrollPrev = React3.useCallback(() => {
|
|
295
|
-
api == null ? void 0 : api.scrollPrev();
|
|
296
|
-
}, [api]);
|
|
297
|
-
const scrollNext = React3.useCallback(() => {
|
|
298
|
-
api == null ? void 0 : api.scrollNext();
|
|
299
|
-
}, [api]);
|
|
300
|
-
const handleKeyDown = React3.useCallback(
|
|
301
|
-
(event) => {
|
|
302
|
-
if (event.key === "ArrowLeft") {
|
|
303
|
-
event.preventDefault();
|
|
304
|
-
scrollPrev();
|
|
305
|
-
} else if (event.key === "ArrowRight") {
|
|
306
|
-
event.preventDefault();
|
|
307
|
-
scrollNext();
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
[scrollPrev, scrollNext]
|
|
311
|
-
);
|
|
312
|
-
React3.useEffect(() => {
|
|
313
|
-
if (!api || !setApi) {
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
setApi(api);
|
|
317
|
-
}, [api, setApi]);
|
|
318
|
-
React3.useEffect(() => {
|
|
319
|
-
if (!api) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
onSelect(api);
|
|
323
|
-
api.on("reInit", onSelect);
|
|
324
|
-
api.on("select", onSelect);
|
|
325
|
-
return () => {
|
|
326
|
-
api == null ? void 0 : api.off("select", onSelect);
|
|
327
|
-
};
|
|
328
|
-
}, [api, onSelect]);
|
|
329
|
-
return /* @__PURE__ */ jsx3(
|
|
330
|
-
CarouselContext.Provider,
|
|
331
|
-
{
|
|
332
|
-
value: {
|
|
333
|
-
carouselRef,
|
|
334
|
-
api,
|
|
335
|
-
opts,
|
|
336
|
-
orientation: orientation || ((opts == null ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
|
|
337
|
-
scrollPrev,
|
|
338
|
-
scrollNext,
|
|
339
|
-
canScrollPrev,
|
|
340
|
-
canScrollNext
|
|
341
|
-
},
|
|
342
|
-
children: /* @__PURE__ */ jsx3(
|
|
343
|
-
"div",
|
|
344
|
-
{
|
|
345
|
-
ref,
|
|
346
|
-
onKeyDownCapture: handleKeyDown,
|
|
347
|
-
className: cn("relative", className),
|
|
348
|
-
role: "region",
|
|
349
|
-
"aria-roledescription": "carousel",
|
|
350
|
-
...props,
|
|
351
|
-
children
|
|
352
|
-
}
|
|
353
|
-
)
|
|
354
|
-
}
|
|
355
|
-
);
|
|
356
|
-
}
|
|
357
|
-
);
|
|
358
|
-
Carousel.displayName = "Carousel";
|
|
359
|
-
var CarouselContent = React3.forwardRef(
|
|
360
|
-
({ className, ...props }, ref) => {
|
|
361
|
-
const { carouselRef, orientation } = useCarousel();
|
|
362
|
-
return /* @__PURE__ */ jsx3("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
363
|
-
"div",
|
|
364
|
-
{
|
|
365
|
-
ref,
|
|
366
|
-
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
|
|
367
|
-
...props
|
|
368
|
-
}
|
|
369
|
-
) });
|
|
370
|
-
}
|
|
371
|
-
);
|
|
372
|
-
CarouselContent.displayName = "CarouselContent";
|
|
373
|
-
var CarouselItem = React3.forwardRef(
|
|
374
|
-
({ className, ...props }, ref) => {
|
|
375
|
-
const { orientation } = useCarousel();
|
|
376
|
-
return /* @__PURE__ */ jsx3(
|
|
377
|
-
"div",
|
|
378
|
-
{
|
|
379
|
-
ref,
|
|
380
|
-
role: "group",
|
|
381
|
-
"aria-roledescription": "slide",
|
|
382
|
-
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
|
|
383
|
-
...props
|
|
384
|
-
}
|
|
385
|
-
);
|
|
386
|
-
}
|
|
387
|
-
);
|
|
388
|
-
CarouselItem.displayName = "CarouselItem";
|
|
389
|
-
var CarouselPrevious = React3.forwardRef(
|
|
390
|
-
({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
391
|
-
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
392
|
-
return /* @__PURE__ */ jsxs2(
|
|
393
|
-
Button,
|
|
394
|
-
{
|
|
395
|
-
ref,
|
|
396
|
-
variant,
|
|
397
|
-
size,
|
|
398
|
-
className: cn(
|
|
399
|
-
"absolute h-8 w-8 rounded-full",
|
|
400
|
-
orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
401
|
-
className
|
|
402
|
-
),
|
|
403
|
-
disabled: !canScrollPrev,
|
|
404
|
-
onClick: scrollPrev,
|
|
405
|
-
...props,
|
|
406
|
-
children: [
|
|
407
|
-
/* @__PURE__ */ jsx3(ArrowLeft, { className: "h-4 w-4" }),
|
|
408
|
-
/* @__PURE__ */ jsx3("span", { className: "sr-only", children: "Previous slide" })
|
|
409
|
-
]
|
|
410
|
-
}
|
|
411
|
-
);
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
CarouselPrevious.displayName = "CarouselPrevious";
|
|
415
|
-
var CarouselNext = React3.forwardRef(
|
|
416
|
-
({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
417
|
-
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
418
|
-
return /* @__PURE__ */ jsxs2(
|
|
419
|
-
Button,
|
|
420
|
-
{
|
|
421
|
-
ref,
|
|
422
|
-
variant,
|
|
423
|
-
size,
|
|
424
|
-
className: cn(
|
|
425
|
-
"absolute h-8 w-8 rounded-full",
|
|
426
|
-
orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
427
|
-
className
|
|
428
|
-
),
|
|
429
|
-
disabled: !canScrollNext,
|
|
430
|
-
onClick: scrollNext,
|
|
431
|
-
...props,
|
|
432
|
-
children: [
|
|
433
|
-
/* @__PURE__ */ jsx3(ArrowRight, { className: "h-4 w-4" }),
|
|
434
|
-
/* @__PURE__ */ jsx3("span", { className: "sr-only", children: "Next slide" })
|
|
435
|
-
]
|
|
436
|
-
}
|
|
437
|
-
);
|
|
438
|
-
}
|
|
439
|
-
);
|
|
440
|
-
CarouselNext.displayName = "CarouselNext";
|
|
441
|
-
export {
|
|
442
|
-
Carousel,
|
|
443
|
-
CarouselContent,
|
|
444
|
-
CarouselItem,
|
|
445
|
-
CarouselNext,
|
|
446
|
-
CarouselPrevious,
|
|
447
|
-
ChartContainer,
|
|
448
|
-
ChartLegend,
|
|
449
|
-
ChartLegendContent,
|
|
450
|
-
ChartStyle,
|
|
451
|
-
ChartTooltip,
|
|
452
|
-
ChartTooltipContent
|
|
453
|
-
};
|
|
454
|
-
//# sourceMappingURL=charts.js.map
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import * as recharts_types_util_payload_getUniqPayload from 'recharts/types/util/payload/getUniqPayload';
|
|
2
|
-
import * as recharts_types_component_Tooltip from 'recharts/types/component/Tooltip';
|
|
3
|
-
import * as recharts_types_util_types from 'recharts/types/util/types';
|
|
4
|
-
import * as recharts_types_component_DefaultTooltipContent from 'recharts/types/component/DefaultTooltipContent';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import * as RechartsPrimitive from 'recharts';
|
|
8
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
9
|
-
import { VariantProps } from 'class-variance-authority';
|
|
10
|
-
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
11
|
-
|
|
12
|
-
declare const buttonVariants: (props?: {
|
|
13
|
-
variant?: "link" | "default" | "secondary" | "outline" | "destructive" | "ghost";
|
|
14
|
-
size?: "default" | "sm" | "lg" | "icon";
|
|
15
|
-
} & class_variance_authority_types.ClassProp) => string;
|
|
16
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
17
|
-
asChild?: boolean;
|
|
18
|
-
}
|
|
19
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
-
|
|
21
|
-
type CarouselApi = UseEmblaCarouselType[1];
|
|
22
|
-
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
23
|
-
type CarouselOptions = UseCarouselParameters[0];
|
|
24
|
-
type CarouselPlugin = UseCarouselParameters[1];
|
|
25
|
-
type CarouselProps = {
|
|
26
|
-
opts?: CarouselOptions;
|
|
27
|
-
plugins?: CarouselPlugin;
|
|
28
|
-
orientation?: "horizontal" | "vertical";
|
|
29
|
-
setApi?: (api: CarouselApi) => void;
|
|
30
|
-
};
|
|
31
|
-
declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
-
declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
-
declare const CarouselNext: React.ForwardRefExoticComponent<Omit<ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
36
|
-
|
|
37
|
-
declare const THEMES: {
|
|
38
|
-
readonly light: "";
|
|
39
|
-
readonly dark: ".dark";
|
|
40
|
-
};
|
|
41
|
-
type ChartConfig = {
|
|
42
|
-
[k in string]: {
|
|
43
|
-
label?: React.ReactNode;
|
|
44
|
-
icon?: React.ComponentType;
|
|
45
|
-
} & ({
|
|
46
|
-
color?: string;
|
|
47
|
-
theme?: never;
|
|
48
|
-
} | {
|
|
49
|
-
color?: never;
|
|
50
|
-
theme: Record<keyof typeof THEMES, string>;
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
54
|
-
config: ChartConfig;
|
|
55
|
-
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
56
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
-
declare const ChartStyle: ({ id, config }: {
|
|
58
|
-
id: string;
|
|
59
|
-
config: ChartConfig;
|
|
60
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
61
|
-
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
62
|
-
declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType> & {
|
|
63
|
-
accessibilityLayer?: boolean;
|
|
64
|
-
active?: boolean | undefined;
|
|
65
|
-
includeHidden?: boolean | undefined;
|
|
66
|
-
allowEscapeViewBox?: recharts_types_util_types.AllowInDimension;
|
|
67
|
-
animationDuration?: recharts_types_util_types.AnimationDuration;
|
|
68
|
-
animationEasing?: recharts_types_util_types.AnimationTiming;
|
|
69
|
-
content?: recharts_types_component_Tooltip.ContentType<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType>;
|
|
70
|
-
coordinate?: Partial<recharts_types_util_types.Coordinate>;
|
|
71
|
-
cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
|
|
72
|
-
filterNull?: boolean;
|
|
73
|
-
defaultIndex?: number;
|
|
74
|
-
isAnimationActive?: boolean;
|
|
75
|
-
offset?: number;
|
|
76
|
-
payloadUniqBy?: recharts_types_util_payload_getUniqPayload.UniqueOption<recharts_types_component_DefaultTooltipContent.Payload<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType>>;
|
|
77
|
-
position?: Partial<recharts_types_util_types.Coordinate>;
|
|
78
|
-
reverseDirection?: recharts_types_util_types.AllowInDimension;
|
|
79
|
-
shared?: boolean;
|
|
80
|
-
trigger?: "hover" | "click";
|
|
81
|
-
useTranslate3d?: boolean;
|
|
82
|
-
viewBox?: recharts_types_util_types.CartesianViewBox;
|
|
83
|
-
wrapperStyle?: React.CSSProperties;
|
|
84
|
-
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
85
|
-
hideLabel?: boolean;
|
|
86
|
-
hideIndicator?: boolean;
|
|
87
|
-
indicator?: "line" | "dot" | "dashed";
|
|
88
|
-
nameKey?: string;
|
|
89
|
-
labelKey?: string;
|
|
90
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
91
|
-
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
92
|
-
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "verticalAlign" | "payload"> & {
|
|
93
|
-
hideIcon?: boolean;
|
|
94
|
-
nameKey?: string;
|
|
95
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
96
|
-
|
|
97
|
-
export { type ButtonProps as B, type CarouselApi as C, Button as a, buttonVariants as b, Carousel as c, CarouselContent as d, CarouselItem as e, CarouselPrevious as f, CarouselNext as g, ChartContainer as h, ChartTooltip as i, ChartTooltipContent as j, ChartLegend as k, ChartLegendContent as l, ChartStyle as m, type ChartConfig as n };
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import * as recharts_types_util_payload_getUniqPayload from 'recharts/types/util/payload/getUniqPayload';
|
|
2
|
-
import * as recharts_types_component_Tooltip from 'recharts/types/component/Tooltip';
|
|
3
|
-
import * as recharts_types_util_types from 'recharts/types/util/types';
|
|
4
|
-
import * as recharts_types_component_DefaultTooltipContent from 'recharts/types/component/DefaultTooltipContent';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import * as RechartsPrimitive from 'recharts';
|
|
8
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
9
|
-
import { VariantProps } from 'class-variance-authority';
|
|
10
|
-
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
11
|
-
|
|
12
|
-
declare const buttonVariants: (props?: {
|
|
13
|
-
variant?: "link" | "default" | "secondary" | "outline" | "destructive" | "ghost";
|
|
14
|
-
size?: "default" | "sm" | "lg" | "icon";
|
|
15
|
-
} & class_variance_authority_types.ClassProp) => string;
|
|
16
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
17
|
-
asChild?: boolean;
|
|
18
|
-
}
|
|
19
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
-
|
|
21
|
-
type CarouselApi = UseEmblaCarouselType[1];
|
|
22
|
-
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
23
|
-
type CarouselOptions = UseCarouselParameters[0];
|
|
24
|
-
type CarouselPlugin = UseCarouselParameters[1];
|
|
25
|
-
type CarouselProps = {
|
|
26
|
-
opts?: CarouselOptions;
|
|
27
|
-
plugins?: CarouselPlugin;
|
|
28
|
-
orientation?: "horizontal" | "vertical";
|
|
29
|
-
setApi?: (api: CarouselApi) => void;
|
|
30
|
-
};
|
|
31
|
-
declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
-
declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
-
declare const CarouselNext: React.ForwardRefExoticComponent<Omit<ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
36
|
-
|
|
37
|
-
declare const THEMES: {
|
|
38
|
-
readonly light: "";
|
|
39
|
-
readonly dark: ".dark";
|
|
40
|
-
};
|
|
41
|
-
type ChartConfig = {
|
|
42
|
-
[k in string]: {
|
|
43
|
-
label?: React.ReactNode;
|
|
44
|
-
icon?: React.ComponentType;
|
|
45
|
-
} & ({
|
|
46
|
-
color?: string;
|
|
47
|
-
theme?: never;
|
|
48
|
-
} | {
|
|
49
|
-
color?: never;
|
|
50
|
-
theme: Record<keyof typeof THEMES, string>;
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
54
|
-
config: ChartConfig;
|
|
55
|
-
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
56
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
-
declare const ChartStyle: ({ id, config }: {
|
|
58
|
-
id: string;
|
|
59
|
-
config: ChartConfig;
|
|
60
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
61
|
-
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
62
|
-
declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType> & {
|
|
63
|
-
accessibilityLayer?: boolean;
|
|
64
|
-
active?: boolean | undefined;
|
|
65
|
-
includeHidden?: boolean | undefined;
|
|
66
|
-
allowEscapeViewBox?: recharts_types_util_types.AllowInDimension;
|
|
67
|
-
animationDuration?: recharts_types_util_types.AnimationDuration;
|
|
68
|
-
animationEasing?: recharts_types_util_types.AnimationTiming;
|
|
69
|
-
content?: recharts_types_component_Tooltip.ContentType<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType>;
|
|
70
|
-
coordinate?: Partial<recharts_types_util_types.Coordinate>;
|
|
71
|
-
cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
|
|
72
|
-
filterNull?: boolean;
|
|
73
|
-
defaultIndex?: number;
|
|
74
|
-
isAnimationActive?: boolean;
|
|
75
|
-
offset?: number;
|
|
76
|
-
payloadUniqBy?: recharts_types_util_payload_getUniqPayload.UniqueOption<recharts_types_component_DefaultTooltipContent.Payload<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType>>;
|
|
77
|
-
position?: Partial<recharts_types_util_types.Coordinate>;
|
|
78
|
-
reverseDirection?: recharts_types_util_types.AllowInDimension;
|
|
79
|
-
shared?: boolean;
|
|
80
|
-
trigger?: "hover" | "click";
|
|
81
|
-
useTranslate3d?: boolean;
|
|
82
|
-
viewBox?: recharts_types_util_types.CartesianViewBox;
|
|
83
|
-
wrapperStyle?: React.CSSProperties;
|
|
84
|
-
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
85
|
-
hideLabel?: boolean;
|
|
86
|
-
hideIndicator?: boolean;
|
|
87
|
-
indicator?: "line" | "dot" | "dashed";
|
|
88
|
-
nameKey?: string;
|
|
89
|
-
labelKey?: string;
|
|
90
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
91
|
-
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
92
|
-
declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "verticalAlign" | "payload"> & {
|
|
93
|
-
hideIcon?: boolean;
|
|
94
|
-
nameKey?: string;
|
|
95
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
96
|
-
|
|
97
|
-
export { type ButtonProps as B, type CarouselApi as C, Button as a, buttonVariants as b, Carousel as c, CarouselContent as d, CarouselItem as e, CarouselPrevious as f, CarouselNext as g, ChartContainer as h, ChartTooltip as i, ChartTooltipContent as j, ChartLegend as k, ChartLegendContent as l, ChartStyle as m, type ChartConfig as n };
|