@thalamiq/ui 0.1.1
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 +29 -0
- package/dist/components/accordion.d.mts +10 -0
- package/dist/components/accordion.d.ts +10 -0
- package/dist/components/accordion.js +148 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/accordion.mjs +113 -0
- package/dist/components/accordion.mjs.map +1 -0
- package/dist/components/alert-dialog.d.mts +17 -0
- package/dist/components/alert-dialog.d.ts +17 -0
- package/dist/components/alert-dialog.js +264 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert-dialog.mjs +222 -0
- package/dist/components/alert-dialog.mjs.map +1 -0
- package/dist/components/alert.d.mts +13 -0
- package/dist/components/alert.d.ts +13 -0
- package/dist/components/alert.js +133 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/alert.mjs +109 -0
- package/dist/components/alert.mjs.map +1 -0
- package/dist/components/aspect-ratio.d.mts +6 -0
- package/dist/components/aspect-ratio.d.ts +6 -0
- package/dist/components/aspect-ratio.js +74 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/aspect-ratio.mjs +42 -0
- package/dist/components/aspect-ratio.mjs.map +1 -0
- package/dist/components/avatar.d.mts +9 -0
- package/dist/components/avatar.d.ts +9 -0
- package/dist/components/avatar.js +130 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/avatar.mjs +96 -0
- package/dist/components/avatar.mjs.map +1 -0
- package/dist/components/badge.d.mts +13 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/badge.js +106 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/badge.mjs +83 -0
- package/dist/components/badge.mjs.map +1 -0
- package/dist/components/breadcrumb.d.mts +14 -0
- package/dist/components/breadcrumb.d.ts +14 -0
- package/dist/components/breadcrumb.js +182 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/breadcrumb.mjs +154 -0
- package/dist/components/breadcrumb.mjs.map +1 -0
- package/dist/components/button-group.d.mts +17 -0
- package/dist/components/button-group.d.ts +17 -0
- package/dist/components/button-group.js +183 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button-group.mjs +148 -0
- package/dist/components/button-group.mjs.map +1 -0
- package/dist/components/button.d.mts +14 -0
- package/dist/components/button.d.ts +14 -0
- package/dist/components/button.js +119 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/button.mjs +96 -0
- package/dist/components/button.mjs.map +1 -0
- package/dist/components/calendar.d.mts +13 -0
- package/dist/components/calendar.d.ts +13 -0
- package/dist/components/calendar.js +324 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/calendar.mjs +295 -0
- package/dist/components/calendar.mjs.map +1 -0
- package/dist/components/card.d.mts +12 -0
- package/dist/components/card.d.ts +12 -0
- package/dist/components/card.js +158 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/card.mjs +128 -0
- package/dist/components/card.mjs.map +1 -0
- package/dist/components/carousel.d.mts +24 -0
- package/dist/components/carousel.d.ts +24 -0
- package/dist/components/carousel.js +343 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/carousel.mjs +307 -0
- package/dist/components/carousel.mjs.map +1 -0
- package/dist/components/chart.d.mts +43 -0
- package/dist/components/chart.d.ts +43 -0
- package/dist/components/chart.js +330 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/chart.mjs +293 -0
- package/dist/components/chart.mjs.map +1 -0
- package/dist/components/checkbox.d.mts +7 -0
- package/dist/components/checkbox.d.ts +7 -0
- package/dist/components/checkbox.js +109 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/checkbox.mjs +77 -0
- package/dist/components/checkbox.mjs.map +1 -0
- package/dist/components/collapsible.d.mts +8 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +95 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/collapsible.mjs +61 -0
- package/dist/components/collapsible.mjs.map +1 -0
- package/dist/components/command.d.mts +22 -0
- package/dist/components/command.d.ts +22 -0
- package/dist/components/command.js +370 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/command.mjs +330 -0
- package/dist/components/command.mjs.map +1 -0
- package/dist/components/context-menu.d.mts +28 -0
- package/dist/components/context-menu.d.ts +28 -0
- package/dist/components/context-menu.js +326 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/context-menu.mjs +280 -0
- package/dist/components/context-menu.mjs.map +1 -0
- package/dist/components/dialog.d.mts +18 -0
- package/dist/components/dialog.d.ts +18 -0
- package/dist/components/dialog.js +223 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dialog.mjs +182 -0
- package/dist/components/dialog.mjs.map +1 -0
- package/dist/components/drawer.d.mts +16 -0
- package/dist/components/drawer.d.ts +16 -0
- package/dist/components/drawer.js +205 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/drawer.mjs +174 -0
- package/dist/components/drawer.mjs.map +1 -0
- package/dist/components/dropdown-menu.d.mts +28 -0
- package/dist/components/dropdown-menu.d.ts +28 -0
- package/dist/components/dropdown-menu.js +333 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/dropdown-menu.mjs +287 -0
- package/dist/components/dropdown-menu.mjs.map +1 -0
- package/dist/components/empty.d.mts +15 -0
- package/dist/components/empty.d.ts +15 -0
- package/dist/components/empty.js +171 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/empty.mjs +144 -0
- package/dist/components/empty.mjs.map +1 -0
- package/dist/components/field.d.mts +30 -0
- package/dist/components/field.d.ts +30 -0
- package/dist/components/field.js +372 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/field.mjs +331 -0
- package/dist/components/field.mjs.map +1 -0
- package/dist/components/form.d.mts +28 -0
- package/dist/components/form.d.ts +28 -0
- package/dist/components/form.js +220 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/form.mjs +186 -0
- package/dist/components/form.mjs.map +1 -0
- package/dist/components/hover-card.d.mts +9 -0
- package/dist/components/hover-card.d.ts +9 -0
- package/dist/components/hover-card.js +114 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/hover-card.mjs +80 -0
- package/dist/components/hover-card.mjs.map +1 -0
- package/dist/components/input-group.d.mts +20 -0
- package/dist/components/input-group.d.ts +20 -0
- package/dist/components/input-group.js +316 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input-group.mjs +289 -0
- package/dist/components/input-group.mjs.map +1 -0
- package/dist/components/input-otp.d.mts +14 -0
- package/dist/components/input-otp.d.ts +14 -0
- package/dist/components/input-otp.js +151 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input-otp.mjs +116 -0
- package/dist/components/input-otp.mjs.map +1 -0
- package/dist/components/input.d.mts +6 -0
- package/dist/components/input.d.ts +6 -0
- package/dist/components/input.js +83 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/input.mjs +59 -0
- package/dist/components/input.mjs.map +1 -0
- package/dist/components/item.d.mts +28 -0
- package/dist/components/item.d.ts +28 -0
- package/dist/components/item.js +301 -0
- package/dist/components/item.js.map +1 -0
- package/dist/components/item.mjs +260 -0
- package/dist/components/item.mjs.map +1 -0
- package/dist/components/kbd.d.mts +6 -0
- package/dist/components/kbd.d.ts +6 -0
- package/dist/components/kbd.js +94 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/kbd.mjs +69 -0
- package/dist/components/kbd.mjs.map +1 -0
- package/dist/components/label.d.mts +7 -0
- package/dist/components/label.d.ts +7 -0
- package/dist/components/label.js +96 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/label.mjs +64 -0
- package/dist/components/label.mjs.map +1 -0
- package/dist/components/menubar.d.mts +29 -0
- package/dist/components/menubar.d.ts +29 -0
- package/dist/components/menubar.js +361 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/menubar.mjs +314 -0
- package/dist/components/menubar.mjs.map +1 -0
- package/dist/components/navigation-menu.d.mts +18 -0
- package/dist/components/navigation-menu.d.ts +18 -0
- package/dist/components/navigation-menu.js +267 -0
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/navigation-menu.mjs +227 -0
- package/dist/components/navigation-menu.mjs.map +1 -0
- package/dist/components/pagination.d.mts +18 -0
- package/dist/components/pagination.d.ts +18 -0
- package/dist/components/pagination.js +231 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/pagination.mjs +207 -0
- package/dist/components/pagination.mjs.map +1 -0
- package/dist/components/popover.d.mts +10 -0
- package/dist/components/popover.d.ts +10 -0
- package/dist/components/popover.js +120 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/popover.mjs +85 -0
- package/dist/components/popover.mjs.map +1 -0
- package/dist/components/progress.d.mts +7 -0
- package/dist/components/progress.d.ts +7 -0
- package/dist/components/progress.js +109 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/progress.mjs +77 -0
- package/dist/components/progress.mjs.map +1 -0
- package/dist/components/radio-group.d.mts +8 -0
- package/dist/components/radio-group.d.ts +8 -0
- package/dist/components/radio-group.js +125 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/radio-group.mjs +92 -0
- package/dist/components/radio-group.mjs.map +1 -0
- package/dist/components/resizable.d.mts +11 -0
- package/dist/components/resizable.d.ts +11 -0
- package/dist/components/resizable.js +128 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/resizable.mjs +94 -0
- package/dist/components/resizable.mjs.map +1 -0
- package/dist/components/scroll-area.d.mts +8 -0
- package/dist/components/scroll-area.d.ts +8 -0
- package/dist/components/scroll-area.js +143 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/scroll-area.mjs +110 -0
- package/dist/components/scroll-area.mjs.map +1 -0
- package/dist/components/select.d.mts +18 -0
- package/dist/components/select.d.ts +18 -0
- package/dist/components/select.js +270 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/select.mjs +229 -0
- package/dist/components/select.mjs.map +1 -0
- package/dist/components/separator.d.mts +7 -0
- package/dist/components/separator.d.ts +7 -0
- package/dist/components/separator.js +102 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/separator.mjs +70 -0
- package/dist/components/separator.mjs.map +1 -0
- package/dist/components/sheet.d.mts +16 -0
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.js +213 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/sheet.mjs +174 -0
- package/dist/components/sheet.mjs.map +1 -0
- package/dist/components/sidebar.d.mts +75 -0
- package/dist/components/sidebar.d.ts +75 -0
- package/dist/components/sidebar.js +1055 -0
- package/dist/components/sidebar.js.map +1 -0
- package/dist/components/sidebar.mjs +1000 -0
- package/dist/components/sidebar.mjs.map +1 -0
- package/dist/components/skeleton.d.mts +5 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +77 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/skeleton.mjs +53 -0
- package/dist/components/skeleton.mjs.map +1 -0
- package/dist/components/slider.d.mts +7 -0
- package/dist/components/slider.d.ts +7 -0
- package/dist/components/slider.js +145 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/slider.mjs +113 -0
- package/dist/components/slider.mjs.map +1 -0
- package/dist/components/sonner.d.mts +6 -0
- package/dist/components/sonner.d.ts +6 -0
- package/dist/components/sonner.js +85 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/sonner.mjs +69 -0
- package/dist/components/sonner.mjs.map +1 -0
- package/dist/components/spinner.d.mts +5 -0
- package/dist/components/spinner.d.ts +5 -0
- package/dist/components/spinner.js +79 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/spinner.mjs +57 -0
- package/dist/components/spinner.mjs.map +1 -0
- package/dist/components/switch.d.mts +7 -0
- package/dist/components/switch.d.ts +7 -0
- package/dist/components/switch.js +109 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/switch.mjs +77 -0
- package/dist/components/switch.mjs.map +1 -0
- package/dist/components/table.d.mts +13 -0
- package/dist/components/table.d.ts +13 -0
- package/dist/components/table.js +184 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/table.mjs +153 -0
- package/dist/components/table.mjs.map +1 -0
- package/dist/components/tabs.d.mts +10 -0
- package/dist/components/tabs.d.ts +10 -0
- package/dist/components/tabs.js +147 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/tabs.mjs +112 -0
- package/dist/components/tabs.mjs.map +1 -0
- package/dist/components/textarea.d.mts +6 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +80 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/textarea.mjs +56 -0
- package/dist/components/textarea.mjs.map +1 -0
- package/dist/components/toggle-group.d.mts +14 -0
- package/dist/components/toggle-group.d.ts +14 -0
- package/dist/components/toggle-group.js +179 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle-group.mjs +146 -0
- package/dist/components/toggle-group.mjs.map +1 -0
- package/dist/components/toggle.d.mts +13 -0
- package/dist/components/toggle.d.ts +13 -0
- package/dist/components/toggle.js +119 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/toggle.mjs +86 -0
- package/dist/components/toggle.mjs.map +1 -0
- package/dist/components/tooltip.d.mts +10 -0
- package/dist/components/tooltip.d.ts +10 -0
- package/dist/components/tooltip.js +137 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/tooltip.mjs +102 -0
- package/dist/components/tooltip.mjs.map +1 -0
- package/dist/hooks/use-mobile.d.mts +3 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +56 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-mobile.mjs +22 -0
- package/dist/hooks/use-mobile.mjs.map +1 -0
- package/dist/styles/globals.css +230 -0
- package/dist/utils/utils.d.mts +5 -0
- package/dist/utils/utils.d.ts +5 -0
- package/dist/utils/utils.js +36 -0
- package/dist/utils/utils.js.map +1 -0
- package/dist/utils/utils.mjs +12 -0
- package/dist/utils/utils.mjs.map +1 -0
- package/package.json +393 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// lib/components/chart.tsx
|
|
36
|
+
import * as React from "react";
|
|
37
|
+
import * as RechartsPrimitive from "recharts";
|
|
38
|
+
|
|
39
|
+
// lib/utils/utils.ts
|
|
40
|
+
import { clsx } from "clsx";
|
|
41
|
+
import { twMerge } from "tailwind-merge";
|
|
42
|
+
function cn(...inputs) {
|
|
43
|
+
return twMerge(clsx(inputs));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// lib/components/chart.tsx
|
|
47
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
48
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
49
|
+
var ChartContext = React.createContext(null);
|
|
50
|
+
function useChart() {
|
|
51
|
+
const context = React.useContext(ChartContext);
|
|
52
|
+
if (!context) {
|
|
53
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
54
|
+
}
|
|
55
|
+
return context;
|
|
56
|
+
}
|
|
57
|
+
function ChartContainer(_a) {
|
|
58
|
+
var _b = _a, {
|
|
59
|
+
id,
|
|
60
|
+
className,
|
|
61
|
+
children,
|
|
62
|
+
config
|
|
63
|
+
} = _b, props = __objRest(_b, [
|
|
64
|
+
"id",
|
|
65
|
+
"className",
|
|
66
|
+
"children",
|
|
67
|
+
"config"
|
|
68
|
+
]);
|
|
69
|
+
const uniqueId = React.useId();
|
|
70
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
71
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
72
|
+
"div",
|
|
73
|
+
__spreadProps(__spreadValues({
|
|
74
|
+
"data-slot": "chart",
|
|
75
|
+
"data-chart": chartId,
|
|
76
|
+
className: cn(
|
|
77
|
+
"[&_.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-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 flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
78
|
+
className
|
|
79
|
+
)
|
|
80
|
+
}, props), {
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
83
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
84
|
+
]
|
|
85
|
+
})
|
|
86
|
+
) });
|
|
87
|
+
}
|
|
88
|
+
var ChartStyle = ({ id, config }) => {
|
|
89
|
+
const colorConfig = Object.entries(config).filter(
|
|
90
|
+
([, config2]) => config2.theme || config2.color
|
|
91
|
+
);
|
|
92
|
+
if (!colorConfig.length) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
return /* @__PURE__ */ jsx(
|
|
96
|
+
"style",
|
|
97
|
+
{
|
|
98
|
+
dangerouslySetInnerHTML: {
|
|
99
|
+
__html: Object.entries(THEMES).map(
|
|
100
|
+
([theme, prefix]) => `
|
|
101
|
+
${prefix} [data-chart=${id}] {
|
|
102
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
103
|
+
var _a;
|
|
104
|
+
const color = ((_a = itemConfig.theme) == null ? void 0 : _a[theme]) || itemConfig.color;
|
|
105
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
106
|
+
}).join("\n")}
|
|
107
|
+
}
|
|
108
|
+
`
|
|
109
|
+
).join("\n")
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
115
|
+
function ChartTooltipContent({
|
|
116
|
+
active,
|
|
117
|
+
payload,
|
|
118
|
+
className,
|
|
119
|
+
indicator = "dot",
|
|
120
|
+
hideLabel = false,
|
|
121
|
+
hideIndicator = false,
|
|
122
|
+
label,
|
|
123
|
+
labelFormatter,
|
|
124
|
+
labelClassName,
|
|
125
|
+
formatter,
|
|
126
|
+
color,
|
|
127
|
+
nameKey,
|
|
128
|
+
labelKey
|
|
129
|
+
}) {
|
|
130
|
+
const { config } = useChart();
|
|
131
|
+
const tooltipLabel = React.useMemo(() => {
|
|
132
|
+
var _a;
|
|
133
|
+
if (hideLabel || !(payload == null ? void 0 : payload.length)) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
const [item] = payload;
|
|
137
|
+
const key = `${labelKey || (item == null ? void 0 : item.dataKey) || (item == null ? void 0 : item.name) || "value"}`;
|
|
138
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
139
|
+
const value = !labelKey && typeof label === "string" ? ((_a = config[label]) == null ? void 0 : _a.label) || label : itemConfig == null ? void 0 : itemConfig.label;
|
|
140
|
+
if (labelFormatter) {
|
|
141
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
142
|
+
}
|
|
143
|
+
if (!value) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
147
|
+
}, [
|
|
148
|
+
label,
|
|
149
|
+
labelFormatter,
|
|
150
|
+
payload,
|
|
151
|
+
hideLabel,
|
|
152
|
+
labelClassName,
|
|
153
|
+
config,
|
|
154
|
+
labelKey
|
|
155
|
+
]);
|
|
156
|
+
if (!active || !(payload == null ? void 0 : payload.length)) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
160
|
+
return /* @__PURE__ */ jsxs(
|
|
161
|
+
"div",
|
|
162
|
+
{
|
|
163
|
+
className: cn(
|
|
164
|
+
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
children: [
|
|
168
|
+
!nestLabel ? tooltipLabel : null,
|
|
169
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
170
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
171
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
172
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
173
|
+
return /* @__PURE__ */ jsx(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
className: cn(
|
|
177
|
+
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
178
|
+
indicator === "dot" && "items-center"
|
|
179
|
+
),
|
|
180
|
+
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: [
|
|
181
|
+
(itemConfig == null ? void 0 : itemConfig.icon) ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
className: cn(
|
|
185
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
186
|
+
{
|
|
187
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
188
|
+
"w-1": indicator === "line",
|
|
189
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
190
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
style: {
|
|
194
|
+
"--color-bg": indicatorColor,
|
|
195
|
+
"--color-border": indicatorColor
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
),
|
|
199
|
+
/* @__PURE__ */ jsxs(
|
|
200
|
+
"div",
|
|
201
|
+
{
|
|
202
|
+
className: cn(
|
|
203
|
+
"flex flex-1 justify-between leading-none",
|
|
204
|
+
nestLabel ? "items-end" : "items-center"
|
|
205
|
+
),
|
|
206
|
+
children: [
|
|
207
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
208
|
+
nestLabel ? tooltipLabel : null,
|
|
209
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: (itemConfig == null ? void 0 : itemConfig.label) || item.name })
|
|
210
|
+
] }),
|
|
211
|
+
item.value && /* @__PURE__ */ jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
)
|
|
215
|
+
] })
|
|
216
|
+
},
|
|
217
|
+
item.dataKey
|
|
218
|
+
);
|
|
219
|
+
}) })
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
225
|
+
function ChartLegendContent({
|
|
226
|
+
className,
|
|
227
|
+
hideIcon = false,
|
|
228
|
+
payload,
|
|
229
|
+
verticalAlign = "bottom",
|
|
230
|
+
nameKey
|
|
231
|
+
}) {
|
|
232
|
+
const { config } = useChart();
|
|
233
|
+
if (!(payload == null ? void 0 : payload.length)) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
return /* @__PURE__ */ jsx(
|
|
237
|
+
"div",
|
|
238
|
+
{
|
|
239
|
+
className: cn(
|
|
240
|
+
"flex items-center justify-center gap-4",
|
|
241
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
242
|
+
className
|
|
243
|
+
),
|
|
244
|
+
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
245
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
246
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
247
|
+
return /* @__PURE__ */ jsxs(
|
|
248
|
+
"div",
|
|
249
|
+
{
|
|
250
|
+
className: cn(
|
|
251
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
252
|
+
),
|
|
253
|
+
children: [
|
|
254
|
+
(itemConfig == null ? void 0 : itemConfig.icon) && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
255
|
+
"div",
|
|
256
|
+
{
|
|
257
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
258
|
+
style: {
|
|
259
|
+
backgroundColor: item.color
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
itemConfig == null ? void 0 : itemConfig.label
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
item.value
|
|
267
|
+
);
|
|
268
|
+
})
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
273
|
+
if (typeof payload !== "object" || payload === null) {
|
|
274
|
+
return void 0;
|
|
275
|
+
}
|
|
276
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
277
|
+
let configLabelKey = key;
|
|
278
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
279
|
+
configLabelKey = payload[key];
|
|
280
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
281
|
+
configLabelKey = payloadPayload[key];
|
|
282
|
+
}
|
|
283
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
284
|
+
}
|
|
285
|
+
export {
|
|
286
|
+
ChartContainer,
|
|
287
|
+
ChartLegend,
|
|
288
|
+
ChartLegendContent,
|
|
289
|
+
ChartStyle,
|
|
290
|
+
ChartTooltip,
|
|
291
|
+
ChartTooltipContent
|
|
292
|
+
};
|
|
293
|
+
//# sourceMappingURL=chart.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../lib/components/chart.tsx","../../lib/utils/utils.ts"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as RechartsPrimitive from \"recharts\"\n\nimport { cn } from \"../utils/utils\"\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const\n\nexport type ChartConfig = {\n [k in string]: {\n label?: React.ReactNode\n icon?: React.ComponentType\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n )\n}\n\ntype ChartContextProps = {\n config: ChartConfig\n}\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null)\n\nfunction useChart() {\n const context = React.useContext(ChartContext)\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\")\n }\n\n return context\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig\n children: React.ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >[\"children\"]\n}) {\n const uniqueId = React.useId()\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"[&_.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-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 flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n )\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(\n ([, config]) => config.theme || config.color\n )\n\n if (!colorConfig.length) {\n return null\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color =\n itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||\n itemConfig.color\n return color ? ` --color-${key}: ${color};` : null\n })\n .join(\"\\n\")}\n}\n`\n )\n .join(\"\\n\"),\n }}\n />\n )\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n hideLabel?: boolean\n hideIndicator?: boolean\n indicator?: \"line\" | \"dot\" | \"dashed\"\n nameKey?: string\n labelKey?: string\n }) {\n const { config } = useChart()\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null\n }\n\n const [item] = payload\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const value =\n !labelKey && typeof label === \"string\"\n ? config[label as keyof typeof config]?.label || label\n : itemConfig?.label\n\n if (labelFormatter) {\n return (\n <div className={cn(\"font-medium\", labelClassName)}>\n {labelFormatter(value, payload)}\n </div>\n )\n }\n\n if (!value) {\n return null\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>\n }, [\n label,\n labelFormatter,\n payload,\n hideLabel,\n labelClassName,\n config,\n labelKey,\n ])\n\n if (!active || !payload?.length) {\n return null\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\"\n\n return (\n <div\n className={cn(\n \"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl\",\n className\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const indicatorColor = color || item.payload.fill || item.color\n\n return (\n <div\n key={item.dataKey}\n className={cn(\n \"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5\",\n indicator === \"dot\" && \"items-center\"\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n \"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\",\n {\n \"h-2.5 w-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\":\n indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n }\n )}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\"\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label || item.name}\n </span>\n </div>\n {item.value && (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nconst ChartLegend = RechartsPrimitive.Legend\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> &\n Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\n hideIcon?: boolean\n nameKey?: string\n }) {\n const { config } = useChart()\n\n if (!payload?.length) {\n return null\n }\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center gap-4\",\n verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n className\n )}\n >\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item) => {\n const key = `${nameKey || item.dataKey || \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n\n return (\n <div\n key={item.value}\n className={cn(\n \"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3\"\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n )\n })}\n </div>\n )\n}\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string\n) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined\n }\n\n const payloadPayload =\n \"payload\" in payload &&\n typeof payload.payload === \"object\" &&\n payload.payload !== null\n ? payload.payload\n : undefined\n\n let configLabelKey: string = key\n\n if (\n key in payload &&\n typeof payload[key as keyof typeof payload] === \"string\"\n ) {\n configLabelKey = payload[key as keyof typeof payload] as string\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[\n key as keyof typeof payloadPayload\n ] as string\n }\n\n return configLabelKey in config\n ? config[configLabelKey]\n : config[key as keyof typeof config]\n}\n\nexport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n}\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}"],"mappings":"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","names":["config"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
|
+
|
|
5
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { Checkbox };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
|
+
|
|
5
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { Checkbox };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
+
var __spreadValues = (a, b) => {
|
|
16
|
+
for (var prop in b || (b = {}))
|
|
17
|
+
if (__hasOwnProp.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
if (__getOwnPropSymbols)
|
|
20
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
+
if (__propIsEnum.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
}
|
|
24
|
+
return a;
|
|
25
|
+
};
|
|
26
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
+
var __objRest = (source, exclude) => {
|
|
28
|
+
var target = {};
|
|
29
|
+
for (var prop in source)
|
|
30
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
if (source != null && __getOwnPropSymbols)
|
|
33
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
34
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
35
|
+
target[prop] = source[prop];
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
39
|
+
var __export = (target, all) => {
|
|
40
|
+
for (var name in all)
|
|
41
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
42
|
+
};
|
|
43
|
+
var __copyProps = (to, from, except, desc) => {
|
|
44
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
45
|
+
for (let key of __getOwnPropNames(from))
|
|
46
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
47
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
48
|
+
}
|
|
49
|
+
return to;
|
|
50
|
+
};
|
|
51
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
52
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
53
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
54
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
55
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
56
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
57
|
+
mod
|
|
58
|
+
));
|
|
59
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
60
|
+
|
|
61
|
+
// lib/components/checkbox.tsx
|
|
62
|
+
var checkbox_exports = {};
|
|
63
|
+
__export(checkbox_exports, {
|
|
64
|
+
Checkbox: () => Checkbox
|
|
65
|
+
});
|
|
66
|
+
module.exports = __toCommonJS(checkbox_exports);
|
|
67
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
68
|
+
var import_lucide_react = require("lucide-react");
|
|
69
|
+
|
|
70
|
+
// lib/utils/utils.ts
|
|
71
|
+
var import_clsx = require("clsx");
|
|
72
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
73
|
+
function cn(...inputs) {
|
|
74
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// lib/components/checkbox.tsx
|
|
78
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
79
|
+
function Checkbox(_a) {
|
|
80
|
+
var _b = _a, {
|
|
81
|
+
className
|
|
82
|
+
} = _b, props = __objRest(_b, [
|
|
83
|
+
"className"
|
|
84
|
+
]);
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
86
|
+
CheckboxPrimitive.Root,
|
|
87
|
+
__spreadProps(__spreadValues({
|
|
88
|
+
"data-slot": "checkbox",
|
|
89
|
+
className: cn(
|
|
90
|
+
"peer border-border data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
91
|
+
className
|
|
92
|
+
)
|
|
93
|
+
}, props), {
|
|
94
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
+
CheckboxPrimitive.Indicator,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "checkbox-indicator",
|
|
98
|
+
className: "grid place-content-center text-current transition-none",
|
|
99
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckIcon, { className: "size-3.5" })
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
106
|
+
0 && (module.exports = {
|
|
107
|
+
Checkbox
|
|
108
|
+
});
|
|
109
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../lib/components/checkbox.tsx","../../lib/utils/utils.ts"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { CheckIcon } from \"lucide-react\"\n\nimport { cn } from \"../utils/utils\"\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer border-border data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox };\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAmC;AACnC,0BAA0B;;;ACJ1B,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADoBQ;AAjBR,SAAS,SAAS,IAGsC;AAHtC,eAChB;AAAA;AAAA,EATF,IAQkB,IAEb,kBAFa,IAEb;AAAA,IADH;AAAA;AAGA,SACE;AAAA,IAAmB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,OACI,QANL;AAAA,MAQC;AAAA,QAAmB;AAAA,QAAlB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UAEV,sDAAC,iCAAU,WAAU,YAAW;AAAA;AAAA,MAClC;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// lib/components/checkbox.tsx
|
|
36
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
37
|
+
import { CheckIcon } from "lucide-react";
|
|
38
|
+
|
|
39
|
+
// lib/utils/utils.ts
|
|
40
|
+
import { clsx } from "clsx";
|
|
41
|
+
import { twMerge } from "tailwind-merge";
|
|
42
|
+
function cn(...inputs) {
|
|
43
|
+
return twMerge(clsx(inputs));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// lib/components/checkbox.tsx
|
|
47
|
+
import { jsx } from "react/jsx-runtime";
|
|
48
|
+
function Checkbox(_a) {
|
|
49
|
+
var _b = _a, {
|
|
50
|
+
className
|
|
51
|
+
} = _b, props = __objRest(_b, [
|
|
52
|
+
"className"
|
|
53
|
+
]);
|
|
54
|
+
return /* @__PURE__ */ jsx(
|
|
55
|
+
CheckboxPrimitive.Root,
|
|
56
|
+
__spreadProps(__spreadValues({
|
|
57
|
+
"data-slot": "checkbox",
|
|
58
|
+
className: cn(
|
|
59
|
+
"peer border-border data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
60
|
+
className
|
|
61
|
+
)
|
|
62
|
+
}, props), {
|
|
63
|
+
children: /* @__PURE__ */ jsx(
|
|
64
|
+
CheckboxPrimitive.Indicator,
|
|
65
|
+
{
|
|
66
|
+
"data-slot": "checkbox-indicator",
|
|
67
|
+
className: "grid place-content-center text-current transition-none",
|
|
68
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
})
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
Checkbox
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=checkbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../lib/components/checkbox.tsx","../../lib/utils/utils.ts"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { CheckIcon } from \"lucide-react\"\n\nimport { cn } from \"../utils/utils\"\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer border-border data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none\"\n >\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox };\n","import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,YAAY,uBAAuB;AACnC,SAAS,iBAAiB;;;ACJ1B,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADoBQ;AAjBR,SAAS,SAAS,IAGsC;AAHtC,eAChB;AAAA;AAAA,EATF,IAQkB,IAEb,kBAFa,IAEb;AAAA,IADH;AAAA;AAGA,SACE;AAAA,IAAmB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,OACI,QANL;AAAA,MAQC;AAAA,QAAmB;AAAA,QAAlB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UAEV,8BAAC,aAAU,WAAU,YAAW;AAAA;AAAA,MAClC;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
3
|
+
|
|
4
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
3
|
+
|
|
4
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
|
|
8
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
48
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
49
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
50
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
51
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
52
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
53
|
+
mod
|
|
54
|
+
));
|
|
55
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
56
|
+
|
|
57
|
+
// lib/components/collapsible.tsx
|
|
58
|
+
var collapsible_exports = {};
|
|
59
|
+
__export(collapsible_exports, {
|
|
60
|
+
Collapsible: () => Collapsible,
|
|
61
|
+
CollapsibleContent: () => CollapsibleContent2,
|
|
62
|
+
CollapsibleTrigger: () => CollapsibleTrigger2
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(collapsible_exports);
|
|
65
|
+
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
66
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
67
|
+
function Collapsible(_a) {
|
|
68
|
+
var props = __objRest(_a, []);
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsiblePrimitive.Root, __spreadValues({ "data-slot": "collapsible" }, props));
|
|
70
|
+
}
|
|
71
|
+
function CollapsibleTrigger2(_a) {
|
|
72
|
+
var props = __objRest(_a, []);
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
|
+
CollapsiblePrimitive.CollapsibleTrigger,
|
|
75
|
+
__spreadValues({
|
|
76
|
+
"data-slot": "collapsible-trigger"
|
|
77
|
+
}, props)
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function CollapsibleContent2(_a) {
|
|
81
|
+
var props = __objRest(_a, []);
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
+
CollapsiblePrimitive.CollapsibleContent,
|
|
84
|
+
__spreadValues({
|
|
85
|
+
"data-slot": "collapsible-content"
|
|
86
|
+
}, props)
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
90
|
+
0 && (module.exports = {
|
|
91
|
+
Collapsible,
|
|
92
|
+
CollapsibleContent,
|
|
93
|
+
CollapsibleTrigger
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=collapsible.js.map
|