@blinkdotnew/ui 0.3.0 → 0.5.0
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/dist/index.d.mts +445 -215
- package/dist/index.d.ts +445 -215
- package/dist/index.js +955 -118
- package/dist/index.mjs +884 -96
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import * as React66 from 'react';
|
|
2
3
|
import React66__default, { createContext, useState, useId, useContext, useEffect, useRef, useCallback } from 'react';
|
|
3
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -6,7 +7,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
6
7
|
import { Slot, createSlot } from '@radix-ui/react-slot';
|
|
7
8
|
import { cva } from 'class-variance-authority';
|
|
8
9
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
9
|
-
import { ChevronDown, ChevronUp, Check, Circle, X, ChevronRight, ChevronLeft, Menu, EyeOff, Eye, Search, ArrowLeft, ArrowRight, Upload, Calendar, Plus, ArrowUp, ArrowDown, ArrowUpDown, TrendingUp, TrendingDown, Loader2, LayoutDashboard, FolderOpen, Users, Settings, BarChart2, CreditCard, HelpCircle, Bell, Pencil, User, LogOut, Send, MoreHorizontal, Info, XCircle, AlertTriangle, CheckCircle2, FileText, Archive, Film, FileCode, Image, File, Download, Trash2 } from 'lucide-react';
|
|
10
|
+
import { ChevronDown, ChevronUp, Check, Circle, X, ChevronRight, ChevronLeft, Menu, EyeOff, Eye, Search, ArrowLeft, ArrowRight, Minus, Upload, Calendar, Plus, ArrowUp, ArrowDown, ArrowUpDown, TrendingUp, TrendingDown, Loader2, LayoutDashboard, FolderOpen, Users, Settings, BarChart2, CreditCard, HelpCircle, Bell, Pencil, User, LogOut, Send, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, GripVertical, Loader2Icon, Info, XCircle, AlertTriangle, CheckCircle2, FileText, Archive, Film, FileCode, Image, File, Download, Trash2 } from 'lucide-react';
|
|
10
11
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
11
12
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
12
13
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
@@ -30,6 +31,7 @@ export { toast } from 'sonner';
|
|
|
30
31
|
import { useSensors, useSensor, PointerSensor, DndContext, DragOverlay } from '@dnd-kit/core';
|
|
31
32
|
import { useSortable, SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
32
33
|
import { CSS } from '@dnd-kit/utilities';
|
|
34
|
+
import * as RechartsPrimitive from 'recharts';
|
|
33
35
|
import { ResponsiveContainer, AreaChart as AreaChart$1, CartesianGrid, XAxis, YAxis, Tooltip as Tooltip$1, Legend, Area, BarChart as BarChart$1, Bar, LineChart as LineChart$1, Line } from 'recharts';
|
|
34
36
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
35
37
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
@@ -42,13 +44,18 @@ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
|
42
44
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
43
45
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
44
46
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
47
|
+
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
48
|
+
import { Command as Command$1 } from 'cmdk';
|
|
49
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
50
|
+
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
51
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
52
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
45
53
|
|
|
46
54
|
// src/provider/blink-ui-provider.tsx
|
|
47
55
|
var BlinkUIContext = createContext(null);
|
|
48
56
|
function useBlinkUI() {
|
|
49
57
|
const ctx = useContext(BlinkUIContext);
|
|
50
|
-
if (!ctx)
|
|
51
|
-
throw new Error("useBlinkUI must be used within <BlinkUIProvider>");
|
|
58
|
+
if (!ctx) throw new Error("useBlinkUI must be used within <BlinkUIProvider>");
|
|
52
59
|
return ctx;
|
|
53
60
|
}
|
|
54
61
|
function BlinkUIProvider({
|
|
@@ -886,8 +893,7 @@ var SidebarItem = React66__default.forwardRef(
|
|
|
886
893
|
!collapsed && /* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 truncate", children: label }),
|
|
887
894
|
!collapsed && badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-[hsl(var(--primary))] bg-opacity-10 text-[hsl(var(--primary))] shrink-0 font-medium", children: badge })
|
|
888
895
|
] });
|
|
889
|
-
if (href)
|
|
890
|
-
return /* @__PURE__ */ jsx("a", { href, className: cls, onClick, children: inner });
|
|
896
|
+
if (href) return /* @__PURE__ */ jsx("a", { href, className: cls, onClick, children: inner });
|
|
891
897
|
return /* @__PURE__ */ jsx("div", { ref, role: "button", tabIndex: 0, className: cls, onClick, ...props, children: inner });
|
|
892
898
|
}
|
|
893
899
|
);
|
|
@@ -1124,10 +1130,8 @@ FieldError.displayName = "FieldError";
|
|
|
1124
1130
|
function getStrength(value) {
|
|
1125
1131
|
const has = (re) => re.test(value);
|
|
1126
1132
|
const score = [value.length >= 8, has(/[A-Z]/), has(/[0-9]/), has(/[^A-Za-z0-9]/)].filter(Boolean).length;
|
|
1127
|
-
if (score <= 1)
|
|
1128
|
-
|
|
1129
|
-
if (score <= 3)
|
|
1130
|
-
return { level: "medium", width: "w-2/3", color: "bg-yellow-500" };
|
|
1133
|
+
if (score <= 1) return { level: "weak", width: "w-1/3", color: "bg-[hsl(var(--destructive))]" };
|
|
1134
|
+
if (score <= 3) return { level: "medium", width: "w-2/3", color: "bg-yellow-500" };
|
|
1131
1135
|
return { level: "strong", width: "w-full", color: "bg-green-500" };
|
|
1132
1136
|
}
|
|
1133
1137
|
var PasswordInput = React66__default.forwardRef(
|
|
@@ -1171,13 +1175,11 @@ var SearchInput = React66__default.forwardRef(
|
|
|
1171
1175
|
const isControlled = valueProp !== void 0;
|
|
1172
1176
|
const value = isControlled ? String(valueProp) : String(internalValue);
|
|
1173
1177
|
function handleChange(e) {
|
|
1174
|
-
if (!isControlled)
|
|
1175
|
-
setInternalValue(e.target.value);
|
|
1178
|
+
if (!isControlled) setInternalValue(e.target.value);
|
|
1176
1179
|
onChange?.(e.target.value);
|
|
1177
1180
|
}
|
|
1178
1181
|
function handleClear() {
|
|
1179
|
-
if (!isControlled)
|
|
1180
|
-
setInternalValue("");
|
|
1182
|
+
if (!isControlled) setInternalValue("");
|
|
1181
1183
|
onChange?.("");
|
|
1182
1184
|
onClear?.();
|
|
1183
1185
|
}
|
|
@@ -1213,10 +1215,8 @@ var SearchInput = React66__default.forwardRef(
|
|
|
1213
1215
|
);
|
|
1214
1216
|
SearchInput.displayName = "SearchInput";
|
|
1215
1217
|
function formatBytes(bytes) {
|
|
1216
|
-
if (bytes < 1024)
|
|
1217
|
-
|
|
1218
|
-
if (bytes < 1024 * 1024)
|
|
1219
|
-
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
1218
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
1219
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
1220
1220
|
return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
|
|
1221
1221
|
}
|
|
1222
1222
|
function filterBySize(files, maxSize) {
|
|
@@ -1226,16 +1226,14 @@ function FileUpload({ accept, multiple, maxSize, onFiles, className, disabled })
|
|
|
1226
1226
|
const inputRef = useRef(null);
|
|
1227
1227
|
const [dragging, setDragging] = useState(false);
|
|
1228
1228
|
function handleFiles(raw) {
|
|
1229
|
-
if (!raw)
|
|
1230
|
-
return;
|
|
1229
|
+
if (!raw) return;
|
|
1231
1230
|
const files = filterBySize(Array.from(raw), maxSize);
|
|
1232
1231
|
onFiles?.(files);
|
|
1233
1232
|
}
|
|
1234
1233
|
function handleDrop(e) {
|
|
1235
1234
|
e.preventDefault();
|
|
1236
1235
|
setDragging(false);
|
|
1237
|
-
if (!disabled)
|
|
1238
|
-
handleFiles(e.dataTransfer.files);
|
|
1236
|
+
if (!disabled) handleFiles(e.dataTransfer.files);
|
|
1239
1237
|
}
|
|
1240
1238
|
return /* @__PURE__ */ jsxs(
|
|
1241
1239
|
"div",
|
|
@@ -1246,8 +1244,7 @@ function FileUpload({ accept, multiple, maxSize, onFiles, className, disabled })
|
|
|
1246
1244
|
onKeyDown: (e) => e.key === "Enter" && !disabled && inputRef.current?.click(),
|
|
1247
1245
|
onDragOver: (e) => {
|
|
1248
1246
|
e.preventDefault();
|
|
1249
|
-
if (!disabled)
|
|
1250
|
-
setDragging(true);
|
|
1247
|
+
if (!disabled) setDragging(true);
|
|
1251
1248
|
},
|
|
1252
1249
|
onDragLeave: () => setDragging(false),
|
|
1253
1250
|
onDrop: handleDrop,
|
|
@@ -1283,8 +1280,7 @@ function FileUpload({ accept, multiple, maxSize, onFiles, className, disabled })
|
|
|
1283
1280
|
);
|
|
1284
1281
|
}
|
|
1285
1282
|
function FileUploadPreview({ files, onRemove, className }) {
|
|
1286
|
-
if (!files.length)
|
|
1287
|
-
return null;
|
|
1283
|
+
if (!files.length) return null;
|
|
1288
1284
|
return /* @__PURE__ */ jsx("ul", { className: cn("flex flex-col gap-1", className), children: files.map((file, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center justify-between rounded-md border border-[hsl(var(--border))] px-3 py-2 text-sm", children: [
|
|
1289
1285
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-[hsl(var(--foreground))]", children: file.name }),
|
|
1290
1286
|
/* @__PURE__ */ jsxs("div", { className: "ml-2 flex shrink-0 items-center gap-2", children: [
|
|
@@ -1320,8 +1316,7 @@ function CalendarGrid({ year, month, selected, onSelect }) {
|
|
|
1320
1316
|
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-0.5", children: [
|
|
1321
1317
|
DAYS.map((d) => /* @__PURE__ */ jsx("div", { className: "py-1 text-center text-xs font-medium text-[hsl(var(--muted-foreground))]", children: d }, d)),
|
|
1322
1318
|
cells.map((day, i) => {
|
|
1323
|
-
if (!day)
|
|
1324
|
-
return /* @__PURE__ */ jsx("div", {}, i);
|
|
1319
|
+
if (!day) return /* @__PURE__ */ jsx("div", {}, i);
|
|
1325
1320
|
const date = new Date(year, month, day);
|
|
1326
1321
|
const isToday = isSameDay(date, today);
|
|
1327
1322
|
const isSelected = selected && isSameDay(date, selected);
|
|
@@ -1419,15 +1414,13 @@ function FormMessage({ className, children, name }) {
|
|
|
1419
1414
|
const { formState } = useFormContext();
|
|
1420
1415
|
const error = name ? formState.errors[name] : void 0;
|
|
1421
1416
|
const message = error?.message ? String(error.message) : children;
|
|
1422
|
-
if (!message)
|
|
1423
|
-
return null;
|
|
1417
|
+
if (!message) return null;
|
|
1424
1418
|
return /* @__PURE__ */ jsx("p", { className: cn("text-xs text-[hsl(var(--destructive))]", className), children: message });
|
|
1425
1419
|
}
|
|
1426
1420
|
var StepFormContext = createContext(null);
|
|
1427
1421
|
function useStepForm() {
|
|
1428
1422
|
const ctx = useContext(StepFormContext);
|
|
1429
|
-
if (!ctx)
|
|
1430
|
-
throw new Error("useStepForm must be used within StepForm");
|
|
1423
|
+
if (!ctx) throw new Error("useStepForm must be used within StepForm");
|
|
1431
1424
|
return ctx;
|
|
1432
1425
|
}
|
|
1433
1426
|
function StepForm({ steps, onSubmit, children, className }) {
|
|
@@ -1490,8 +1483,7 @@ function ArrayField({
|
|
|
1490
1483
|
className
|
|
1491
1484
|
}) {
|
|
1492
1485
|
function add() {
|
|
1493
|
-
if (maxItems && value.length >= maxItems)
|
|
1494
|
-
return;
|
|
1486
|
+
if (maxItems && value.length >= maxItems) return;
|
|
1495
1487
|
onChange([...value, defaultItem]);
|
|
1496
1488
|
}
|
|
1497
1489
|
function remove(index) {
|
|
@@ -1561,10 +1553,8 @@ function toLabel(key) {
|
|
|
1561
1553
|
return key.replace(/([A-Z])/g, " $1").replace(/^./, (s) => s.toUpperCase());
|
|
1562
1554
|
}
|
|
1563
1555
|
function getInputType(field) {
|
|
1564
|
-
if (field instanceof z.ZodEmail)
|
|
1565
|
-
|
|
1566
|
-
if (field instanceof z.ZodURL)
|
|
1567
|
-
return "url";
|
|
1556
|
+
if (field instanceof z.ZodEmail) return "email";
|
|
1557
|
+
if (field instanceof z.ZodURL) return "url";
|
|
1568
1558
|
return "text";
|
|
1569
1559
|
}
|
|
1570
1560
|
function unwrapOptional(field) {
|
|
@@ -1632,8 +1622,7 @@ function AutoForm({ schema, onSubmit, defaultValues, submitLabel = "Submit" }) {
|
|
|
1632
1622
|
] });
|
|
1633
1623
|
}
|
|
1634
1624
|
function DataTableColumnHeader({ column, title }) {
|
|
1635
|
-
if (!column.getCanSort())
|
|
1636
|
-
return /* @__PURE__ */ jsx("span", { children: title });
|
|
1625
|
+
if (!column.getCanSort()) return /* @__PURE__ */ jsx("span", { children: title });
|
|
1637
1626
|
const sorted = column.getIsSorted();
|
|
1638
1627
|
return /* @__PURE__ */ jsxs(
|
|
1639
1628
|
"button",
|
|
@@ -1673,8 +1662,7 @@ function DataTablePagination({ table }) {
|
|
|
1673
1662
|
] });
|
|
1674
1663
|
}
|
|
1675
1664
|
function DataTableToolbar({ table, searchColumn }) {
|
|
1676
|
-
if (!searchColumn)
|
|
1677
|
-
return null;
|
|
1665
|
+
if (!searchColumn) return null;
|
|
1678
1666
|
return /* @__PURE__ */ jsx("div", { className: "py-3", children: /* @__PURE__ */ jsx(
|
|
1679
1667
|
Input,
|
|
1680
1668
|
{
|
|
@@ -1698,8 +1686,7 @@ function DataTable({ columns, data, pageSize = 10, searchable, searchColumn, loa
|
|
|
1698
1686
|
initialState: { pagination: { pageSize } },
|
|
1699
1687
|
state: { sorting }
|
|
1700
1688
|
});
|
|
1701
|
-
if (loading)
|
|
1702
|
-
return /* @__PURE__ */ jsx("div", { className: "space-y-2", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }, i)) });
|
|
1689
|
+
if (loading) return /* @__PURE__ */ jsx("div", { className: "space-y-2", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }, i)) });
|
|
1703
1690
|
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
1704
1691
|
searchable && /* @__PURE__ */ jsx(DataTableToolbar, { table, searchColumn }),
|
|
1705
1692
|
/* @__PURE__ */ jsx("div", { className: "rounded-md border border-[hsl(var(--border))] overflow-hidden", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-sm", children: [
|
|
@@ -1729,10 +1716,8 @@ function EditableCell({ value: initial, onSave }) {
|
|
|
1729
1716
|
onChange: (e) => setVal(e.target.value),
|
|
1730
1717
|
onBlur: commit,
|
|
1731
1718
|
onKeyDown: (e) => {
|
|
1732
|
-
if (e.key === "Enter")
|
|
1733
|
-
|
|
1734
|
-
if (e.key === "Escape")
|
|
1735
|
-
setEditing(false);
|
|
1719
|
+
if (e.key === "Enter") commit();
|
|
1720
|
+
if (e.key === "Escape") setEditing(false);
|
|
1736
1721
|
}
|
|
1737
1722
|
}
|
|
1738
1723
|
);
|
|
@@ -1751,8 +1736,7 @@ function DataGrid({ columns, data: initialData, onDataChange, editable, classNam
|
|
|
1751
1736
|
const [rowSelection, setRowSelection] = React66__default.useState({});
|
|
1752
1737
|
const columnResizeMode = "onChange";
|
|
1753
1738
|
const editableColumns = React66__default.useMemo(() => {
|
|
1754
|
-
if (!editable)
|
|
1755
|
-
return columns;
|
|
1739
|
+
if (!editable) return columns;
|
|
1756
1740
|
return columns.map((col) => ({
|
|
1757
1741
|
...col,
|
|
1758
1742
|
cell: (info) => /* @__PURE__ */ jsx(
|
|
@@ -2061,8 +2045,7 @@ function Banner({
|
|
|
2061
2045
|
onDismiss?.();
|
|
2062
2046
|
}, 200);
|
|
2063
2047
|
};
|
|
2064
|
-
if (dismissed)
|
|
2065
|
-
return null;
|
|
2048
|
+
if (dismissed) return null;
|
|
2066
2049
|
return /* @__PURE__ */ jsxs(
|
|
2067
2050
|
"div",
|
|
2068
2051
|
{
|
|
@@ -2192,8 +2175,7 @@ function Breadcrumb({ children, className }) {
|
|
|
2192
2175
|
const withSeparators = [];
|
|
2193
2176
|
items.forEach((item, i) => {
|
|
2194
2177
|
withSeparators.push(item);
|
|
2195
|
-
if (i < items.length - 1)
|
|
2196
|
-
withSeparators.push(/* @__PURE__ */ jsx(BreadcrumbSeparator, {}, `sep-${i}`));
|
|
2178
|
+
if (i < items.length - 1) withSeparators.push(/* @__PURE__ */ jsx(BreadcrumbSeparator, {}, `sep-${i}`));
|
|
2197
2179
|
});
|
|
2198
2180
|
return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: cn("flex flex-wrap items-center gap-1", className), children: withSeparators }) });
|
|
2199
2181
|
}
|
|
@@ -2216,8 +2198,7 @@ function AddFilterPopover({ filters, onAdd }) {
|
|
|
2216
2198
|
const def = filters.find((f) => f.key === key);
|
|
2217
2199
|
const ops = def?.type === "number" ? numOps : textOps;
|
|
2218
2200
|
const handleAdd = () => {
|
|
2219
|
-
if (!key || !val)
|
|
2220
|
-
return;
|
|
2201
|
+
if (!key || !val) return;
|
|
2221
2202
|
onAdd({ key, operator: op || ops[0], value: val });
|
|
2222
2203
|
setKey("");
|
|
2223
2204
|
setOp("");
|
|
@@ -2262,8 +2243,7 @@ function Filters({ filters, value, onChange, className }) {
|
|
|
2262
2243
|
] });
|
|
2263
2244
|
}
|
|
2264
2245
|
function BulkActions({ count, actions, onClear, className }) {
|
|
2265
|
-
if (count === 0)
|
|
2266
|
-
return null;
|
|
2246
|
+
if (count === 0) return null;
|
|
2267
2247
|
return /* @__PURE__ */ jsxs("div", { className: cn("fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-4 py-2 shadow-lg", className), children: [
|
|
2268
2248
|
/* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-[hsl(var(--foreground))] pr-2 border-r border-[hsl(var(--border))]", children: [
|
|
2269
2249
|
count,
|
|
@@ -2316,8 +2296,7 @@ function ToggleButtonGroup(props) {
|
|
|
2316
2296
|
}
|
|
2317
2297
|
};
|
|
2318
2298
|
return /* @__PURE__ */ jsx("div", { className: cn("inline-flex items-center gap-1 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] p-0.5", className), children: React66__default.Children.map(children, (child) => {
|
|
2319
|
-
if (!React66__default.isValidElement(child))
|
|
2320
|
-
return child;
|
|
2299
|
+
if (!React66__default.isValidElement(child)) return child;
|
|
2321
2300
|
const tb = child;
|
|
2322
2301
|
return React66__default.cloneElement(tb, {
|
|
2323
2302
|
pressed: isPressed(tb.props.value),
|
|
@@ -2379,8 +2358,7 @@ function CommandBar({ open, onOpenChange, children, placeholder = "Search comman
|
|
|
2379
2358
|
return;
|
|
2380
2359
|
}
|
|
2381
2360
|
const focusable = items.current?.querySelectorAll("button");
|
|
2382
|
-
if (!focusable?.length)
|
|
2383
|
-
return;
|
|
2361
|
+
if (!focusable?.length) return;
|
|
2384
2362
|
const arr = Array.from(focusable);
|
|
2385
2363
|
const idx = arr.indexOf(document.activeElement);
|
|
2386
2364
|
if (e.key === "ArrowDown") {
|
|
@@ -2462,18 +2440,14 @@ function Kanban({ columns: initialColumns, onMoveCard, className }) {
|
|
|
2462
2440
|
const onDragEnd = ({ active, over }) => {
|
|
2463
2441
|
setActiveCard(null);
|
|
2464
2442
|
setOverColId(null);
|
|
2465
|
-
if (!over || active.id === over.id)
|
|
2466
|
-
return;
|
|
2443
|
+
if (!over || active.id === over.id) return;
|
|
2467
2444
|
const fromCol = findColByCard(active.id);
|
|
2468
2445
|
const toCol = cols.find((c) => c.id === over.id) ?? findColByCard(over.id);
|
|
2469
|
-
if (!fromCol || !toCol || fromCol.id === toCol.id)
|
|
2470
|
-
return;
|
|
2446
|
+
if (!fromCol || !toCol || fromCol.id === toCol.id) return;
|
|
2471
2447
|
const card = fromCol.cards.find((c) => c.id === active.id);
|
|
2472
2448
|
setCols((prev) => prev.map((c) => {
|
|
2473
|
-
if (c.id === fromCol.id)
|
|
2474
|
-
|
|
2475
|
-
if (c.id === toCol.id)
|
|
2476
|
-
return { ...c, cards: [...c.cards, card] };
|
|
2449
|
+
if (c.id === fromCol.id) return { ...c, cards: c.cards.filter((card2) => card2.id !== active.id) };
|
|
2450
|
+
if (c.id === toCol.id) return { ...c, cards: [...c.cards, card] };
|
|
2477
2451
|
return c;
|
|
2478
2452
|
}));
|
|
2479
2453
|
onMoveCard?.(active.id, fromCol.id, toCol.id);
|
|
@@ -2645,8 +2619,7 @@ function LineChart({
|
|
|
2645
2619
|
] }) }) });
|
|
2646
2620
|
}
|
|
2647
2621
|
function buildPath(data, w, h) {
|
|
2648
|
-
if (data.length < 2)
|
|
2649
|
-
return "";
|
|
2622
|
+
if (data.length < 2) return "";
|
|
2650
2623
|
const min = Math.min(...data);
|
|
2651
2624
|
const max = Math.max(...data);
|
|
2652
2625
|
const range = max - min || 1;
|
|
@@ -2667,8 +2640,7 @@ function Sparkline({
|
|
|
2667
2640
|
className
|
|
2668
2641
|
}) {
|
|
2669
2642
|
const path = buildPath(data, width, height);
|
|
2670
|
-
if (!path)
|
|
2671
|
-
return null;
|
|
2643
|
+
if (!path) return null;
|
|
2672
2644
|
const min = Math.min(...data);
|
|
2673
2645
|
const max = Math.max(...data);
|
|
2674
2646
|
const range = max - min || 1;
|
|
@@ -2720,8 +2692,7 @@ function Beacon({ color = "primary", size = "md", children, className }) {
|
|
|
2720
2692
|
var TourContext = createContext(null);
|
|
2721
2693
|
function useTour() {
|
|
2722
2694
|
const ctx = useContext(TourContext);
|
|
2723
|
-
if (!ctx)
|
|
2724
|
-
throw new Error("useTour must be used within <Tour>");
|
|
2695
|
+
if (!ctx) throw new Error("useTour must be used within <Tour>");
|
|
2725
2696
|
return ctx;
|
|
2726
2697
|
}
|
|
2727
2698
|
function Tour({ totalSteps, children }) {
|
|
@@ -2736,15 +2707,11 @@ function Tour({ totalSteps, children }) {
|
|
|
2736
2707
|
const prev = useCallback(() => setCurrentStep((s) => Math.max(s - 1, 0)), []);
|
|
2737
2708
|
const goTo = useCallback((step) => setCurrentStep(Math.max(0, Math.min(step, totalSteps - 1))), [totalSteps]);
|
|
2738
2709
|
useEffect(() => {
|
|
2739
|
-
if (!isActive)
|
|
2740
|
-
return;
|
|
2710
|
+
if (!isActive) return;
|
|
2741
2711
|
const onKey = (e) => {
|
|
2742
|
-
if (e.key === "Escape")
|
|
2743
|
-
|
|
2744
|
-
if (e.key === "
|
|
2745
|
-
next();
|
|
2746
|
-
if (e.key === "ArrowLeft")
|
|
2747
|
-
prev();
|
|
2712
|
+
if (e.key === "Escape") stop();
|
|
2713
|
+
if (e.key === "ArrowRight") next();
|
|
2714
|
+
if (e.key === "ArrowLeft") prev();
|
|
2748
2715
|
};
|
|
2749
2716
|
window.addEventListener("keydown", onKey);
|
|
2750
2717
|
return () => window.removeEventListener("keydown", onKey);
|
|
@@ -3283,8 +3250,7 @@ function InviteModal({ className }) {
|
|
|
3283
3250
|
const [role, setRole] = useState("Member");
|
|
3284
3251
|
const [pending, setPending] = useState(PENDING);
|
|
3285
3252
|
const invite = () => {
|
|
3286
|
-
if (!email.trim())
|
|
3287
|
-
return;
|
|
3253
|
+
if (!email.trim()) return;
|
|
3288
3254
|
setPending((p) => [...p, { email: email.trim(), role }]);
|
|
3289
3255
|
setEmail("");
|
|
3290
3256
|
};
|
|
@@ -3333,8 +3299,7 @@ function ManageTagsModal({ className }) {
|
|
|
3333
3299
|
const [newTag, setNewTag] = useState("");
|
|
3334
3300
|
const [colorIdx, setColorIdx] = useState(0);
|
|
3335
3301
|
const addTag = () => {
|
|
3336
|
-
if (!newTag.trim())
|
|
3337
|
-
return;
|
|
3302
|
+
if (!newTag.trim()) return;
|
|
3338
3303
|
const id = `tag-${Date.now()}`;
|
|
3339
3304
|
setTags((t) => [...t, { id, name: newTag.trim(), color: COLORS[colorIdx % COLORS.length] }]);
|
|
3340
3305
|
setNewTag("");
|
|
@@ -3597,8 +3562,7 @@ function ChatDetail({ className }) {
|
|
|
3597
3562
|
const [messages, setMessages] = useState(INITIAL_MESSAGES);
|
|
3598
3563
|
const [input, setInput] = useState("");
|
|
3599
3564
|
const send = () => {
|
|
3600
|
-
if (!input.trim())
|
|
3601
|
-
return;
|
|
3565
|
+
if (!input.trim()) return;
|
|
3602
3566
|
const now = (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
|
|
3603
3567
|
setMessages((m) => [...m, { id: `${Date.now()}`, author: "You", initials: "JD", text: input.trim(), time: now, self: true }]);
|
|
3604
3568
|
setInput("");
|
|
@@ -4217,7 +4181,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
4217
4181
|
const { asChild, ...primitiveProps } = props;
|
|
4218
4182
|
const Comp = asChild ? Slot3 : node;
|
|
4219
4183
|
if (typeof window !== "undefined") {
|
|
4220
|
-
window[Symbol.for("radix-ui")] = true;
|
|
4184
|
+
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
4221
4185
|
}
|
|
4222
4186
|
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
4223
4187
|
});
|
|
@@ -4233,11 +4197,9 @@ var Label4 = React66.forwardRef((props, forwardedRef) => {
|
|
|
4233
4197
|
ref: forwardedRef,
|
|
4234
4198
|
onMouseDown: (event) => {
|
|
4235
4199
|
const target = event.target;
|
|
4236
|
-
if (target.closest("button, input, select, textarea"))
|
|
4237
|
-
return;
|
|
4200
|
+
if (target.closest("button, input, select, textarea")) return;
|
|
4238
4201
|
props.onMouseDown?.(event);
|
|
4239
|
-
if (!event.defaultPrevented && event.detail > 1)
|
|
4240
|
-
event.preventDefault();
|
|
4202
|
+
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
|
4241
4203
|
}
|
|
4242
4204
|
}
|
|
4243
4205
|
);
|
|
@@ -4708,7 +4670,833 @@ var ToggleGroupItem = React66.forwardRef(({ className, children, variant, size,
|
|
|
4708
4670
|
);
|
|
4709
4671
|
});
|
|
4710
4672
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
4673
|
+
function Calendar3({
|
|
4674
|
+
className,
|
|
4675
|
+
classNames,
|
|
4676
|
+
showOutsideDays = true,
|
|
4677
|
+
captionLayout = "label",
|
|
4678
|
+
buttonVariant = "ghost",
|
|
4679
|
+
formatters,
|
|
4680
|
+
components,
|
|
4681
|
+
...props
|
|
4682
|
+
}) {
|
|
4683
|
+
const defaultClassNames = getDefaultClassNames();
|
|
4684
|
+
return /* @__PURE__ */ jsx(
|
|
4685
|
+
DayPicker,
|
|
4686
|
+
{
|
|
4687
|
+
showOutsideDays,
|
|
4688
|
+
className: cn(
|
|
4689
|
+
"bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
4690
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
4691
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
4692
|
+
className
|
|
4693
|
+
),
|
|
4694
|
+
captionLayout,
|
|
4695
|
+
formatters: {
|
|
4696
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
4697
|
+
...formatters
|
|
4698
|
+
},
|
|
4699
|
+
classNames: {
|
|
4700
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
4701
|
+
months: cn(
|
|
4702
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
4703
|
+
defaultClassNames.months
|
|
4704
|
+
),
|
|
4705
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
4706
|
+
nav: cn(
|
|
4707
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
4708
|
+
defaultClassNames.nav
|
|
4709
|
+
),
|
|
4710
|
+
button_previous: cn(
|
|
4711
|
+
buttonVariants({ variant: buttonVariant }),
|
|
4712
|
+
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
4713
|
+
defaultClassNames.button_previous
|
|
4714
|
+
),
|
|
4715
|
+
button_next: cn(
|
|
4716
|
+
buttonVariants({ variant: buttonVariant }),
|
|
4717
|
+
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
4718
|
+
defaultClassNames.button_next
|
|
4719
|
+
),
|
|
4720
|
+
month_caption: cn(
|
|
4721
|
+
"flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",
|
|
4722
|
+
defaultClassNames.month_caption
|
|
4723
|
+
),
|
|
4724
|
+
dropdowns: cn(
|
|
4725
|
+
"flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
4726
|
+
defaultClassNames.dropdowns
|
|
4727
|
+
),
|
|
4728
|
+
dropdown_root: cn(
|
|
4729
|
+
"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",
|
|
4730
|
+
defaultClassNames.dropdown_root
|
|
4731
|
+
),
|
|
4732
|
+
dropdown: cn(
|
|
4733
|
+
"bg-popover absolute inset-0 opacity-0",
|
|
4734
|
+
defaultClassNames.dropdown
|
|
4735
|
+
),
|
|
4736
|
+
caption_label: cn(
|
|
4737
|
+
"select-none font-medium",
|
|
4738
|
+
captionLayout === "label" ? "text-sm" : "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",
|
|
4739
|
+
defaultClassNames.caption_label
|
|
4740
|
+
),
|
|
4741
|
+
table: "w-full border-collapse",
|
|
4742
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
4743
|
+
weekday: cn(
|
|
4744
|
+
"text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",
|
|
4745
|
+
defaultClassNames.weekday
|
|
4746
|
+
),
|
|
4747
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
4748
|
+
week_number_header: cn(
|
|
4749
|
+
"w-[--cell-size] select-none",
|
|
4750
|
+
defaultClassNames.week_number_header
|
|
4751
|
+
),
|
|
4752
|
+
week_number: cn(
|
|
4753
|
+
"text-muted-foreground select-none text-[0.8rem]",
|
|
4754
|
+
defaultClassNames.week_number
|
|
4755
|
+
),
|
|
4756
|
+
day: cn(
|
|
4757
|
+
"group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
4758
|
+
defaultClassNames.day
|
|
4759
|
+
),
|
|
4760
|
+
range_start: cn(
|
|
4761
|
+
"bg-accent rounded-l-md",
|
|
4762
|
+
defaultClassNames.range_start
|
|
4763
|
+
),
|
|
4764
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
4765
|
+
range_end: cn("bg-accent rounded-r-md", defaultClassNames.range_end),
|
|
4766
|
+
today: cn(
|
|
4767
|
+
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
4768
|
+
defaultClassNames.today
|
|
4769
|
+
),
|
|
4770
|
+
outside: cn(
|
|
4771
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
4772
|
+
defaultClassNames.outside
|
|
4773
|
+
),
|
|
4774
|
+
disabled: cn(
|
|
4775
|
+
"text-muted-foreground opacity-50",
|
|
4776
|
+
defaultClassNames.disabled
|
|
4777
|
+
),
|
|
4778
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
4779
|
+
...classNames
|
|
4780
|
+
},
|
|
4781
|
+
components: {
|
|
4782
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
4783
|
+
return /* @__PURE__ */ jsx(
|
|
4784
|
+
"div",
|
|
4785
|
+
{
|
|
4786
|
+
"data-slot": "calendar",
|
|
4787
|
+
ref: rootRef,
|
|
4788
|
+
className: cn(className2),
|
|
4789
|
+
...props2
|
|
4790
|
+
}
|
|
4791
|
+
);
|
|
4792
|
+
},
|
|
4793
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
4794
|
+
if (orientation === "left") {
|
|
4795
|
+
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
4796
|
+
}
|
|
4797
|
+
if (orientation === "right") {
|
|
4798
|
+
return /* @__PURE__ */ jsx(
|
|
4799
|
+
ChevronRightIcon,
|
|
4800
|
+
{
|
|
4801
|
+
className: cn("size-4", className2),
|
|
4802
|
+
...props2
|
|
4803
|
+
}
|
|
4804
|
+
);
|
|
4805
|
+
}
|
|
4806
|
+
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
4807
|
+
},
|
|
4808
|
+
DayButton: CalendarDayButton,
|
|
4809
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
4810
|
+
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-[--cell-size] items-center justify-center text-center", children }) });
|
|
4811
|
+
},
|
|
4812
|
+
...components
|
|
4813
|
+
},
|
|
4814
|
+
...props
|
|
4815
|
+
}
|
|
4816
|
+
);
|
|
4817
|
+
}
|
|
4818
|
+
function CalendarDayButton({
|
|
4819
|
+
className,
|
|
4820
|
+
day,
|
|
4821
|
+
modifiers,
|
|
4822
|
+
...props
|
|
4823
|
+
}) {
|
|
4824
|
+
const defaultClassNames = getDefaultClassNames();
|
|
4825
|
+
const ref = React66.useRef(null);
|
|
4826
|
+
React66.useEffect(() => {
|
|
4827
|
+
if (modifiers.focused) ref.current?.focus();
|
|
4828
|
+
}, [modifiers.focused]);
|
|
4829
|
+
return /* @__PURE__ */ jsx(
|
|
4830
|
+
Button,
|
|
4831
|
+
{
|
|
4832
|
+
ref,
|
|
4833
|
+
variant: "ghost",
|
|
4834
|
+
size: "icon",
|
|
4835
|
+
"data-day": day.date.toLocaleDateString(),
|
|
4836
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
4837
|
+
"data-range-start": modifiers.range_start,
|
|
4838
|
+
"data-range-end": modifiers.range_end,
|
|
4839
|
+
"data-range-middle": modifiers.range_middle,
|
|
4840
|
+
className: cn(
|
|
4841
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",
|
|
4842
|
+
defaultClassNames.day,
|
|
4843
|
+
className
|
|
4844
|
+
),
|
|
4845
|
+
...props
|
|
4846
|
+
}
|
|
4847
|
+
);
|
|
4848
|
+
}
|
|
4849
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
4850
|
+
var ChartContext = React66.createContext(null);
|
|
4851
|
+
function useChart() {
|
|
4852
|
+
const context = React66.useContext(ChartContext);
|
|
4853
|
+
if (!context) {
|
|
4854
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
4855
|
+
}
|
|
4856
|
+
return context;
|
|
4857
|
+
}
|
|
4858
|
+
var ChartContainer = React66.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
4859
|
+
const uniqueId = React66.useId();
|
|
4860
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
4861
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
4862
|
+
"div",
|
|
4863
|
+
{
|
|
4864
|
+
"data-chart": chartId,
|
|
4865
|
+
ref,
|
|
4866
|
+
className: cn(
|
|
4867
|
+
"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",
|
|
4868
|
+
className
|
|
4869
|
+
),
|
|
4870
|
+
...props,
|
|
4871
|
+
children: [
|
|
4872
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
4873
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
4874
|
+
]
|
|
4875
|
+
}
|
|
4876
|
+
) });
|
|
4877
|
+
});
|
|
4878
|
+
ChartContainer.displayName = "Chart";
|
|
4879
|
+
var ChartStyle = ({ id, config }) => {
|
|
4880
|
+
const colorConfig = Object.entries(config).filter(
|
|
4881
|
+
([, config2]) => config2.theme || config2.color
|
|
4882
|
+
);
|
|
4883
|
+
if (!colorConfig.length) {
|
|
4884
|
+
return null;
|
|
4885
|
+
}
|
|
4886
|
+
return /* @__PURE__ */ jsx(
|
|
4887
|
+
"style",
|
|
4888
|
+
{
|
|
4889
|
+
dangerouslySetInnerHTML: {
|
|
4890
|
+
__html: Object.entries(THEMES).map(
|
|
4891
|
+
([theme, prefix]) => `
|
|
4892
|
+
${prefix} [data-chart=${id}] {
|
|
4893
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
4894
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
4895
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
4896
|
+
}).join("\n")}
|
|
4897
|
+
}
|
|
4898
|
+
`
|
|
4899
|
+
).join("\n")
|
|
4900
|
+
}
|
|
4901
|
+
}
|
|
4902
|
+
);
|
|
4903
|
+
};
|
|
4904
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
4905
|
+
var ChartTooltipContent = React66.forwardRef(
|
|
4906
|
+
({
|
|
4907
|
+
active,
|
|
4908
|
+
payload,
|
|
4909
|
+
className,
|
|
4910
|
+
indicator = "dot",
|
|
4911
|
+
hideLabel = false,
|
|
4912
|
+
hideIndicator = false,
|
|
4913
|
+
label,
|
|
4914
|
+
labelFormatter,
|
|
4915
|
+
labelClassName,
|
|
4916
|
+
formatter,
|
|
4917
|
+
color,
|
|
4918
|
+
nameKey,
|
|
4919
|
+
labelKey
|
|
4920
|
+
}, ref) => {
|
|
4921
|
+
const { config } = useChart();
|
|
4922
|
+
const tooltipLabel = React66.useMemo(() => {
|
|
4923
|
+
if (hideLabel || !payload?.length) {
|
|
4924
|
+
return null;
|
|
4925
|
+
}
|
|
4926
|
+
const [item] = payload;
|
|
4927
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
4928
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4929
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
4930
|
+
if (labelFormatter) {
|
|
4931
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
4932
|
+
}
|
|
4933
|
+
if (!value) {
|
|
4934
|
+
return null;
|
|
4935
|
+
}
|
|
4936
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
4937
|
+
}, [
|
|
4938
|
+
label,
|
|
4939
|
+
labelFormatter,
|
|
4940
|
+
payload,
|
|
4941
|
+
hideLabel,
|
|
4942
|
+
labelClassName,
|
|
4943
|
+
config,
|
|
4944
|
+
labelKey
|
|
4945
|
+
]);
|
|
4946
|
+
if (!active || !payload?.length) {
|
|
4947
|
+
return null;
|
|
4948
|
+
}
|
|
4949
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
4950
|
+
return /* @__PURE__ */ jsxs(
|
|
4951
|
+
"div",
|
|
4952
|
+
{
|
|
4953
|
+
ref,
|
|
4954
|
+
className: cn(
|
|
4955
|
+
"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",
|
|
4956
|
+
className
|
|
4957
|
+
),
|
|
4958
|
+
children: [
|
|
4959
|
+
!nestLabel ? tooltipLabel : null,
|
|
4960
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
4961
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
4962
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4963
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
4964
|
+
return /* @__PURE__ */ jsx(
|
|
4965
|
+
"div",
|
|
4966
|
+
{
|
|
4967
|
+
className: cn(
|
|
4968
|
+
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
4969
|
+
indicator === "dot" && "items-center"
|
|
4970
|
+
),
|
|
4971
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4972
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
4973
|
+
"div",
|
|
4974
|
+
{
|
|
4975
|
+
className: cn(
|
|
4976
|
+
"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",
|
|
4977
|
+
{
|
|
4978
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
4979
|
+
"w-1": indicator === "line",
|
|
4980
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
4981
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
4982
|
+
}
|
|
4983
|
+
),
|
|
4984
|
+
style: {
|
|
4985
|
+
"--color-bg": indicatorColor,
|
|
4986
|
+
"--color-border": indicatorColor
|
|
4987
|
+
}
|
|
4988
|
+
}
|
|
4989
|
+
),
|
|
4990
|
+
/* @__PURE__ */ jsxs(
|
|
4991
|
+
"div",
|
|
4992
|
+
{
|
|
4993
|
+
className: cn(
|
|
4994
|
+
"flex flex-1 justify-between leading-none",
|
|
4995
|
+
nestLabel ? "items-end" : "items-center"
|
|
4996
|
+
),
|
|
4997
|
+
children: [
|
|
4998
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
4999
|
+
nestLabel ? tooltipLabel : null,
|
|
5000
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
5001
|
+
] }),
|
|
5002
|
+
item.value && /* @__PURE__ */ jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
5003
|
+
]
|
|
5004
|
+
}
|
|
5005
|
+
)
|
|
5006
|
+
] })
|
|
5007
|
+
},
|
|
5008
|
+
item.dataKey
|
|
5009
|
+
);
|
|
5010
|
+
}) })
|
|
5011
|
+
]
|
|
5012
|
+
}
|
|
5013
|
+
);
|
|
5014
|
+
}
|
|
5015
|
+
);
|
|
5016
|
+
ChartTooltipContent.displayName = "ChartTooltip";
|
|
5017
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
5018
|
+
var ChartLegendContent = React66.forwardRef(
|
|
5019
|
+
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
5020
|
+
const { config } = useChart();
|
|
5021
|
+
if (!payload?.length) {
|
|
5022
|
+
return null;
|
|
5023
|
+
}
|
|
5024
|
+
return /* @__PURE__ */ jsx(
|
|
5025
|
+
"div",
|
|
5026
|
+
{
|
|
5027
|
+
ref,
|
|
5028
|
+
className: cn(
|
|
5029
|
+
"flex items-center justify-center gap-4",
|
|
5030
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
5031
|
+
className
|
|
5032
|
+
),
|
|
5033
|
+
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
5034
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
5035
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
5036
|
+
return /* @__PURE__ */ jsxs(
|
|
5037
|
+
"div",
|
|
5038
|
+
{
|
|
5039
|
+
className: cn(
|
|
5040
|
+
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
|
5041
|
+
),
|
|
5042
|
+
children: [
|
|
5043
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
5044
|
+
"div",
|
|
5045
|
+
{
|
|
5046
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
5047
|
+
style: {
|
|
5048
|
+
backgroundColor: item.color
|
|
5049
|
+
}
|
|
5050
|
+
}
|
|
5051
|
+
),
|
|
5052
|
+
itemConfig?.label
|
|
5053
|
+
]
|
|
5054
|
+
},
|
|
5055
|
+
item.value
|
|
5056
|
+
);
|
|
5057
|
+
})
|
|
5058
|
+
}
|
|
5059
|
+
);
|
|
5060
|
+
}
|
|
5061
|
+
);
|
|
5062
|
+
ChartLegendContent.displayName = "ChartLegend";
|
|
5063
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
5064
|
+
if (typeof payload !== "object" || payload === null) {
|
|
5065
|
+
return void 0;
|
|
5066
|
+
}
|
|
5067
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
5068
|
+
let configLabelKey = key;
|
|
5069
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
5070
|
+
configLabelKey = payload[key];
|
|
5071
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
5072
|
+
configLabelKey = payloadPayload[key];
|
|
5073
|
+
}
|
|
5074
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
5075
|
+
}
|
|
5076
|
+
var Command = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5077
|
+
Command$1,
|
|
5078
|
+
{
|
|
5079
|
+
ref,
|
|
5080
|
+
className: cn(
|
|
5081
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
5082
|
+
className
|
|
5083
|
+
),
|
|
5084
|
+
...props
|
|
5085
|
+
}
|
|
5086
|
+
));
|
|
5087
|
+
Command.displayName = Command$1.displayName;
|
|
5088
|
+
var CommandDialog = ({ children, ...props }) => {
|
|
5089
|
+
return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
5090
|
+
};
|
|
5091
|
+
var CommandInput = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
5092
|
+
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
5093
|
+
/* @__PURE__ */ jsx(
|
|
5094
|
+
Command$1.Input,
|
|
5095
|
+
{
|
|
5096
|
+
ref,
|
|
5097
|
+
className: cn(
|
|
5098
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
5099
|
+
className
|
|
5100
|
+
),
|
|
5101
|
+
...props
|
|
5102
|
+
}
|
|
5103
|
+
)
|
|
5104
|
+
] }));
|
|
5105
|
+
CommandInput.displayName = Command$1.Input.displayName;
|
|
5106
|
+
var CommandList = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5107
|
+
Command$1.List,
|
|
5108
|
+
{
|
|
5109
|
+
ref,
|
|
5110
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
5111
|
+
...props
|
|
5112
|
+
}
|
|
5113
|
+
));
|
|
5114
|
+
CommandList.displayName = Command$1.List.displayName;
|
|
5115
|
+
var CommandEmpty = React66.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
5116
|
+
Command$1.Empty,
|
|
5117
|
+
{
|
|
5118
|
+
ref,
|
|
5119
|
+
className: "py-6 text-center text-sm",
|
|
5120
|
+
...props
|
|
5121
|
+
}
|
|
5122
|
+
));
|
|
5123
|
+
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
5124
|
+
var CommandGroup = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5125
|
+
Command$1.Group,
|
|
5126
|
+
{
|
|
5127
|
+
ref,
|
|
5128
|
+
className: cn(
|
|
5129
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
5130
|
+
className
|
|
5131
|
+
),
|
|
5132
|
+
...props
|
|
5133
|
+
}
|
|
5134
|
+
));
|
|
5135
|
+
CommandGroup.displayName = Command$1.Group.displayName;
|
|
5136
|
+
var CommandSeparator = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5137
|
+
Command$1.Separator,
|
|
5138
|
+
{
|
|
5139
|
+
ref,
|
|
5140
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
5141
|
+
...props
|
|
5142
|
+
}
|
|
5143
|
+
));
|
|
5144
|
+
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
5145
|
+
var CommandItem2 = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5146
|
+
Command$1.Item,
|
|
5147
|
+
{
|
|
5148
|
+
ref,
|
|
5149
|
+
className: cn(
|
|
5150
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
5151
|
+
className
|
|
5152
|
+
),
|
|
5153
|
+
...props
|
|
5154
|
+
}
|
|
5155
|
+
));
|
|
5156
|
+
CommandItem2.displayName = Command$1.Item.displayName;
|
|
5157
|
+
var Drawer = ({
|
|
5158
|
+
shouldScaleBackground = true,
|
|
5159
|
+
...props
|
|
5160
|
+
}) => /* @__PURE__ */ jsx(
|
|
5161
|
+
Drawer$1.Root,
|
|
5162
|
+
{
|
|
5163
|
+
shouldScaleBackground,
|
|
5164
|
+
...props
|
|
5165
|
+
}
|
|
5166
|
+
);
|
|
5167
|
+
Drawer.displayName = "Drawer";
|
|
5168
|
+
var DrawerTrigger = Drawer$1.Trigger;
|
|
5169
|
+
var DrawerPortal = Drawer$1.Portal;
|
|
5170
|
+
var DrawerClose = Drawer$1.Close;
|
|
5171
|
+
var DrawerOverlay = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5172
|
+
Drawer$1.Overlay,
|
|
5173
|
+
{
|
|
5174
|
+
ref,
|
|
5175
|
+
className: cn("fixed inset-0 z-50 bg-black/80", className),
|
|
5176
|
+
...props
|
|
5177
|
+
}
|
|
5178
|
+
));
|
|
5179
|
+
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
5180
|
+
var DrawerContent = React66.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
5181
|
+
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
5182
|
+
/* @__PURE__ */ jsxs(
|
|
5183
|
+
Drawer$1.Content,
|
|
5184
|
+
{
|
|
5185
|
+
ref,
|
|
5186
|
+
className: cn(
|
|
5187
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
5188
|
+
className
|
|
5189
|
+
),
|
|
5190
|
+
...props,
|
|
5191
|
+
children: [
|
|
5192
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
5193
|
+
children
|
|
5194
|
+
]
|
|
5195
|
+
}
|
|
5196
|
+
)
|
|
5197
|
+
] }));
|
|
5198
|
+
DrawerContent.displayName = "DrawerContent";
|
|
5199
|
+
var DrawerHeader = ({
|
|
5200
|
+
className,
|
|
5201
|
+
...props
|
|
5202
|
+
}) => /* @__PURE__ */ jsx(
|
|
5203
|
+
"div",
|
|
5204
|
+
{
|
|
5205
|
+
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
|
|
5206
|
+
...props
|
|
5207
|
+
}
|
|
5208
|
+
);
|
|
5209
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
5210
|
+
var DrawerFooter = ({
|
|
5211
|
+
className,
|
|
5212
|
+
...props
|
|
5213
|
+
}) => /* @__PURE__ */ jsx(
|
|
5214
|
+
"div",
|
|
5215
|
+
{
|
|
5216
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
5217
|
+
...props
|
|
5218
|
+
}
|
|
5219
|
+
);
|
|
5220
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
5221
|
+
var DrawerTitle = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5222
|
+
Drawer$1.Title,
|
|
5223
|
+
{
|
|
5224
|
+
ref,
|
|
5225
|
+
className: cn(
|
|
5226
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
5227
|
+
className
|
|
5228
|
+
),
|
|
5229
|
+
...props
|
|
5230
|
+
}
|
|
5231
|
+
));
|
|
5232
|
+
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
5233
|
+
var DrawerDescription = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5234
|
+
Drawer$1.Description,
|
|
5235
|
+
{
|
|
5236
|
+
ref,
|
|
5237
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
5238
|
+
...props
|
|
5239
|
+
}
|
|
5240
|
+
));
|
|
5241
|
+
DrawerDescription.displayName = Drawer$1.Description.displayName;
|
|
5242
|
+
var InputOTP = React66.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5243
|
+
OTPInput,
|
|
5244
|
+
{
|
|
5245
|
+
ref,
|
|
5246
|
+
containerClassName: cn(
|
|
5247
|
+
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
5248
|
+
containerClassName
|
|
5249
|
+
),
|
|
5250
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
5251
|
+
...props
|
|
5252
|
+
}
|
|
5253
|
+
));
|
|
5254
|
+
InputOTP.displayName = "InputOTP";
|
|
5255
|
+
var InputOTPGroup = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
5256
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
5257
|
+
var InputOTPSlot = React66.forwardRef(({ index, className, ...props }, ref) => {
|
|
5258
|
+
const inputOTPContext = React66.useContext(OTPInputContext);
|
|
5259
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
5260
|
+
return /* @__PURE__ */ jsxs(
|
|
5261
|
+
"div",
|
|
5262
|
+
{
|
|
5263
|
+
ref,
|
|
5264
|
+
className: cn(
|
|
5265
|
+
"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
5266
|
+
isActive && "z-10 ring-1 ring-ring",
|
|
5267
|
+
className
|
|
5268
|
+
),
|
|
5269
|
+
...props,
|
|
5270
|
+
children: [
|
|
5271
|
+
char,
|
|
5272
|
+
hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
5273
|
+
]
|
|
5274
|
+
}
|
|
5275
|
+
);
|
|
5276
|
+
});
|
|
5277
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
5278
|
+
var InputOTPSeparator = React66.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(Minus, {}) }));
|
|
5279
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
5280
|
+
function MenubarMenu({
|
|
5281
|
+
...props
|
|
5282
|
+
}) {
|
|
5283
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { ...props });
|
|
5284
|
+
}
|
|
5285
|
+
function MenubarGroup({
|
|
5286
|
+
...props
|
|
5287
|
+
}) {
|
|
5288
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { ...props });
|
|
5289
|
+
}
|
|
5290
|
+
function MenubarPortal({
|
|
5291
|
+
...props
|
|
5292
|
+
}) {
|
|
5293
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { ...props });
|
|
5294
|
+
}
|
|
5295
|
+
function MenubarRadioGroup({
|
|
5296
|
+
...props
|
|
5297
|
+
}) {
|
|
5298
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { ...props });
|
|
5299
|
+
}
|
|
5300
|
+
function MenubarSub({
|
|
5301
|
+
...props
|
|
5302
|
+
}) {
|
|
5303
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
5304
|
+
}
|
|
5305
|
+
var Menubar = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5306
|
+
MenubarPrimitive.Root,
|
|
5307
|
+
{
|
|
5308
|
+
ref,
|
|
5309
|
+
className: cn(
|
|
5310
|
+
"flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",
|
|
5311
|
+
className
|
|
5312
|
+
),
|
|
5313
|
+
...props
|
|
5314
|
+
}
|
|
5315
|
+
));
|
|
5316
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
5317
|
+
var MenubarTrigger = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5318
|
+
MenubarPrimitive.Trigger,
|
|
5319
|
+
{
|
|
5320
|
+
ref,
|
|
5321
|
+
className: cn(
|
|
5322
|
+
"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
5323
|
+
className
|
|
5324
|
+
),
|
|
5325
|
+
...props
|
|
5326
|
+
}
|
|
5327
|
+
));
|
|
5328
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
5329
|
+
var MenubarSubTrigger = React66.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5330
|
+
MenubarPrimitive.SubTrigger,
|
|
5331
|
+
{
|
|
5332
|
+
ref,
|
|
5333
|
+
className: cn(
|
|
5334
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
5335
|
+
inset && "pl-8",
|
|
5336
|
+
className
|
|
5337
|
+
),
|
|
5338
|
+
...props,
|
|
5339
|
+
children: [
|
|
5340
|
+
children,
|
|
5341
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
5342
|
+
]
|
|
5343
|
+
}
|
|
5344
|
+
));
|
|
5345
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
5346
|
+
var MenubarSubContent = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5347
|
+
MenubarPrimitive.SubContent,
|
|
5348
|
+
{
|
|
5349
|
+
ref,
|
|
5350
|
+
className: cn(
|
|
5351
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]",
|
|
5352
|
+
className
|
|
5353
|
+
),
|
|
5354
|
+
...props
|
|
5355
|
+
}
|
|
5356
|
+
));
|
|
5357
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
5358
|
+
var MenubarContent = React66.forwardRef(
|
|
5359
|
+
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
5360
|
+
MenubarPrimitive.Content,
|
|
5361
|
+
{
|
|
5362
|
+
ref,
|
|
5363
|
+
align,
|
|
5364
|
+
alignOffset,
|
|
5365
|
+
sideOffset,
|
|
5366
|
+
className: cn(
|
|
5367
|
+
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]",
|
|
5368
|
+
className
|
|
5369
|
+
),
|
|
5370
|
+
...props
|
|
5371
|
+
}
|
|
5372
|
+
) })
|
|
5373
|
+
);
|
|
5374
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
5375
|
+
var MenubarItem = React66.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5376
|
+
MenubarPrimitive.Item,
|
|
5377
|
+
{
|
|
5378
|
+
ref,
|
|
5379
|
+
className: cn(
|
|
5380
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
5381
|
+
inset && "pl-8",
|
|
5382
|
+
className
|
|
5383
|
+
),
|
|
5384
|
+
...props
|
|
5385
|
+
}
|
|
5386
|
+
));
|
|
5387
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
5388
|
+
var MenubarCheckboxItem = React66.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5389
|
+
MenubarPrimitive.CheckboxItem,
|
|
5390
|
+
{
|
|
5391
|
+
ref,
|
|
5392
|
+
className: cn(
|
|
5393
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
5394
|
+
className
|
|
5395
|
+
),
|
|
5396
|
+
checked,
|
|
5397
|
+
...props,
|
|
5398
|
+
children: [
|
|
5399
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
5400
|
+
children
|
|
5401
|
+
]
|
|
5402
|
+
}
|
|
5403
|
+
));
|
|
5404
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
5405
|
+
var MenubarRadioItem = React66.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5406
|
+
MenubarPrimitive.RadioItem,
|
|
5407
|
+
{
|
|
5408
|
+
ref,
|
|
5409
|
+
className: cn(
|
|
5410
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
5411
|
+
className
|
|
5412
|
+
),
|
|
5413
|
+
...props,
|
|
5414
|
+
children: [
|
|
5415
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-4 w-4 fill-current" }) }) }),
|
|
5416
|
+
children
|
|
5417
|
+
]
|
|
5418
|
+
}
|
|
5419
|
+
));
|
|
5420
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
5421
|
+
var MenubarLabel = React66.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5422
|
+
MenubarPrimitive.Label,
|
|
5423
|
+
{
|
|
5424
|
+
ref,
|
|
5425
|
+
className: cn(
|
|
5426
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
5427
|
+
inset && "pl-8",
|
|
5428
|
+
className
|
|
5429
|
+
),
|
|
5430
|
+
...props
|
|
5431
|
+
}
|
|
5432
|
+
));
|
|
5433
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
5434
|
+
var MenubarSeparator = React66.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5435
|
+
MenubarPrimitive.Separator,
|
|
5436
|
+
{
|
|
5437
|
+
ref,
|
|
5438
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
5439
|
+
...props
|
|
5440
|
+
}
|
|
5441
|
+
));
|
|
5442
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
5443
|
+
var MenubarShortcut = ({
|
|
5444
|
+
className,
|
|
5445
|
+
...props
|
|
5446
|
+
}) => {
|
|
5447
|
+
return /* @__PURE__ */ jsx(
|
|
5448
|
+
"span",
|
|
5449
|
+
{
|
|
5450
|
+
className: cn(
|
|
5451
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
5452
|
+
className
|
|
5453
|
+
),
|
|
5454
|
+
...props
|
|
5455
|
+
}
|
|
5456
|
+
);
|
|
5457
|
+
};
|
|
5458
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
|
5459
|
+
var ResizablePanelGroup = ({
|
|
5460
|
+
className,
|
|
5461
|
+
...props
|
|
5462
|
+
}) => /* @__PURE__ */ jsx(
|
|
5463
|
+
ResizablePrimitive.PanelGroup,
|
|
5464
|
+
{
|
|
5465
|
+
className: cn(
|
|
5466
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
5467
|
+
className
|
|
5468
|
+
),
|
|
5469
|
+
...props
|
|
5470
|
+
}
|
|
5471
|
+
);
|
|
5472
|
+
var ResizablePanel = ResizablePrimitive.Panel;
|
|
5473
|
+
var ResizableHandle = ({
|
|
5474
|
+
withHandle,
|
|
5475
|
+
className,
|
|
5476
|
+
...props
|
|
5477
|
+
}) => /* @__PURE__ */ jsx(
|
|
5478
|
+
ResizablePrimitive.PanelResizeHandle,
|
|
5479
|
+
{
|
|
5480
|
+
className: cn(
|
|
5481
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
5482
|
+
className
|
|
5483
|
+
),
|
|
5484
|
+
...props,
|
|
5485
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx(GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
5486
|
+
}
|
|
5487
|
+
);
|
|
5488
|
+
function Spinner({ className, ...props }) {
|
|
5489
|
+
return /* @__PURE__ */ jsx(
|
|
5490
|
+
Loader2Icon,
|
|
5491
|
+
{
|
|
5492
|
+
role: "status",
|
|
5493
|
+
"aria-label": "Loading",
|
|
5494
|
+
className: cn("size-4 animate-spin", className),
|
|
5495
|
+
...props
|
|
5496
|
+
}
|
|
5497
|
+
);
|
|
5498
|
+
}
|
|
4711
5499
|
|
|
4712
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, AppShellMain, AppShellSidebar, AreaChart, ArrayField, AspectRatio, AutoForm, Avatar, AvatarFallback, AvatarImage, Badge, Banner, BarChart, Beacon, BlinkUIProvider, Breadcrumb, BreadcrumbItem, BreadcrumbPage, BreadcrumbSeparator, BulkActions, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChatDetail, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandBar, CommandBarEmpty, CommandBarGroup, CommandBarItem, CommandItem, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataTable, DataTableColumnHeader, DataTablePagination, DataTableToolbar, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateIcon, FeedbackModal, Field, FieldDescription, FieldError, FieldLabel, FileCards, FileUpload, FileUploadPreview, FilesList, FilterBadge, Filters, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HStack, HotkeyBadge, Hotkeys, HoverCard, HoverCardContent, HoverCardTrigger, IconBadge, Input, IntegrationCard, InviteModal, Kanban, KanbanCard, KanbanColumn, Label5 as Label, LineChart, LoadingOverlay, ManageTagsModal, MessagesCard, MetricCard, MetricCardWithButton, MetricCardWithIcon, MobileSidebarTrigger, Navbar, NavbarBrand, NavbarContent, NavbarItem, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotificationSettings, ObjectField, OrgMenu, Page, PageActions, PageBody, PageDescription, PageHeader, PageTitle, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Persona, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, PropertyItem, PropertyList, RadioGroup, RadioGroupItem, ResizeBox, ResizeHandle, RolesMenu, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectUsersModal, SelectValue, Separator4 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarItem, SidebarLayoutDashboard, SidebarLayoutGroups, SidebarLayoutMinimal, SidebarLayoutSearch, SidebarLayoutUser, SidebarSeparator, Skeleton, Slider, SortableTaskList, Sparkline, SplitPage, SplitPageDetail, SplitPageList, Stack, StackedLayoutBranded, StackedLayoutTabs, Stat, StatGroup, StepForm, StepFormNavigation, StepFormStep, Stepper, StructuredList, StructuredListItem, StructuredListSection, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskCard, TaskCardWithLabels, Textarea, Timeline, TimelineConnector, TimelineContent, TimelineItem, Toaster, Toggle, ToggleButton, ToggleButtonGroup, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, TourStep, UserMenu, VStack, WorkspaceMembers, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useAppShell, useBlinkUI, useCommandBar, useFormField, useTour };
|
|
4713
|
-
//# sourceMappingURL=
|
|
5500
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, AppShellMain, AppShellSidebar, AreaChart, ArrayField, AspectRatio, AutoForm, Avatar, AvatarFallback, AvatarImage, Badge, Banner, BarChart, Beacon, BlinkUIProvider, Breadcrumb, BreadcrumbItem, BreadcrumbPage, BreadcrumbSeparator, BulkActions, Button, Calendar3 as Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, ChatDetail, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandBar, CommandBarEmpty, CommandBarGroup, CommandBarItem, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, Command as CommandPrimitive, CommandSeparator, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataTable, DataTableColumnHeader, DataTablePagination, DataTableToolbar, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateIcon, FeedbackModal, Field, FieldDescription, FieldError, FieldLabel, FileCards, FileUpload, FileUploadPreview, FilesList, FilterBadge, Filters, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HStack, HotkeyBadge, Hotkeys, HoverCard, HoverCardContent, HoverCardTrigger, IconBadge, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, IntegrationCard, InviteModal, Kanban, KanbanCard, KanbanColumn, Label5 as Label, LineChart, LoadingOverlay, ManageTagsModal, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessagesCard, MetricCard, MetricCardWithButton, MetricCardWithIcon, MobileSidebarTrigger, Navbar, NavbarBrand, NavbarContent, NavbarItem, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotificationSettings, ObjectField, OrgMenu, Page, PageActions, PageBody, PageDescription, PageHeader, PageTitle, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Persona, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, PropertyItem, PropertyList, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResizeBox, ResizeHandle, RolesMenu, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectUsersModal, SelectValue, Separator4 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarItem, SidebarLayoutDashboard, SidebarLayoutGroups, SidebarLayoutMinimal, SidebarLayoutSearch, SidebarLayoutUser, SidebarSeparator, Skeleton, Slider, SortableTaskList, Sparkline, Spinner, SplitPage, SplitPageDetail, SplitPageList, Stack, StackedLayoutBranded, StackedLayoutTabs, Stat, StatGroup, StepForm, StepFormNavigation, StepFormStep, Stepper, StructuredList, StructuredListItem, StructuredListSection, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskCard, TaskCardWithLabels, Textarea, Timeline, TimelineConnector, TimelineContent, TimelineItem, Toaster, Toggle, ToggleButton, ToggleButtonGroup, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, TourStep, UserMenu, VStack, WorkspaceMembers, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useAppShell, useBlinkUI, useCommandBar, useFormField, useTour };
|
|
5501
|
+
//# sourceMappingURL=index.mjs.map
|
|
4714
5502
|
//# sourceMappingURL=index.mjs.map
|