@moontra/moonui 2.3.10 → 2.4.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/dist/index.d.mts +73 -39
- package/dist/index.d.ts +73 -39
- package/dist/index.global.js +540 -38
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1211 -574
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1210 -574
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/index.ts +77 -0
- package/src/components/ui/input.tsx +92 -19
- package/src/components/ui/moon-logo.tsx +13 -16
- package/src/components/ui/pagination.tsx +1 -1
- package/src/components/ui/textarea.tsx +194 -20
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as t from 'react';
|
|
4
4
|
import t__default, { useState, useCallback, useEffect } from 'react';
|
|
5
5
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
6
|
-
import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, CreditCard, Minus, Search, ChevronRight, Circle, Upload, ChevronUp, Phone, Bold, Italic, Underline, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code, Link, Image, Palette, Undo, Redo, Edit, Eye,
|
|
6
|
+
import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, CreditCard, Minus, Search, ChevronRight, Circle, Upload, ChevronUp, Phone, Bold, Italic, Underline, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code, Link, Image, Palette, Undo, Redo, Edit, Eye, ChevronLeft, Copy, ArrowDown, ArrowUp, ArrowUpDown, Calendar as Calendar$1, Clock, CheckCircle, Star, GitFork, ExternalLink, Crown, Lock, Zap, Video, Music, FileText, File } from 'lucide-react';
|
|
7
7
|
export { Palette, Pipette } from 'lucide-react';
|
|
8
8
|
import { clsx } from 'clsx';
|
|
9
9
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -11,6 +11,8 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
11
11
|
import { cva } from 'class-variance-authority';
|
|
12
12
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
13
13
|
import { motion, AnimatePresence, useMotionValue, useTransform, useAnimation, useInView, animate } from 'framer-motion';
|
|
14
|
+
import { format, isSameMonth, isToday, isValid, subMonths, addMonths, isSameDay, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek } from 'date-fns';
|
|
15
|
+
export { format } from 'date-fns';
|
|
14
16
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
15
17
|
import 'react-dom';
|
|
16
18
|
import { createSlot } from '@radix-ui/react-slot';
|
|
@@ -18,8 +20,6 @@ import * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
18
20
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
19
21
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
20
22
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
21
|
-
import { isValid, format, isSameMonth, isToday, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek, subMonths, addMonths, isSameDay } from 'date-fns';
|
|
22
|
-
export { format } from 'date-fns';
|
|
23
23
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
24
24
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
25
25
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
@@ -934,7 +934,26 @@ var springAnimations = {
|
|
|
934
934
|
type: "spring",
|
|
935
935
|
stiffness: 260,
|
|
936
936
|
damping: 20
|
|
937
|
-
}
|
|
937
|
+
},
|
|
938
|
+
// Bouncy spring for playful interactions
|
|
939
|
+
bouncy: {
|
|
940
|
+
type: "spring",
|
|
941
|
+
stiffness: 300,
|
|
942
|
+
damping: 15
|
|
943
|
+
},
|
|
944
|
+
// Stiff spring for quick responses
|
|
945
|
+
stiff: {
|
|
946
|
+
type: "spring",
|
|
947
|
+
stiffness: 400,
|
|
948
|
+
damping: 25
|
|
949
|
+
},
|
|
950
|
+
// Gentle spring for subtle movements
|
|
951
|
+
gentle: {
|
|
952
|
+
type: "spring",
|
|
953
|
+
stiffness: 150,
|
|
954
|
+
damping: 15
|
|
955
|
+
}
|
|
956
|
+
};
|
|
938
957
|
var hoverAnimations = {
|
|
939
958
|
lift: {
|
|
940
959
|
y: -2,
|
|
@@ -947,12 +966,22 @@ var hoverAnimations = {
|
|
|
947
966
|
glow: {
|
|
948
967
|
boxShadow: "0 0 20px rgba(var(--primary), 0.3)",
|
|
949
968
|
transition: springAnimations.smooth
|
|
950
|
-
}
|
|
969
|
+
},
|
|
970
|
+
rotate: {
|
|
971
|
+
rotate: 2,
|
|
972
|
+
transition: springAnimations.bouncy
|
|
973
|
+
}
|
|
974
|
+
};
|
|
951
975
|
var tapAnimations = {
|
|
952
976
|
scale: {
|
|
953
977
|
scale: 0.95,
|
|
954
978
|
transition: { duration: 0.1 }
|
|
955
|
-
}
|
|
979
|
+
},
|
|
980
|
+
depress: {
|
|
981
|
+
y: 1,
|
|
982
|
+
transition: { duration: 0.1 }
|
|
983
|
+
}
|
|
984
|
+
};
|
|
956
985
|
var skeletonAnimation = {
|
|
957
986
|
initial: { opacity: 0.5 },
|
|
958
987
|
animate: {
|
|
@@ -1067,6 +1096,202 @@ var CardFooter = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1067
1096
|
}
|
|
1068
1097
|
));
|
|
1069
1098
|
CardFooter.displayName = "CardFooter";
|
|
1099
|
+
function Calendar({
|
|
1100
|
+
mode = "single",
|
|
1101
|
+
selected,
|
|
1102
|
+
onSelect,
|
|
1103
|
+
disabled,
|
|
1104
|
+
showOutsideDays = false,
|
|
1105
|
+
className,
|
|
1106
|
+
classNames,
|
|
1107
|
+
numberOfMonths = 1,
|
|
1108
|
+
defaultMonth,
|
|
1109
|
+
...props
|
|
1110
|
+
}) {
|
|
1111
|
+
const [currentMonth, setCurrentMonth] = t.useState(
|
|
1112
|
+
defaultMonth || selected && selected || /* @__PURE__ */ new Date()
|
|
1113
|
+
);
|
|
1114
|
+
const weekDays = [
|
|
1115
|
+
{ short: "S", full: "Sunday" },
|
|
1116
|
+
{ short: "M", full: "Monday" },
|
|
1117
|
+
{ short: "T", full: "Tuesday" },
|
|
1118
|
+
{ short: "W", full: "Wednesday" },
|
|
1119
|
+
{ short: "T", full: "Thursday" },
|
|
1120
|
+
{ short: "F", full: "Friday" },
|
|
1121
|
+
{ short: "S", full: "Saturday" }
|
|
1122
|
+
];
|
|
1123
|
+
const handlePreviousMonth = () => {
|
|
1124
|
+
setCurrentMonth(subMonths(currentMonth, 1));
|
|
1125
|
+
};
|
|
1126
|
+
const handleNextMonth = () => {
|
|
1127
|
+
setCurrentMonth(addMonths(currentMonth, 1));
|
|
1128
|
+
};
|
|
1129
|
+
const handleDateClick = (date) => {
|
|
1130
|
+
if (disabled?.(date))
|
|
1131
|
+
return;
|
|
1132
|
+
if (mode === "single") {
|
|
1133
|
+
onSelect?.(date);
|
|
1134
|
+
} else if (mode === "range") {
|
|
1135
|
+
const currentSelection = selected;
|
|
1136
|
+
if (!currentSelection?.from || currentSelection.from && currentSelection.to) {
|
|
1137
|
+
onSelect?.({ from: date, to: void 0 });
|
|
1138
|
+
} else {
|
|
1139
|
+
if (date < currentSelection.from) {
|
|
1140
|
+
onSelect?.({ from: date, to: currentSelection.from });
|
|
1141
|
+
} else {
|
|
1142
|
+
onSelect?.({ from: currentSelection.from, to: date });
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
const isDateSelected = (date) => {
|
|
1148
|
+
if (!selected)
|
|
1149
|
+
return false;
|
|
1150
|
+
if (mode === "single") {
|
|
1151
|
+
return isSameDay(date, selected);
|
|
1152
|
+
} else if (mode === "range") {
|
|
1153
|
+
const range = selected;
|
|
1154
|
+
if (range.from && range.to) {
|
|
1155
|
+
return date >= range.from && date <= range.to;
|
|
1156
|
+
}
|
|
1157
|
+
return range.from ? isSameDay(date, range.from) : false;
|
|
1158
|
+
}
|
|
1159
|
+
return false;
|
|
1160
|
+
};
|
|
1161
|
+
const isRangeStart = (date) => {
|
|
1162
|
+
if (mode !== "range" || !selected)
|
|
1163
|
+
return false;
|
|
1164
|
+
const range = selected;
|
|
1165
|
+
return range.from ? isSameDay(date, range.from) : false;
|
|
1166
|
+
};
|
|
1167
|
+
const isRangeEnd = (date) => {
|
|
1168
|
+
if (mode !== "range" || !selected)
|
|
1169
|
+
return false;
|
|
1170
|
+
const range = selected;
|
|
1171
|
+
return range.to ? isSameDay(date, range.to) : false;
|
|
1172
|
+
};
|
|
1173
|
+
const isRangeMiddle = (date) => {
|
|
1174
|
+
if (mode !== "range" || !selected)
|
|
1175
|
+
return false;
|
|
1176
|
+
const range = selected;
|
|
1177
|
+
if (!range.from || !range.to)
|
|
1178
|
+
return false;
|
|
1179
|
+
return date > range.from && date < range.to;
|
|
1180
|
+
};
|
|
1181
|
+
const getDaysInMonth = () => {
|
|
1182
|
+
const start = startOfMonth(currentMonth);
|
|
1183
|
+
const end = endOfMonth(currentMonth);
|
|
1184
|
+
const days2 = eachDayOfInterval({ start, end });
|
|
1185
|
+
const firstDayOfWeek = getDay(start);
|
|
1186
|
+
const previousMonthDays = [];
|
|
1187
|
+
if (firstDayOfWeek > 0 && showOutsideDays) {
|
|
1188
|
+
const previousMonthStart = startOfWeek(start);
|
|
1189
|
+
const previousMonthEnd = new Date(start);
|
|
1190
|
+
previousMonthEnd.setDate(previousMonthEnd.getDate() - 1);
|
|
1191
|
+
previousMonthDays.push(...eachDayOfInterval({
|
|
1192
|
+
start: previousMonthStart,
|
|
1193
|
+
end: previousMonthEnd
|
|
1194
|
+
}));
|
|
1195
|
+
}
|
|
1196
|
+
const lastDayOfWeek = getDay(end);
|
|
1197
|
+
const nextMonthDays = [];
|
|
1198
|
+
if (lastDayOfWeek < 6 && showOutsideDays) {
|
|
1199
|
+
const nextMonthStart = new Date(end);
|
|
1200
|
+
nextMonthStart.setDate(nextMonthStart.getDate() + 1);
|
|
1201
|
+
const nextMonthEnd = endOfWeek(end);
|
|
1202
|
+
nextMonthDays.push(...eachDayOfInterval({
|
|
1203
|
+
start: nextMonthStart,
|
|
1204
|
+
end: nextMonthEnd
|
|
1205
|
+
}));
|
|
1206
|
+
}
|
|
1207
|
+
const emptyCells = [];
|
|
1208
|
+
if (!showOutsideDays && firstDayOfWeek > 0) {
|
|
1209
|
+
for (let i = 0; i < firstDayOfWeek; i++) {
|
|
1210
|
+
emptyCells.push(null);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
return [...previousMonthDays, ...emptyCells, ...days2, ...nextMonthDays];
|
|
1214
|
+
};
|
|
1215
|
+
const days = getDaysInMonth();
|
|
1216
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", "p-0", className), children: [
|
|
1217
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50", children: [
|
|
1218
|
+
/* @__PURE__ */ jsx(
|
|
1219
|
+
"button",
|
|
1220
|
+
{
|
|
1221
|
+
onClick: handlePreviousMonth,
|
|
1222
|
+
className: cn(
|
|
1223
|
+
"h-10 w-10 bg-transparent p-0 rounded-lg",
|
|
1224
|
+
"hover:bg-muted transition-colors",
|
|
1225
|
+
"inline-flex items-center justify-center"
|
|
1226
|
+
),
|
|
1227
|
+
type: "button",
|
|
1228
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-5 w-5" })
|
|
1229
|
+
}
|
|
1230
|
+
),
|
|
1231
|
+
/* @__PURE__ */ jsx("h2", { className: "text-base font-medium", children: format(currentMonth, "MMMM yyyy") }),
|
|
1232
|
+
/* @__PURE__ */ jsx(
|
|
1233
|
+
"button",
|
|
1234
|
+
{
|
|
1235
|
+
onClick: handleNextMonth,
|
|
1236
|
+
className: cn(
|
|
1237
|
+
"h-10 w-10 bg-transparent p-0 rounded-lg",
|
|
1238
|
+
"hover:bg-muted transition-colors",
|
|
1239
|
+
"inline-flex items-center justify-center"
|
|
1240
|
+
),
|
|
1241
|
+
type: "button",
|
|
1242
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-5 w-5" })
|
|
1243
|
+
}
|
|
1244
|
+
)
|
|
1245
|
+
] }),
|
|
1246
|
+
/* @__PURE__ */ jsxs("div", { className: "px-6 pb-4", children: [
|
|
1247
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 mb-2", children: weekDays.map((day, index) => /* @__PURE__ */ jsx(
|
|
1248
|
+
"div",
|
|
1249
|
+
{
|
|
1250
|
+
className: "text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",
|
|
1251
|
+
title: day.full,
|
|
1252
|
+
children: day.short
|
|
1253
|
+
},
|
|
1254
|
+
`weekday-${index}`
|
|
1255
|
+
)) }),
|
|
1256
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-1", children: days.map((date, index) => {
|
|
1257
|
+
if (!date) {
|
|
1258
|
+
return /* @__PURE__ */ jsx("div", { className: "h-10 w-10" }, `empty-${index}`);
|
|
1259
|
+
}
|
|
1260
|
+
const isOutsideMonth = !isSameMonth(date, currentMonth);
|
|
1261
|
+
const isDisabled = disabled?.(date) || false;
|
|
1262
|
+
const isSelected = isDateSelected(date);
|
|
1263
|
+
const isTodayDate = isToday(date);
|
|
1264
|
+
const rangeStart = isRangeStart(date);
|
|
1265
|
+
const rangeEnd = isRangeEnd(date);
|
|
1266
|
+
const rangeMiddle = isRangeMiddle(date);
|
|
1267
|
+
return /* @__PURE__ */ jsx(
|
|
1268
|
+
"button",
|
|
1269
|
+
{
|
|
1270
|
+
onClick: () => handleDateClick(date),
|
|
1271
|
+
disabled: isDisabled,
|
|
1272
|
+
className: cn(
|
|
1273
|
+
"h-10 w-10 p-0 font-normal",
|
|
1274
|
+
"inline-flex items-center justify-center rounded-lg",
|
|
1275
|
+
"hover:bg-muted transition-colors text-sm",
|
|
1276
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1277
|
+
isOutsideMonth && "text-muted-foreground/50",
|
|
1278
|
+
isDisabled && "text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",
|
|
1279
|
+
isSelected && !rangeMiddle && "bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",
|
|
1280
|
+
isTodayDate && "font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",
|
|
1281
|
+
rangeMiddle && "bg-accent/30 text-accent-foreground rounded-none",
|
|
1282
|
+
rangeStart && "rounded-r-none",
|
|
1283
|
+
rangeEnd && "rounded-l-none"
|
|
1284
|
+
),
|
|
1285
|
+
type: "button",
|
|
1286
|
+
children: format(date, "d")
|
|
1287
|
+
},
|
|
1288
|
+
date.toISOString()
|
|
1289
|
+
);
|
|
1290
|
+
}) })
|
|
1291
|
+
] })
|
|
1292
|
+
] });
|
|
1293
|
+
}
|
|
1294
|
+
Calendar.displayName = "Calendar";
|
|
1070
1295
|
var getCardType = (number) => {
|
|
1071
1296
|
const patterns = {
|
|
1072
1297
|
visa: /^4/,
|
|
@@ -1077,7 +1302,8 @@ var getCardType = (number) => {
|
|
|
1077
1302
|
jcb: /^35/
|
|
1078
1303
|
};
|
|
1079
1304
|
for (const [type, pattern] of Object.entries(patterns)) {
|
|
1080
|
-
if (pattern.test(number))
|
|
1305
|
+
if (pattern.test(number))
|
|
1306
|
+
return type;
|
|
1081
1307
|
}
|
|
1082
1308
|
return "unknown";
|
|
1083
1309
|
};
|
|
@@ -1087,8 +1313,10 @@ var formatCardNumber = (value, cardType) => {
|
|
|
1087
1313
|
let formatted = "";
|
|
1088
1314
|
let position = 0;
|
|
1089
1315
|
for (const group of groups) {
|
|
1090
|
-
if (position >= cleaned.length)
|
|
1091
|
-
|
|
1316
|
+
if (position >= cleaned.length)
|
|
1317
|
+
break;
|
|
1318
|
+
if (formatted)
|
|
1319
|
+
formatted += " ";
|
|
1092
1320
|
formatted += cleaned.slice(position, position + group);
|
|
1093
1321
|
position += group;
|
|
1094
1322
|
}
|
|
@@ -1414,8 +1642,10 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
1414
1642
|
function useContext22(consumerName, scope) {
|
|
1415
1643
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
1416
1644
|
const context = t.useContext(Context);
|
|
1417
|
-
if (context)
|
|
1418
|
-
|
|
1645
|
+
if (context)
|
|
1646
|
+
return context;
|
|
1647
|
+
if (defaultContext !== void 0)
|
|
1648
|
+
return defaultContext;
|
|
1419
1649
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
1420
1650
|
}
|
|
1421
1651
|
return [Provider3, useContext22];
|
|
@@ -1437,7 +1667,8 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
1437
1667
|
}
|
|
1438
1668
|
function composeContextScopes(...scopes) {
|
|
1439
1669
|
const baseScope = scopes[0];
|
|
1440
|
-
if (scopes.length === 1)
|
|
1670
|
+
if (scopes.length === 1)
|
|
1671
|
+
return baseScope;
|
|
1441
1672
|
const createScope = () => {
|
|
1442
1673
|
const scopeHooks = scopes.map((createScope2) => ({
|
|
1443
1674
|
useScope: createScope2(),
|
|
@@ -1714,12 +1945,13 @@ var count = 0;
|
|
|
1714
1945
|
function useId2(deterministicId) {
|
|
1715
1946
|
const [id, setId] = t.useState(useReactId());
|
|
1716
1947
|
useLayoutEffect2(() => {
|
|
1717
|
-
|
|
1948
|
+
if (!deterministicId)
|
|
1949
|
+
setId((reactId) => reactId ?? String(count++));
|
|
1718
1950
|
}, [deterministicId]);
|
|
1719
1951
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
1720
1952
|
}
|
|
1721
1953
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
1722
|
-
var [createCollapsibleContext] = createContextScope(COLLAPSIBLE_NAME);
|
|
1954
|
+
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
1723
1955
|
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
1724
1956
|
var Collapsible = t.forwardRef(
|
|
1725
1957
|
(props, forwardedRef) => {
|
|
@@ -1958,10 +2190,10 @@ var inputVariants = cva(
|
|
|
1958
2190
|
{
|
|
1959
2191
|
variants: {
|
|
1960
2192
|
variant: {
|
|
1961
|
-
standard: "border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-
|
|
1962
|
-
filled: "border border-transparent bg-gray-100 dark:bg-gray-800
|
|
2193
|
+
standard: "border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-800/80 dark:shadow-inner dark:shadow-gray-950/10",
|
|
2194
|
+
filled: "border border-transparent bg-gray-100 dark:bg-gray-800 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",
|
|
1963
2195
|
ghost: "border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
|
|
1964
|
-
underline: "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300"
|
|
2196
|
+
underline: "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300 dark:bg-transparent"
|
|
1965
2197
|
},
|
|
1966
2198
|
size: {
|
|
1967
2199
|
sm: "h-8 text-xs",
|
|
@@ -2021,12 +2253,59 @@ var Input = t.forwardRef(
|
|
|
2021
2253
|
rightIcon,
|
|
2022
2254
|
rightButton,
|
|
2023
2255
|
alwaysShowMessage = false,
|
|
2256
|
+
label,
|
|
2257
|
+
floatingLabel = false,
|
|
2258
|
+
floatingLabelClassName,
|
|
2259
|
+
value,
|
|
2260
|
+
defaultValue,
|
|
2261
|
+
onChange,
|
|
2262
|
+
onFocus,
|
|
2263
|
+
onBlur,
|
|
2264
|
+
placeholder,
|
|
2024
2265
|
...props
|
|
2025
2266
|
}, ref) => {
|
|
2267
|
+
const [isFocused, setIsFocused] = t.useState(false);
|
|
2268
|
+
const [internalValue, setInternalValue] = t.useState(value || defaultValue || "");
|
|
2269
|
+
const hasValue = internalValue !== "" && internalValue !== null && internalValue !== void 0;
|
|
2270
|
+
const isLabelActive = isFocused || hasValue;
|
|
2271
|
+
const handleFocus = (e) => {
|
|
2272
|
+
setIsFocused(true);
|
|
2273
|
+
onFocus?.(e);
|
|
2274
|
+
};
|
|
2275
|
+
const handleBlur = (e) => {
|
|
2276
|
+
setIsFocused(false);
|
|
2277
|
+
onBlur?.(e);
|
|
2278
|
+
};
|
|
2279
|
+
const handleChange = (e) => {
|
|
2280
|
+
setInternalValue(e.target.value);
|
|
2281
|
+
onChange?.(e);
|
|
2282
|
+
};
|
|
2283
|
+
t.useEffect(() => {
|
|
2284
|
+
if (value !== void 0) {
|
|
2285
|
+
setInternalValue(value);
|
|
2286
|
+
}
|
|
2287
|
+
}, [value]);
|
|
2026
2288
|
const showMessage = alwaysShowMessage || error || success;
|
|
2027
2289
|
const messageType = error ? "error" : success ? "success" : "normal";
|
|
2028
2290
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-1.5 w-full", children: [
|
|
2029
2291
|
/* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", inputWrapperVariants({ size }), wrapperClassName), children: [
|
|
2292
|
+
floatingLabel && label && /* @__PURE__ */ jsx(
|
|
2293
|
+
"label",
|
|
2294
|
+
{
|
|
2295
|
+
htmlFor: props.id,
|
|
2296
|
+
className: cn(
|
|
2297
|
+
"absolute transition-all duration-200 pointer-events-none",
|
|
2298
|
+
leftIcon || loading ? "left-10" : "left-3",
|
|
2299
|
+
"text-gray-500 dark:text-gray-400",
|
|
2300
|
+
isLabelActive ? "top-0 -translate-y-1/2 text-xs bg-background dark:bg-gray-800 px-1" : "top-1/2 -translate-y-1/2 text-sm",
|
|
2301
|
+
isFocused && "text-primary dark:text-primary",
|
|
2302
|
+
!!error && "text-error",
|
|
2303
|
+
disabled && "opacity-50",
|
|
2304
|
+
floatingLabelClassName
|
|
2305
|
+
),
|
|
2306
|
+
children: label
|
|
2307
|
+
}
|
|
2308
|
+
),
|
|
2030
2309
|
leftIcon && /* @__PURE__ */ jsx("div", { className: "absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none", children: loading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : leftIcon }),
|
|
2031
2310
|
/* @__PURE__ */ jsx(
|
|
2032
2311
|
"input",
|
|
@@ -2051,6 +2330,12 @@ var Input = t.forwardRef(
|
|
|
2051
2330
|
"data-success": !!success ? "" : void 0,
|
|
2052
2331
|
"aria-invalid": !!error || !!isError || void 0,
|
|
2053
2332
|
"aria-describedby": error ? `${props.id || ""}-error` : success ? `${props.id || ""}-success` : void 0,
|
|
2333
|
+
value,
|
|
2334
|
+
defaultValue,
|
|
2335
|
+
onChange: handleChange,
|
|
2336
|
+
onFocus: handleFocus,
|
|
2337
|
+
onBlur: handleBlur,
|
|
2338
|
+
placeholder: floatingLabel ? isLabelActive ? placeholder : "" : placeholder,
|
|
2054
2339
|
...props
|
|
2055
2340
|
}
|
|
2056
2341
|
),
|
|
@@ -2463,9 +2748,11 @@ var Slider = t.forwardRef(({
|
|
|
2463
2748
|
}
|
|
2464
2749
|
};
|
|
2465
2750
|
const handleTrackClick = (event) => {
|
|
2466
|
-
if (disabled)
|
|
2751
|
+
if (disabled)
|
|
2752
|
+
return;
|
|
2467
2753
|
const track = trackRef.current;
|
|
2468
|
-
if (!track)
|
|
2754
|
+
if (!track)
|
|
2755
|
+
return;
|
|
2469
2756
|
const rect = track.getBoundingClientRect();
|
|
2470
2757
|
const percent = (event.clientX - rect.left) / rect.width;
|
|
2471
2758
|
const rawValue = min2 + percent * (max2 - min2);
|
|
@@ -2476,11 +2763,13 @@ var Slider = t.forwardRef(({
|
|
|
2476
2763
|
handleValueChange(newValues);
|
|
2477
2764
|
};
|
|
2478
2765
|
const handleThumbMouseDown = (index) => (event) => {
|
|
2479
|
-
if (disabled)
|
|
2766
|
+
if (disabled)
|
|
2767
|
+
return;
|
|
2480
2768
|
event.preventDefault();
|
|
2481
2769
|
const handleMouseMove = (moveEvent) => {
|
|
2482
2770
|
const track = trackRef.current;
|
|
2483
|
-
if (!track)
|
|
2771
|
+
if (!track)
|
|
2772
|
+
return;
|
|
2484
2773
|
const rect = track.getBoundingClientRect();
|
|
2485
2774
|
const percent = (moveEvent.clientX - rect.left) / rect.width;
|
|
2486
2775
|
const rawValue = min2 + percent * (max2 - min2);
|
|
@@ -2597,7 +2886,8 @@ function rgbToHex(r, g, b) {
|
|
|
2597
2886
|
}
|
|
2598
2887
|
function hexToHsl(hex) {
|
|
2599
2888
|
const rgb = hexToRgb(hex);
|
|
2600
|
-
if (!rgb)
|
|
2889
|
+
if (!rgb)
|
|
2890
|
+
return null;
|
|
2601
2891
|
const r = rgb.r / 255;
|
|
2602
2892
|
const g = rgb.g / 255;
|
|
2603
2893
|
const b = rgb.b / 255;
|
|
@@ -2636,11 +2926,16 @@ function hslToHex(h, s, l) {
|
|
|
2636
2926
|
r = g = b = l;
|
|
2637
2927
|
} else {
|
|
2638
2928
|
const hue2rgb = (p3, q2, t2) => {
|
|
2639
|
-
if (t2 < 0)
|
|
2640
|
-
|
|
2641
|
-
if (t2
|
|
2642
|
-
|
|
2643
|
-
if (t2 <
|
|
2929
|
+
if (t2 < 0)
|
|
2930
|
+
t2 += 1;
|
|
2931
|
+
if (t2 > 1)
|
|
2932
|
+
t2 -= 1;
|
|
2933
|
+
if (t2 < 1 / 6)
|
|
2934
|
+
return p3 + (q2 - p3) * 6 * t2;
|
|
2935
|
+
if (t2 < 1 / 2)
|
|
2936
|
+
return q2;
|
|
2937
|
+
if (t2 < 2 / 3)
|
|
2938
|
+
return p3 + (q2 - p3) * (2 / 3 - t2) * 6;
|
|
2644
2939
|
return p3;
|
|
2645
2940
|
};
|
|
2646
2941
|
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
@@ -2757,8 +3052,10 @@ function ColorPicker({
|
|
|
2757
3052
|
}
|
|
2758
3053
|
};
|
|
2759
3054
|
const formatDisplay = () => {
|
|
2760
|
-
if (format4 === "rgb")
|
|
2761
|
-
|
|
3055
|
+
if (format4 === "rgb")
|
|
3056
|
+
return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
|
|
3057
|
+
if (format4 === "hsl")
|
|
3058
|
+
return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
|
|
2762
3059
|
return color;
|
|
2763
3060
|
};
|
|
2764
3061
|
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
@@ -3175,10 +3472,13 @@ var B = /[\\\/_+.#"@\[\(\{&]/g;
|
|
|
3175
3472
|
var K = /[\s-]/;
|
|
3176
3473
|
var X2 = /[\s-]/g;
|
|
3177
3474
|
function G(_, C, h, P2, A, f, O) {
|
|
3178
|
-
if (f === C.length)
|
|
3475
|
+
if (f === C.length)
|
|
3476
|
+
return A === _.length ? U : k;
|
|
3179
3477
|
var T2 = `${A},${f}`;
|
|
3180
|
-
if (O[T2] !== void 0)
|
|
3181
|
-
|
|
3478
|
+
if (O[T2] !== void 0)
|
|
3479
|
+
return O[T2];
|
|
3480
|
+
for (var L2 = P2.charAt(f), c = h.indexOf(L2, A), S = 0, E, N2, R, M; c >= 0; )
|
|
3481
|
+
E = G(_, C, h, P2, c + 1, f + 1, O), E > S && (c === A ? E *= U : m.test(_.charAt(c - 1)) ? (E *= H, R = _.slice(A, c - 1).match(B), R && A > 0 && (E *= Math.pow(u, R.length))) : K.test(_.charAt(c - 1)) ? (E *= Y, M = _.slice(A, c - 1).match(X2), M && A > 0 && (E *= Math.pow(u, M.length))) : (E *= J, A > 0 && (E *= Math.pow(u, c - A))), _.charAt(c) !== C.charAt(f) && (E *= $)), (E < p && h.charAt(c - 1) === P2.charAt(f + 1) || P2.charAt(f + 1) === P2.charAt(f) && h.charAt(c - 1) !== P2.charAt(f)) && (N2 = G(_, C, h, P2, c + 1, f + 2, O), N2 * p > E && (E = N2 * p)), E > S && (S = E), c = h.indexOf(L2, c + 1);
|
|
3182
3482
|
return O[T2] = S, S;
|
|
3183
3483
|
}
|
|
3184
3484
|
function D(_) {
|
|
@@ -3187,40 +3487,123 @@ function D(_) {
|
|
|
3187
3487
|
function W(_, C, h) {
|
|
3188
3488
|
return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
|
|
3189
3489
|
}
|
|
3190
|
-
var
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
}
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3490
|
+
var NODES2 = [
|
|
3491
|
+
"a",
|
|
3492
|
+
"button",
|
|
3493
|
+
"div",
|
|
3494
|
+
"form",
|
|
3495
|
+
"h2",
|
|
3496
|
+
"h3",
|
|
3497
|
+
"img",
|
|
3498
|
+
"input",
|
|
3499
|
+
"label",
|
|
3500
|
+
"li",
|
|
3501
|
+
"nav",
|
|
3502
|
+
"ol",
|
|
3503
|
+
"p",
|
|
3504
|
+
"select",
|
|
3505
|
+
"span",
|
|
3506
|
+
"svg",
|
|
3507
|
+
"ul"
|
|
3508
|
+
];
|
|
3509
|
+
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
3510
|
+
const Slot = createSlot(`Primitive.${node}`);
|
|
3511
|
+
const Node = t.forwardRef((props, forwardedRef) => {
|
|
3512
|
+
const { asChild, ...primitiveProps } = props;
|
|
3513
|
+
const Comp = asChild ? Slot : node;
|
|
3514
|
+
if (typeof window !== "undefined") {
|
|
3515
|
+
window[Symbol.for("radix-ui")] = true;
|
|
3516
|
+
}
|
|
3517
|
+
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
3518
|
+
});
|
|
3519
|
+
Node.displayName = `Primitive.${node}`;
|
|
3520
|
+
return { ...primitive, [node]: Node };
|
|
3521
|
+
}, {});
|
|
3522
|
+
var useLayoutEffect22 = globalThis?.document ? t.useLayoutEffect : () => {
|
|
3523
|
+
};
|
|
3524
|
+
|
|
3525
|
+
// ../../node_modules/@radix-ui/react-id/dist/index.mjs
|
|
3526
|
+
var useReactId2 = t[" useId ".trim().toString()] || (() => void 0);
|
|
3527
|
+
var count2 = 0;
|
|
3528
|
+
function useId3(deterministicId) {
|
|
3529
|
+
const [id, setId] = t.useState(useReactId2());
|
|
3530
|
+
useLayoutEffect22(() => {
|
|
3531
|
+
if (!deterministicId)
|
|
3532
|
+
setId((reactId) => reactId ?? String(count2++));
|
|
3533
|
+
}, [deterministicId]);
|
|
3534
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
3535
|
+
}
|
|
3536
|
+
function setRef2(ref, value) {
|
|
3537
|
+
if (typeof ref === "function") {
|
|
3538
|
+
return ref(value);
|
|
3539
|
+
} else if (ref !== null && ref !== void 0) {
|
|
3540
|
+
ref.current = value;
|
|
3541
|
+
}
|
|
3542
|
+
}
|
|
3543
|
+
function composeRefs2(...refs) {
|
|
3544
|
+
return (node) => {
|
|
3545
|
+
let hasCleanup = false;
|
|
3546
|
+
const cleanups = refs.map((ref) => {
|
|
3547
|
+
const cleanup = setRef2(ref, node);
|
|
3548
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
3549
|
+
hasCleanup = true;
|
|
3550
|
+
}
|
|
3551
|
+
return cleanup;
|
|
3552
|
+
});
|
|
3553
|
+
if (hasCleanup) {
|
|
3554
|
+
return () => {
|
|
3555
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
3556
|
+
const cleanup = cleanups[i];
|
|
3557
|
+
if (typeof cleanup == "function") {
|
|
3558
|
+
cleanup();
|
|
3559
|
+
} else {
|
|
3560
|
+
setRef2(refs[i], null);
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
};
|
|
3564
|
+
}
|
|
3565
|
+
};
|
|
3566
|
+
}
|
|
3567
|
+
function useComposedRefs2(...refs) {
|
|
3568
|
+
return t.useCallback(composeRefs2(...refs), refs);
|
|
3569
|
+
}
|
|
3570
|
+
|
|
3571
|
+
// ../../node_modules/cmdk/dist/index.mjs
|
|
3572
|
+
var N = '[cmdk-group=""]';
|
|
3573
|
+
var Y2 = '[cmdk-group-items=""]';
|
|
3574
|
+
var be = '[cmdk-group-heading=""]';
|
|
3575
|
+
var le = '[cmdk-item=""]';
|
|
3576
|
+
var ce = `${le}:not([aria-disabled="true"])`;
|
|
3577
|
+
var Z = "cmdk-item-select";
|
|
3578
|
+
var T = "data-value";
|
|
3579
|
+
var Re = (r, o, n) => W(r, o, n);
|
|
3580
|
+
var ue = t.createContext(void 0);
|
|
3581
|
+
var K2 = () => t.useContext(ue);
|
|
3582
|
+
var de = t.createContext(void 0);
|
|
3583
|
+
var ee = () => t.useContext(de);
|
|
3584
|
+
var fe = t.createContext(void 0);
|
|
3585
|
+
var me = t.forwardRef((r, o) => {
|
|
3586
|
+
let n = L(() => {
|
|
3587
|
+
var e, a;
|
|
3588
|
+
return { search: "", value: (a = (e = r.value) != null ? e : r.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
3589
|
+
}), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r, $2 = useId3(), q = useId3(), _ = useId3(), I = t.useRef(null), v = ke();
|
|
3590
|
+
k2(() => {
|
|
3591
|
+
if (R !== void 0) {
|
|
3592
|
+
let e = R.trim();
|
|
3593
|
+
n.current.value = e, E.emit();
|
|
3594
|
+
}
|
|
3595
|
+
}, [R]), k2(() => {
|
|
3596
|
+
v(6, ne);
|
|
3597
|
+
}, []);
|
|
3598
|
+
let E = t.useMemo(() => ({ subscribe: (e) => (f.current.add(e), () => f.current.delete(e)), snapshot: () => n.current, setState: (e, a, s) => {
|
|
3599
|
+
var i, l, g, y;
|
|
3600
|
+
if (!Object.is(n.current[e], a)) {
|
|
3601
|
+
if (n.current[e] = a, e === "search")
|
|
3602
|
+
J2(), z(), v(1, W2);
|
|
3603
|
+
else if (e === "value") {
|
|
3604
|
+
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
3605
|
+
let h = document.getElementById(_);
|
|
3606
|
+
h ? h.focus() : (i = document.getElementById($2)) == null || i.focus();
|
|
3224
3607
|
}
|
|
3225
3608
|
if (v(7, () => {
|
|
3226
3609
|
var h;
|
|
@@ -3257,7 +3640,8 @@ var me = t.forwardRef((r, o) => {
|
|
|
3257
3640
|
return e ? s(e, n.current.search, a) : 0;
|
|
3258
3641
|
}
|
|
3259
3642
|
function z() {
|
|
3260
|
-
if (!n.current.search || p2.current.shouldFilter === false)
|
|
3643
|
+
if (!n.current.search || p2.current.shouldFilter === false)
|
|
3644
|
+
return;
|
|
3261
3645
|
let e = n.current.filtered.items, a = [];
|
|
3262
3646
|
n.current.filtered.groups.forEach((i) => {
|
|
3263
3647
|
let l = c.current.get(i), g = 0;
|
|
@@ -3296,10 +3680,12 @@ var me = t.forwardRef((r, o) => {
|
|
|
3296
3680
|
let y = (s = (a = d.current.get(g)) == null ? void 0 : a.value) != null ? s : "", h = (l = (i = d.current.get(g)) == null ? void 0 : i.keywords) != null ? l : [], F = te(y, h);
|
|
3297
3681
|
n.current.filtered.items.set(g, F), F > 0 && e++;
|
|
3298
3682
|
}
|
|
3299
|
-
for (let [g, y] of c.current)
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3683
|
+
for (let [g, y] of c.current)
|
|
3684
|
+
for (let h of y)
|
|
3685
|
+
if (n.current.filtered.items.get(h) > 0) {
|
|
3686
|
+
n.current.filtered.groups.add(g);
|
|
3687
|
+
break;
|
|
3688
|
+
}
|
|
3303
3689
|
n.current.filtered.count = e;
|
|
3304
3690
|
}
|
|
3305
3691
|
function ne() {
|
|
@@ -3326,7 +3712,8 @@ var me = t.forwardRef((r, o) => {
|
|
|
3326
3712
|
}
|
|
3327
3713
|
function re(e) {
|
|
3328
3714
|
let a = M(), s = a == null ? void 0 : a.closest(N), i;
|
|
3329
|
-
for (; s && !i; )
|
|
3715
|
+
for (; s && !i; )
|
|
3716
|
+
s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
|
|
3330
3717
|
i ? E.setState("value", i.getAttribute(T)) : Q(e);
|
|
3331
3718
|
}
|
|
3332
3719
|
let oe = () => X7(V().length - 1), ie = (e) => {
|
|
@@ -3334,58 +3721,61 @@ var me = t.forwardRef((r, o) => {
|
|
|
3334
3721
|
}, se = (e) => {
|
|
3335
3722
|
e.preventDefault(), e.metaKey ? X7(0) : e.altKey ? re(-1) : Q(-1);
|
|
3336
3723
|
};
|
|
3337
|
-
return t.createElement(
|
|
3724
|
+
return t.createElement(Primitive2.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
|
|
3338
3725
|
var s;
|
|
3339
3726
|
(s = O.onKeyDown) == null || s.call(O, e);
|
|
3340
3727
|
let a = e.nativeEvent.isComposing || e.keyCode === 229;
|
|
3341
|
-
if (!(e.defaultPrevented || a))
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
j
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3728
|
+
if (!(e.defaultPrevented || a))
|
|
3729
|
+
switch (e.key) {
|
|
3730
|
+
case "n":
|
|
3731
|
+
case "j": {
|
|
3732
|
+
j && e.ctrlKey && ie(e);
|
|
3733
|
+
break;
|
|
3734
|
+
}
|
|
3735
|
+
case "ArrowDown": {
|
|
3736
|
+
ie(e);
|
|
3737
|
+
break;
|
|
3738
|
+
}
|
|
3739
|
+
case "p":
|
|
3740
|
+
case "k": {
|
|
3741
|
+
j && e.ctrlKey && se(e);
|
|
3742
|
+
break;
|
|
3743
|
+
}
|
|
3744
|
+
case "ArrowUp": {
|
|
3745
|
+
se(e);
|
|
3746
|
+
break;
|
|
3747
|
+
}
|
|
3748
|
+
case "Home": {
|
|
3749
|
+
e.preventDefault(), X7(0);
|
|
3750
|
+
break;
|
|
3751
|
+
}
|
|
3752
|
+
case "End": {
|
|
3753
|
+
e.preventDefault(), oe();
|
|
3754
|
+
break;
|
|
3755
|
+
}
|
|
3756
|
+
case "Enter": {
|
|
3757
|
+
e.preventDefault();
|
|
3758
|
+
let i = M();
|
|
3759
|
+
if (i) {
|
|
3760
|
+
let l = new Event(Z);
|
|
3761
|
+
i.dispatchEvent(l);
|
|
3762
|
+
}
|
|
3374
3763
|
}
|
|
3375
3764
|
}
|
|
3376
|
-
}
|
|
3377
3765
|
} }, t.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b), B2(r, (e) => t.createElement(de.Provider, { value: E }, t.createElement(ue.Provider, { value: U2 }, e))));
|
|
3378
3766
|
});
|
|
3379
3767
|
var he = t.forwardRef((r, o) => {
|
|
3380
3768
|
var _, I;
|
|
3381
|
-
let n =
|
|
3769
|
+
let n = useId3(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
|
|
3382
3770
|
k2(() => {
|
|
3383
|
-
if (!p2)
|
|
3771
|
+
if (!p2)
|
|
3772
|
+
return d.item(n, c == null ? void 0 : c.id);
|
|
3384
3773
|
}, [p2]);
|
|
3385
3774
|
let b = ve(n, u2, [r.value, r.children, u2], r.keywords), m2 = ee(), R = P((v) => v.value && v.value === b.current), x = P((v) => p2 || d.filter() === false ? true : v.search ? v.filtered.items.get(n) > 0 : true);
|
|
3386
3775
|
t.useEffect(() => {
|
|
3387
3776
|
let v = u2.current;
|
|
3388
|
-
if (!(!v || r.disabled))
|
|
3777
|
+
if (!(!v || r.disabled))
|
|
3778
|
+
return v.addEventListener(Z, C), () => v.removeEventListener(Z, C);
|
|
3389
3779
|
}, [x, r.onSelect, r.disabled]);
|
|
3390
3780
|
function C() {
|
|
3391
3781
|
var v, E;
|
|
@@ -3394,25 +3784,26 @@ var he = t.forwardRef((r, o) => {
|
|
|
3394
3784
|
function S() {
|
|
3395
3785
|
m2.setState("value", b.current, true);
|
|
3396
3786
|
}
|
|
3397
|
-
if (!x)
|
|
3787
|
+
if (!x)
|
|
3788
|
+
return null;
|
|
3398
3789
|
let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r;
|
|
3399
|
-
return t.createElement(
|
|
3790
|
+
return t.createElement(Primitive2.div, { ref: composeRefs2(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r.children);
|
|
3400
3791
|
});
|
|
3401
3792
|
var Ee = t.forwardRef((r, o) => {
|
|
3402
|
-
let { heading: n, children: u2, forceMount: c, ...d } = r, f =
|
|
3793
|
+
let { heading: n, children: u2, forceMount: c, ...d } = r, f = useId3(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId3(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
|
|
3403
3794
|
k2(() => R.group(f), []), ve(f, p2, [r.value, r.heading, b]);
|
|
3404
3795
|
let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]);
|
|
3405
|
-
return t.createElement(
|
|
3796
|
+
return t.createElement(Primitive2.div, { ref: composeRefs2(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
|
|
3406
3797
|
});
|
|
3407
3798
|
var ye = t.forwardRef((r, o) => {
|
|
3408
3799
|
let { alwaysRender: n, ...u2 } = r, c = t.useRef(null), d = P((f) => !f.search);
|
|
3409
|
-
return !n && !d ? null : t.createElement(
|
|
3800
|
+
return !n && !d ? null : t.createElement(Primitive2.div, { ref: composeRefs2(c, o), ...u2, "cmdk-separator": "", role: "separator" });
|
|
3410
3801
|
});
|
|
3411
3802
|
var Se = t.forwardRef((r, o) => {
|
|
3412
3803
|
let { onValueChange: n, ...u2 } = r, c = r.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
|
|
3413
3804
|
return t.useEffect(() => {
|
|
3414
3805
|
r.value != null && d.setState("search", r.value);
|
|
3415
|
-
}, [r.value]), t.createElement(
|
|
3806
|
+
}, [r.value]), t.createElement(Primitive2.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r.value : f, onChange: (m2) => {
|
|
3416
3807
|
c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
|
|
3417
3808
|
} });
|
|
3418
3809
|
});
|
|
@@ -3430,29 +3821,31 @@ var Ce = t.forwardRef((r, o) => {
|
|
|
3430
3821
|
cancelAnimationFrame(x), C.unobserve(m2);
|
|
3431
3822
|
};
|
|
3432
3823
|
}
|
|
3433
|
-
}, []), t.createElement(
|
|
3824
|
+
}, []), t.createElement(Primitive2.div, { ref: composeRefs2(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r, (m2) => t.createElement("div", { ref: composeRefs2(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
3434
3825
|
});
|
|
3435
3826
|
var xe = t.forwardRef((r, o) => {
|
|
3436
3827
|
let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r;
|
|
3437
3828
|
return t.createElement(DialogPrimitive.Root, { open: n, onOpenChange: u2 }, t.createElement(DialogPrimitive.Portal, { container: f }, t.createElement(DialogPrimitive.Overlay, { "cmdk-overlay": "", className: c }), t.createElement(DialogPrimitive.Content, { "aria-label": r.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
|
|
3438
3829
|
});
|
|
3439
|
-
var Ie = t.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(
|
|
3830
|
+
var Ie = t.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive2.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
|
|
3440
3831
|
var Pe = t.forwardRef((r, o) => {
|
|
3441
3832
|
let { progress: n, children: u2, label: c = "Loading...", ...d } = r;
|
|
3442
|
-
return t.createElement(
|
|
3833
|
+
return t.createElement(Primitive2.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r, (f) => t.createElement("div", { "aria-hidden": true }, f)));
|
|
3443
3834
|
});
|
|
3444
3835
|
var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
|
|
3445
3836
|
function we(r, o) {
|
|
3446
3837
|
let n = r.nextElementSibling;
|
|
3447
3838
|
for (; n; ) {
|
|
3448
|
-
if (n.matches(o))
|
|
3839
|
+
if (n.matches(o))
|
|
3840
|
+
return n;
|
|
3449
3841
|
n = n.nextElementSibling;
|
|
3450
3842
|
}
|
|
3451
3843
|
}
|
|
3452
3844
|
function De(r, o) {
|
|
3453
3845
|
let n = r.previousElementSibling;
|
|
3454
3846
|
for (; n; ) {
|
|
3455
|
-
if (n.matches(o))
|
|
3847
|
+
if (n.matches(o))
|
|
3848
|
+
return n;
|
|
3456
3849
|
n = n.previousElementSibling;
|
|
3457
3850
|
}
|
|
3458
3851
|
}
|
|
@@ -3478,8 +3871,10 @@ function ve(r, o, n, u2 = []) {
|
|
|
3478
3871
|
let f = (() => {
|
|
3479
3872
|
var m2;
|
|
3480
3873
|
for (let R of n) {
|
|
3481
|
-
if (typeof R == "string")
|
|
3482
|
-
|
|
3874
|
+
if (typeof R == "string")
|
|
3875
|
+
return R.trim();
|
|
3876
|
+
if (typeof R == "object" && "current" in R)
|
|
3877
|
+
return R.current ? (m2 = R.current.textContent) == null ? void 0 : m2.trim() : c.current;
|
|
3483
3878
|
}
|
|
3484
3879
|
})(), p2 = u2.map((m2) => m2.trim());
|
|
3485
3880
|
d.value(r, f, p2), (b = o.current) == null || b.setAttribute(T, f), c.current = f;
|
|
@@ -3897,7 +4292,8 @@ function memo(getDeps, fn, opts) {
|
|
|
3897
4292
|
let result;
|
|
3898
4293
|
return (depArgs) => {
|
|
3899
4294
|
let depTime;
|
|
3900
|
-
if (opts.key && opts.debug)
|
|
4295
|
+
if (opts.key && opts.debug)
|
|
4296
|
+
depTime = Date.now();
|
|
3901
4297
|
const newDeps = getDeps(depArgs);
|
|
3902
4298
|
const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);
|
|
3903
4299
|
if (!depsChanged) {
|
|
@@ -3905,7 +4301,8 @@ function memo(getDeps, fn, opts) {
|
|
|
3905
4301
|
}
|
|
3906
4302
|
deps = newDeps;
|
|
3907
4303
|
let resultTime;
|
|
3908
|
-
if (opts.key && opts.debug)
|
|
4304
|
+
if (opts.key && opts.debug)
|
|
4305
|
+
resultTime = Date.now();
|
|
3909
4306
|
result = fn(...newDeps);
|
|
3910
4307
|
opts == null || opts.onChange == null || opts.onChange(result);
|
|
3911
4308
|
if (opts.key && opts.debug) {
|
|
@@ -4276,7 +4673,7 @@ var createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {
|
|
|
4276
4673
|
var _row$getValue;
|
|
4277
4674
|
return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;
|
|
4278
4675
|
},
|
|
4279
|
-
subRows: [],
|
|
4676
|
+
subRows: subRows != null ? subRows : [],
|
|
4280
4677
|
getLeafRows: () => flattenBy(row.subRows, (d) => d.subRows),
|
|
4281
4678
|
getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : void 0,
|
|
4282
4679
|
getParentRows: () => {
|
|
@@ -4284,7 +4681,8 @@ var createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {
|
|
|
4284
4681
|
let currentRow = row;
|
|
4285
4682
|
while (true) {
|
|
4286
4683
|
const parentRow = currentRow.getParentRow();
|
|
4287
|
-
if (!parentRow)
|
|
4684
|
+
if (!parentRow)
|
|
4685
|
+
break;
|
|
4288
4686
|
parentRows.push(parentRow);
|
|
4289
4687
|
currentRow = parentRow;
|
|
4290
4688
|
}
|
|
@@ -4572,25 +4970,29 @@ var extent = (columnId, _leafRows, childRows) => {
|
|
|
4572
4970
|
const value = row.getValue(columnId);
|
|
4573
4971
|
if (value != null) {
|
|
4574
4972
|
if (min2 === void 0) {
|
|
4575
|
-
if (value >= value)
|
|
4973
|
+
if (value >= value)
|
|
4974
|
+
min2 = max2 = value;
|
|
4576
4975
|
} else {
|
|
4577
|
-
if (min2 > value)
|
|
4578
|
-
|
|
4976
|
+
if (min2 > value)
|
|
4977
|
+
min2 = value;
|
|
4978
|
+
if (max2 < value)
|
|
4979
|
+
max2 = value;
|
|
4579
4980
|
}
|
|
4580
4981
|
}
|
|
4581
4982
|
});
|
|
4582
4983
|
return [min2, max2];
|
|
4583
4984
|
};
|
|
4584
4985
|
var mean = (columnId, leafRows) => {
|
|
4585
|
-
let
|
|
4986
|
+
let count4 = 0;
|
|
4586
4987
|
let sum2 = 0;
|
|
4587
4988
|
leafRows.forEach((row) => {
|
|
4588
4989
|
let value = row.getValue(columnId);
|
|
4589
4990
|
if (value != null && (value = +value) >= value) {
|
|
4590
|
-
++
|
|
4991
|
+
++count4, sum2 += value;
|
|
4591
4992
|
}
|
|
4592
4993
|
});
|
|
4593
|
-
if (
|
|
4994
|
+
if (count4)
|
|
4995
|
+
return sum2 / count4;
|
|
4594
4996
|
return;
|
|
4595
4997
|
};
|
|
4596
4998
|
var median = (columnId, leafRows) => {
|
|
@@ -4614,7 +5016,7 @@ var unique = (columnId, leafRows) => {
|
|
|
4614
5016
|
var uniqueCount = (columnId, leafRows) => {
|
|
4615
5017
|
return new Set(leafRows.map((d) => d.getValue(columnId))).size;
|
|
4616
5018
|
};
|
|
4617
|
-
var
|
|
5019
|
+
var count3 = (_columnId, leafRows) => {
|
|
4618
5020
|
return leafRows.length;
|
|
4619
5021
|
};
|
|
4620
5022
|
var aggregationFns = {
|
|
@@ -4626,7 +5028,7 @@ var aggregationFns = {
|
|
|
4626
5028
|
median,
|
|
4627
5029
|
unique,
|
|
4628
5030
|
uniqueCount,
|
|
4629
|
-
count:
|
|
5031
|
+
count: count3
|
|
4630
5032
|
};
|
|
4631
5033
|
var ColumnGrouping = {
|
|
4632
5034
|
getDefaultColumnDef: () => {
|
|
@@ -4674,7 +5076,8 @@ var ColumnGrouping = {
|
|
|
4674
5076
|
column.getToggleGroupingHandler = () => {
|
|
4675
5077
|
const canGroup = column.getCanGroup();
|
|
4676
5078
|
return () => {
|
|
4677
|
-
if (!canGroup)
|
|
5079
|
+
if (!canGroup)
|
|
5080
|
+
return;
|
|
4678
5081
|
column.toggleGrouping();
|
|
4679
5082
|
};
|
|
4680
5083
|
};
|
|
@@ -5137,7 +5540,8 @@ var ColumnSizing = {
|
|
|
5137
5540
|
};
|
|
5138
5541
|
var passiveSupported = null;
|
|
5139
5542
|
function passiveEventSupported() {
|
|
5140
|
-
if (typeof passiveSupported === "boolean")
|
|
5543
|
+
if (typeof passiveSupported === "boolean")
|
|
5544
|
+
return passiveSupported;
|
|
5141
5545
|
let supported = false;
|
|
5142
5546
|
try {
|
|
5143
5547
|
const options = {
|
|
@@ -5331,7 +5735,8 @@ var RowExpanding = {
|
|
|
5331
5735
|
return;
|
|
5332
5736
|
}
|
|
5333
5737
|
if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {
|
|
5334
|
-
if (queued)
|
|
5738
|
+
if (queued)
|
|
5739
|
+
return;
|
|
5335
5740
|
queued = true;
|
|
5336
5741
|
table._queue(() => {
|
|
5337
5742
|
table.resetExpanded();
|
|
@@ -5448,7 +5853,8 @@ var RowExpanding = {
|
|
|
5448
5853
|
row.getToggleExpandedHandler = () => {
|
|
5449
5854
|
const canExpand = row.getCanExpand();
|
|
5450
5855
|
return () => {
|
|
5451
|
-
if (!canExpand)
|
|
5856
|
+
if (!canExpand)
|
|
5857
|
+
return;
|
|
5452
5858
|
row.toggleExpanded();
|
|
5453
5859
|
};
|
|
5454
5860
|
};
|
|
@@ -5487,7 +5893,8 @@ var RowPagination = {
|
|
|
5487
5893
|
return;
|
|
5488
5894
|
}
|
|
5489
5895
|
if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {
|
|
5490
|
-
if (queued)
|
|
5896
|
+
if (queued)
|
|
5897
|
+
return;
|
|
5491
5898
|
queued = true;
|
|
5492
5899
|
table._queue(() => {
|
|
5493
5900
|
table.resetPageIndex();
|
|
@@ -5680,7 +6087,8 @@ var RowPinning = {
|
|
|
5680
6087
|
row.getPinnedIndex = () => {
|
|
5681
6088
|
var _ref4, _visiblePinnedRowIds$;
|
|
5682
6089
|
const position = row.getIsPinned();
|
|
5683
|
-
if (!position)
|
|
6090
|
+
if (!position)
|
|
6091
|
+
return -1;
|
|
5684
6092
|
const visiblePinnedRowIds = (_ref4 = position === "top" ? table.getTopRows() : table.getBottomRows()) == null ? void 0 : _ref4.map((_ref5) => {
|
|
5685
6093
|
let {
|
|
5686
6094
|
id
|
|
@@ -5921,7 +6329,8 @@ var RowSelection = {
|
|
|
5921
6329
|
const canSelect = row.getCanSelect();
|
|
5922
6330
|
return (e) => {
|
|
5923
6331
|
var _target;
|
|
5924
|
-
if (!canSelect)
|
|
6332
|
+
if (!canSelect)
|
|
6333
|
+
return;
|
|
5925
6334
|
row.toggleSelected((_target = e.target) == null ? void 0 : _target.checked);
|
|
5926
6335
|
};
|
|
5927
6336
|
};
|
|
@@ -5979,7 +6388,8 @@ function isRowSelected(row, selection) {
|
|
|
5979
6388
|
}
|
|
5980
6389
|
function isSubRowSelected(row, selection, table) {
|
|
5981
6390
|
var _row$subRows3;
|
|
5982
|
-
if (!((_row$subRows3 = row.subRows) != null && _row$subRows3.length))
|
|
6391
|
+
if (!((_row$subRows3 = row.subRows) != null && _row$subRows3.length))
|
|
6392
|
+
return false;
|
|
5983
6393
|
let allChildrenSelected = true;
|
|
5984
6394
|
let someSelected = false;
|
|
5985
6395
|
row.subRows.forEach((subRow) => {
|
|
@@ -6238,7 +6648,8 @@ var RowSorting = {
|
|
|
6238
6648
|
column.getToggleSortingHandler = () => {
|
|
6239
6649
|
const canSort = column.getCanSort();
|
|
6240
6650
|
return (e) => {
|
|
6241
|
-
if (!canSort)
|
|
6651
|
+
if (!canSort)
|
|
6652
|
+
return;
|
|
6242
6653
|
e.persist == null || e.persist();
|
|
6243
6654
|
column.toggleSorting == null || column.toggleSorting(void 0, column.getCanMultiSort() ? table.options.isMultiSortEvent == null ? void 0 : table.options.isMultiSortEvent(e) : false);
|
|
6244
6655
|
};
|
|
@@ -6721,7 +7132,8 @@ function getSortedRowModel() {
|
|
|
6721
7132
|
const columnInfoById = {};
|
|
6722
7133
|
availableSorting.forEach((sortEntry) => {
|
|
6723
7134
|
const column = table.getColumn(sortEntry.id);
|
|
6724
|
-
if (!column)
|
|
7135
|
+
if (!column)
|
|
7136
|
+
return;
|
|
6725
7137
|
columnInfoById[sortEntry.id] = {
|
|
6726
7138
|
sortUndefined: column.columnDef.sortUndefined,
|
|
6727
7139
|
invertSorting: column.columnDef.invertSorting,
|
|
@@ -6746,8 +7158,10 @@ function getSortedRowModel() {
|
|
|
6746
7158
|
const aUndefined = aValue === void 0;
|
|
6747
7159
|
const bUndefined = bValue === void 0;
|
|
6748
7160
|
if (aUndefined || bUndefined) {
|
|
6749
|
-
if (sortUndefined === "first")
|
|
6750
|
-
|
|
7161
|
+
if (sortUndefined === "first")
|
|
7162
|
+
return aUndefined ? -1 : 1;
|
|
7163
|
+
if (sortUndefined === "last")
|
|
7164
|
+
return aUndefined ? 1 : -1;
|
|
6751
7165
|
sortInt = aUndefined && bUndefined ? 0 : aUndefined ? sortUndefined : -sortUndefined;
|
|
6752
7166
|
}
|
|
6753
7167
|
}
|
|
@@ -6937,7 +7351,8 @@ TableRow.displayName = "TableRow";
|
|
|
6937
7351
|
var TableHead = t.forwardRef(
|
|
6938
7352
|
({ className, sortable, sorted, onSort, align = "left", children, ...props }, ref) => {
|
|
6939
7353
|
const renderSortIcon = () => {
|
|
6940
|
-
if (!sortable)
|
|
7354
|
+
if (!sortable)
|
|
7355
|
+
return null;
|
|
6941
7356
|
if (sorted === "asc") {
|
|
6942
7357
|
return /* @__PURE__ */ jsx(
|
|
6943
7358
|
"svg",
|
|
@@ -7187,279 +7602,93 @@ function createSortableHeader(label) {
|
|
|
7187
7602
|
}
|
|
7188
7603
|
);
|
|
7189
7604
|
}
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7605
|
+
var pageTransitions2 = {
|
|
7606
|
+
initial: { opacity: 0, x: 20 },
|
|
7607
|
+
animate: { opacity: 1, x: 0 },
|
|
7608
|
+
exit: { opacity: 0, x: -20 }
|
|
7609
|
+
};
|
|
7610
|
+
var datePickerVariants = cva(
|
|
7611
|
+
"w-full justify-start text-left font-normal",
|
|
7612
|
+
{
|
|
7613
|
+
variants: {
|
|
7614
|
+
variant: {
|
|
7615
|
+
default: "",
|
|
7616
|
+
outline: "border-2",
|
|
7617
|
+
ghost: "hover:bg-accent hover:text-accent-foreground"
|
|
7618
|
+
},
|
|
7619
|
+
size: {
|
|
7620
|
+
default: "h-10 px-4 py-2",
|
|
7621
|
+
sm: "h-8 px-3 text-sm",
|
|
7622
|
+
lg: "h-12 px-6 text-base",
|
|
7623
|
+
icon: "h-10 w-10"
|
|
7624
|
+
},
|
|
7625
|
+
state: {
|
|
7626
|
+
default: "",
|
|
7627
|
+
error: "border-destructive focus:ring-destructive",
|
|
7628
|
+
success: "border-success focus:ring-success",
|
|
7629
|
+
warning: "border-warning focus:ring-warning"
|
|
7630
|
+
}
|
|
7631
|
+
},
|
|
7632
|
+
defaultVariants: {
|
|
7633
|
+
variant: "default",
|
|
7634
|
+
size: "default",
|
|
7635
|
+
state: "default"
|
|
7636
|
+
}
|
|
7637
|
+
}
|
|
7638
|
+
);
|
|
7639
|
+
function DatePicker({
|
|
7196
7640
|
className,
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7641
|
+
variant,
|
|
7642
|
+
size,
|
|
7643
|
+
state,
|
|
7644
|
+
value,
|
|
7645
|
+
onChange,
|
|
7646
|
+
placeholder = "Pick a date",
|
|
7647
|
+
formatString = "PPP",
|
|
7648
|
+
minDate,
|
|
7649
|
+
maxDate,
|
|
7650
|
+
disabledDates,
|
|
7651
|
+
disabledDaysOfWeek,
|
|
7652
|
+
showWeekNumbers,
|
|
7653
|
+
iconPosition = "left",
|
|
7654
|
+
icon,
|
|
7655
|
+
allowClear = true,
|
|
7656
|
+
readOnly = false,
|
|
7657
|
+
showTodayButton = true,
|
|
7658
|
+
calendarProps,
|
|
7659
|
+
disabled,
|
|
7200
7660
|
...props
|
|
7201
7661
|
}) {
|
|
7202
|
-
const [
|
|
7203
|
-
|
|
7204
|
-
)
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
const handlePreviousMonth = () => {
|
|
7215
|
-
setCurrentMonth(subMonths(currentMonth, 1));
|
|
7662
|
+
const [open, setOpen] = t.useState(false);
|
|
7663
|
+
const [internalDate, setInternalDate] = t.useState(value);
|
|
7664
|
+
t.useEffect(() => {
|
|
7665
|
+
setInternalDate(value);
|
|
7666
|
+
}, [value]);
|
|
7667
|
+
const handleSelect = (date) => {
|
|
7668
|
+
const singleDate = Array.isArray(date) ? date[0] : date && typeof date === "object" && "from" in date ? date.from : date;
|
|
7669
|
+
setInternalDate(singleDate);
|
|
7670
|
+
onChange?.(singleDate);
|
|
7671
|
+
if (singleDate) {
|
|
7672
|
+
setOpen(false);
|
|
7673
|
+
}
|
|
7216
7674
|
};
|
|
7217
|
-
const
|
|
7218
|
-
|
|
7675
|
+
const handleClear = (e) => {
|
|
7676
|
+
e.stopPropagation();
|
|
7677
|
+
handleSelect(void 0);
|
|
7219
7678
|
};
|
|
7220
|
-
const
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
onSelect?.(date);
|
|
7224
|
-
} else if (mode === "range") {
|
|
7225
|
-
const currentSelection = selected;
|
|
7226
|
-
if (!currentSelection?.from || currentSelection.from && currentSelection.to) {
|
|
7227
|
-
onSelect?.({ from: date, to: void 0 });
|
|
7228
|
-
} else {
|
|
7229
|
-
if (date < currentSelection.from) {
|
|
7230
|
-
onSelect?.({ from: date, to: currentSelection.from });
|
|
7231
|
-
} else {
|
|
7232
|
-
onSelect?.({ from: currentSelection.from, to: date });
|
|
7233
|
-
}
|
|
7234
|
-
}
|
|
7235
|
-
}
|
|
7236
|
-
};
|
|
7237
|
-
const isDateSelected = (date) => {
|
|
7238
|
-
if (!selected) return false;
|
|
7239
|
-
if (mode === "single") {
|
|
7240
|
-
return isSameDay(date, selected);
|
|
7241
|
-
} else if (mode === "range") {
|
|
7242
|
-
const range = selected;
|
|
7243
|
-
if (range.from && range.to) {
|
|
7244
|
-
return date >= range.from && date <= range.to;
|
|
7245
|
-
}
|
|
7246
|
-
return range.from ? isSameDay(date, range.from) : false;
|
|
7247
|
-
}
|
|
7248
|
-
return false;
|
|
7249
|
-
};
|
|
7250
|
-
const isRangeStart = (date) => {
|
|
7251
|
-
if (mode !== "range" || !selected) return false;
|
|
7252
|
-
const range = selected;
|
|
7253
|
-
return range.from ? isSameDay(date, range.from) : false;
|
|
7254
|
-
};
|
|
7255
|
-
const isRangeEnd = (date) => {
|
|
7256
|
-
if (mode !== "range" || !selected) return false;
|
|
7257
|
-
const range = selected;
|
|
7258
|
-
return range.to ? isSameDay(date, range.to) : false;
|
|
7259
|
-
};
|
|
7260
|
-
const isRangeMiddle = (date) => {
|
|
7261
|
-
if (mode !== "range" || !selected) return false;
|
|
7262
|
-
const range = selected;
|
|
7263
|
-
if (!range.from || !range.to) return false;
|
|
7264
|
-
return date > range.from && date < range.to;
|
|
7265
|
-
};
|
|
7266
|
-
const getDaysInMonth = () => {
|
|
7267
|
-
const start = startOfMonth(currentMonth);
|
|
7268
|
-
const end = endOfMonth(currentMonth);
|
|
7269
|
-
const days2 = eachDayOfInterval({ start, end });
|
|
7270
|
-
const firstDayOfWeek = getDay(start);
|
|
7271
|
-
const previousMonthDays = [];
|
|
7272
|
-
if (firstDayOfWeek > 0 && showOutsideDays) {
|
|
7273
|
-
const previousMonthStart = startOfWeek(start);
|
|
7274
|
-
const previousMonthEnd = new Date(start);
|
|
7275
|
-
previousMonthEnd.setDate(previousMonthEnd.getDate() - 1);
|
|
7276
|
-
previousMonthDays.push(...eachDayOfInterval({
|
|
7277
|
-
start: previousMonthStart,
|
|
7278
|
-
end: previousMonthEnd
|
|
7279
|
-
}));
|
|
7280
|
-
}
|
|
7281
|
-
const lastDayOfWeek = getDay(end);
|
|
7282
|
-
const nextMonthDays = [];
|
|
7283
|
-
if (lastDayOfWeek < 6 && showOutsideDays) {
|
|
7284
|
-
const nextMonthStart = new Date(end);
|
|
7285
|
-
nextMonthStart.setDate(nextMonthStart.getDate() + 1);
|
|
7286
|
-
const nextMonthEnd = endOfWeek(end);
|
|
7287
|
-
nextMonthDays.push(...eachDayOfInterval({
|
|
7288
|
-
start: nextMonthStart,
|
|
7289
|
-
end: nextMonthEnd
|
|
7290
|
-
}));
|
|
7291
|
-
}
|
|
7292
|
-
const emptyCells = [];
|
|
7293
|
-
if (!showOutsideDays && firstDayOfWeek > 0) {
|
|
7294
|
-
for (let i = 0; i < firstDayOfWeek; i++) {
|
|
7295
|
-
emptyCells.push(null);
|
|
7296
|
-
}
|
|
7297
|
-
}
|
|
7298
|
-
return [...previousMonthDays, ...emptyCells, ...days2, ...nextMonthDays];
|
|
7299
|
-
};
|
|
7300
|
-
const days = getDaysInMonth();
|
|
7301
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", "p-0", className), children: [
|
|
7302
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50", children: [
|
|
7303
|
-
/* @__PURE__ */ jsx(
|
|
7304
|
-
"button",
|
|
7305
|
-
{
|
|
7306
|
-
onClick: handlePreviousMonth,
|
|
7307
|
-
className: cn(
|
|
7308
|
-
"h-10 w-10 bg-transparent p-0 rounded-lg",
|
|
7309
|
-
"hover:bg-muted transition-colors",
|
|
7310
|
-
"inline-flex items-center justify-center"
|
|
7311
|
-
),
|
|
7312
|
-
type: "button",
|
|
7313
|
-
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-5 w-5" })
|
|
7314
|
-
}
|
|
7315
|
-
),
|
|
7316
|
-
/* @__PURE__ */ jsx("h2", { className: "text-base font-medium", children: format(currentMonth, "MMMM yyyy") }),
|
|
7317
|
-
/* @__PURE__ */ jsx(
|
|
7318
|
-
"button",
|
|
7319
|
-
{
|
|
7320
|
-
onClick: handleNextMonth,
|
|
7321
|
-
className: cn(
|
|
7322
|
-
"h-10 w-10 bg-transparent p-0 rounded-lg",
|
|
7323
|
-
"hover:bg-muted transition-colors",
|
|
7324
|
-
"inline-flex items-center justify-center"
|
|
7325
|
-
),
|
|
7326
|
-
type: "button",
|
|
7327
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-5 w-5" })
|
|
7328
|
-
}
|
|
7329
|
-
)
|
|
7330
|
-
] }),
|
|
7331
|
-
/* @__PURE__ */ jsxs("div", { className: "px-6 pb-4", children: [
|
|
7332
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 mb-2", children: weekDays.map((day, index) => /* @__PURE__ */ jsx(
|
|
7333
|
-
"div",
|
|
7334
|
-
{
|
|
7335
|
-
className: "text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",
|
|
7336
|
-
title: day.full,
|
|
7337
|
-
children: day.short
|
|
7338
|
-
},
|
|
7339
|
-
`weekday-${index}`
|
|
7340
|
-
)) }),
|
|
7341
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-1", children: days.map((date, index) => {
|
|
7342
|
-
if (!date) {
|
|
7343
|
-
return /* @__PURE__ */ jsx("div", { className: "h-10 w-10" }, `empty-${index}`);
|
|
7344
|
-
}
|
|
7345
|
-
const isOutsideMonth = !isSameMonth(date, currentMonth);
|
|
7346
|
-
const isDisabled = disabled?.(date) || false;
|
|
7347
|
-
const isSelected = isDateSelected(date);
|
|
7348
|
-
const isTodayDate = isToday(date);
|
|
7349
|
-
const rangeStart = isRangeStart(date);
|
|
7350
|
-
const rangeEnd = isRangeEnd(date);
|
|
7351
|
-
const rangeMiddle = isRangeMiddle(date);
|
|
7352
|
-
return /* @__PURE__ */ jsx(
|
|
7353
|
-
"button",
|
|
7354
|
-
{
|
|
7355
|
-
onClick: () => handleDateClick(date),
|
|
7356
|
-
disabled: isDisabled,
|
|
7357
|
-
className: cn(
|
|
7358
|
-
"h-10 w-10 p-0 font-normal",
|
|
7359
|
-
"inline-flex items-center justify-center rounded-lg",
|
|
7360
|
-
"hover:bg-muted transition-colors text-sm",
|
|
7361
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
7362
|
-
isOutsideMonth && "text-muted-foreground/50",
|
|
7363
|
-
isDisabled && "text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",
|
|
7364
|
-
isSelected && !rangeMiddle && "bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",
|
|
7365
|
-
isTodayDate && "font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",
|
|
7366
|
-
rangeMiddle && "bg-accent/30 text-accent-foreground rounded-none",
|
|
7367
|
-
rangeStart && "rounded-r-none",
|
|
7368
|
-
rangeEnd && "rounded-l-none"
|
|
7369
|
-
),
|
|
7370
|
-
type: "button",
|
|
7371
|
-
children: format(date, "d")
|
|
7372
|
-
},
|
|
7373
|
-
date.toISOString()
|
|
7374
|
-
);
|
|
7375
|
-
}) })
|
|
7376
|
-
] })
|
|
7377
|
-
] });
|
|
7378
|
-
}
|
|
7379
|
-
Calendar.displayName = "Calendar";
|
|
7380
|
-
var pageTransitions2 = {
|
|
7381
|
-
initial: { opacity: 0, x: 20 },
|
|
7382
|
-
animate: { opacity: 1, x: 0 },
|
|
7383
|
-
exit: { opacity: 0, x: -20 }
|
|
7384
|
-
};
|
|
7385
|
-
var datePickerVariants = cva(
|
|
7386
|
-
"w-full justify-start text-left font-normal",
|
|
7387
|
-
{
|
|
7388
|
-
variants: {
|
|
7389
|
-
variant: {
|
|
7390
|
-
default: "",
|
|
7391
|
-
outline: "border-2",
|
|
7392
|
-
ghost: "hover:bg-accent hover:text-accent-foreground"
|
|
7393
|
-
},
|
|
7394
|
-
size: {
|
|
7395
|
-
default: "h-10 px-4 py-2",
|
|
7396
|
-
sm: "h-8 px-3 text-sm",
|
|
7397
|
-
lg: "h-12 px-6 text-base",
|
|
7398
|
-
icon: "h-10 w-10"
|
|
7399
|
-
},
|
|
7400
|
-
state: {
|
|
7401
|
-
default: "",
|
|
7402
|
-
error: "border-destructive focus:ring-destructive",
|
|
7403
|
-
success: "border-success focus:ring-success",
|
|
7404
|
-
warning: "border-warning focus:ring-warning"
|
|
7405
|
-
}
|
|
7406
|
-
},
|
|
7407
|
-
defaultVariants: {
|
|
7408
|
-
variant: "default",
|
|
7409
|
-
size: "default",
|
|
7410
|
-
state: "default"
|
|
7411
|
-
}
|
|
7412
|
-
}
|
|
7413
|
-
);
|
|
7414
|
-
function DatePicker({
|
|
7415
|
-
className,
|
|
7416
|
-
variant,
|
|
7417
|
-
size,
|
|
7418
|
-
state,
|
|
7419
|
-
value,
|
|
7420
|
-
onChange,
|
|
7421
|
-
placeholder = "Pick a date",
|
|
7422
|
-
formatString = "PPP",
|
|
7423
|
-
minDate,
|
|
7424
|
-
maxDate,
|
|
7425
|
-
disabledDates,
|
|
7426
|
-
disabledDaysOfWeek,
|
|
7427
|
-
showWeekNumbers,
|
|
7428
|
-
iconPosition = "left",
|
|
7429
|
-
icon,
|
|
7430
|
-
allowClear = true,
|
|
7431
|
-
readOnly = false,
|
|
7432
|
-
showTodayButton = true,
|
|
7433
|
-
calendarProps,
|
|
7434
|
-
disabled,
|
|
7435
|
-
...props
|
|
7436
|
-
}) {
|
|
7437
|
-
const [open, setOpen] = t.useState(false);
|
|
7438
|
-
const [internalDate, setInternalDate] = t.useState(value);
|
|
7439
|
-
t.useEffect(() => {
|
|
7440
|
-
setInternalDate(value);
|
|
7441
|
-
}, [value]);
|
|
7442
|
-
const handleSelect = (date) => {
|
|
7443
|
-
const singleDate = Array.isArray(date) ? date[0] : date && typeof date === "object" && "from" in date ? date.from : date;
|
|
7444
|
-
setInternalDate(singleDate);
|
|
7445
|
-
onChange?.(singleDate);
|
|
7446
|
-
if (singleDate) {
|
|
7447
|
-
setOpen(false);
|
|
7448
|
-
}
|
|
7449
|
-
};
|
|
7450
|
-
const handleClear = (e) => {
|
|
7451
|
-
e.stopPropagation();
|
|
7452
|
-
handleSelect(void 0);
|
|
7453
|
-
};
|
|
7454
|
-
const handleToday = () => {
|
|
7455
|
-
const today = /* @__PURE__ */ new Date();
|
|
7456
|
-
handleSelect(today);
|
|
7679
|
+
const handleToday = () => {
|
|
7680
|
+
const today = /* @__PURE__ */ new Date();
|
|
7681
|
+
handleSelect(today);
|
|
7457
7682
|
};
|
|
7458
7683
|
const isDateDisabled = (date) => {
|
|
7459
|
-
if (minDate && date < minDate)
|
|
7460
|
-
|
|
7461
|
-
if (
|
|
7462
|
-
|
|
7684
|
+
if (minDate && date < minDate)
|
|
7685
|
+
return true;
|
|
7686
|
+
if (maxDate && date > maxDate)
|
|
7687
|
+
return true;
|
|
7688
|
+
if (disabledDates?.some((d) => d.toDateString() === date.toDateString()))
|
|
7689
|
+
return true;
|
|
7690
|
+
if (disabledDaysOfWeek?.includes(date.getDay()))
|
|
7691
|
+
return true;
|
|
7463
7692
|
return false;
|
|
7464
7693
|
};
|
|
7465
7694
|
const displayValue = internalDate && isValid(internalDate) ? format(internalDate, formatString) : null;
|
|
@@ -7601,7 +7830,8 @@ function DateRangePicker({
|
|
|
7601
7830
|
}
|
|
7602
7831
|
};
|
|
7603
7832
|
const displayValue = t.useMemo(() => {
|
|
7604
|
-
if (!internalRange?.from)
|
|
7833
|
+
if (!internalRange?.from)
|
|
7834
|
+
return null;
|
|
7605
7835
|
if (!internalRange?.to) {
|
|
7606
7836
|
return format(internalRange.from, formatString);
|
|
7607
7837
|
}
|
|
@@ -7835,7 +8065,8 @@ function DraggableList({
|
|
|
7835
8065
|
}) {
|
|
7836
8066
|
const [draggedIndex, setDraggedIndex] = t.useState(null);
|
|
7837
8067
|
const handleDragStart = (e, index) => {
|
|
7838
|
-
if (disabled)
|
|
8068
|
+
if (disabled)
|
|
8069
|
+
return;
|
|
7839
8070
|
setDraggedIndex(index);
|
|
7840
8071
|
e.dataTransfer.effectAllowed = "move";
|
|
7841
8072
|
};
|
|
@@ -8129,14 +8360,19 @@ var Progress = t.forwardRef(({
|
|
|
8129
8360
|
});
|
|
8130
8361
|
Progress.displayName = "Progress";
|
|
8131
8362
|
var getFileIcon = (type) => {
|
|
8132
|
-
if (type.startsWith("image/"))
|
|
8133
|
-
|
|
8134
|
-
if (type.startsWith("
|
|
8135
|
-
|
|
8363
|
+
if (type.startsWith("image/"))
|
|
8364
|
+
return /* @__PURE__ */ jsx(Image, { className: "h-4 w-4" });
|
|
8365
|
+
if (type.startsWith("video/"))
|
|
8366
|
+
return /* @__PURE__ */ jsx(Video, { className: "h-4 w-4" });
|
|
8367
|
+
if (type.startsWith("audio/"))
|
|
8368
|
+
return /* @__PURE__ */ jsx(Music, { className: "h-4 w-4" });
|
|
8369
|
+
if (type.includes("text") || type.includes("document"))
|
|
8370
|
+
return /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" });
|
|
8136
8371
|
return /* @__PURE__ */ jsx(File, { className: "h-4 w-4" });
|
|
8137
8372
|
};
|
|
8138
8373
|
var formatFileSize = (bytes) => {
|
|
8139
|
-
if (bytes === 0)
|
|
8374
|
+
if (bytes === 0)
|
|
8375
|
+
return "0 Bytes";
|
|
8140
8376
|
const k3 = 1024;
|
|
8141
8377
|
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
8142
8378
|
const i = Math.floor(Math.log(bytes) / Math.log(k3));
|
|
@@ -8296,7 +8532,8 @@ var FileUpload = t__default.forwardRef(
|
|
|
8296
8532
|
const handleDrop = useCallback((e) => {
|
|
8297
8533
|
e.preventDefault();
|
|
8298
8534
|
setIsDragOver(false);
|
|
8299
|
-
if (disabled)
|
|
8535
|
+
if (disabled)
|
|
8536
|
+
return;
|
|
8300
8537
|
const files = e.dataTransfer.files;
|
|
8301
8538
|
if (files.length > 0) {
|
|
8302
8539
|
processFiles(files);
|
|
@@ -8437,7 +8674,8 @@ var GestureDrawer = t__default.forwardRef(
|
|
|
8437
8674
|
const motionValue = isVertical ? y : x;
|
|
8438
8675
|
const opacity = useTransform(motionValue, [0, threshold], [1, 0.5]);
|
|
8439
8676
|
const handleDragEnd = (event, info) => {
|
|
8440
|
-
if (!enableSwipeToClose)
|
|
8677
|
+
if (!enableSwipeToClose)
|
|
8678
|
+
return;
|
|
8441
8679
|
const offset = isVertical ? info.offset.y : info.offset.x;
|
|
8442
8680
|
const velocity = isVertical ? info.velocity.y : info.velocity.x;
|
|
8443
8681
|
let shouldClose = false;
|
|
@@ -8478,7 +8716,8 @@ var GestureDrawer = t__default.forwardRef(
|
|
|
8478
8716
|
const getAnimatePosition = () => {
|
|
8479
8717
|
return isVertical ? { y: 0 } : { x: 0 };
|
|
8480
8718
|
};
|
|
8481
|
-
if (!isOpen)
|
|
8719
|
+
if (!isOpen)
|
|
8720
|
+
return null;
|
|
8482
8721
|
return /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-50", children: [
|
|
8483
8722
|
/* @__PURE__ */ jsx(
|
|
8484
8723
|
motion.div,
|
|
@@ -8698,7 +8937,8 @@ function LockedComponent({
|
|
|
8698
8937
|
const [isPreviewActive, setIsPreviewActive] = useState(false);
|
|
8699
8938
|
const [previewTimeout, setPreviewTimeout] = useState(null);
|
|
8700
8939
|
const handleMouseEnter = () => {
|
|
8701
|
-
if (!showPreview)
|
|
8940
|
+
if (!showPreview)
|
|
8941
|
+
return;
|
|
8702
8942
|
setIsPreviewActive(true);
|
|
8703
8943
|
if (previewTimeout) {
|
|
8704
8944
|
clearTimeout(previewTimeout);
|
|
@@ -8804,6 +9044,7 @@ function ProComponentWrapper({
|
|
|
8804
9044
|
nodeEnv: process.env.NODE_ENV === "development",
|
|
8805
9045
|
nextPublicEnv: process.env.NEXT_PUBLIC_VERCEL_ENV === "development",
|
|
8806
9046
|
localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
|
|
9047
|
+
port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080"),
|
|
8807
9048
|
vercelEnv: !process.env.VERCEL,
|
|
8808
9049
|
ciEnv: !process.env.CI,
|
|
8809
9050
|
deploymentEnv: !process.env.DEPLOYMENT_ENV
|
|
@@ -8884,7 +9125,9 @@ function ProComponentWrapper({
|
|
|
8884
9125
|
const isDevelopment = () => {
|
|
8885
9126
|
const checks = {
|
|
8886
9127
|
nodeEnv: process.env.NODE_ENV === "development",
|
|
8887
|
-
localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local"))
|
|
9128
|
+
localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
|
|
9129
|
+
port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080")
|
|
9130
|
+
};
|
|
8888
9131
|
if (process.env.VERCEL || process.env.NETLIFY || process.env.RENDER || process.env.RAILWAY_ENVIRONMENT || process.env.FLY_APP_NAME) {
|
|
8889
9132
|
return false;
|
|
8890
9133
|
}
|
|
@@ -8974,7 +9217,8 @@ function MoonLogo({
|
|
|
8974
9217
|
}) {
|
|
8975
9218
|
const logoId = t.useId();
|
|
8976
9219
|
const gradientId = `moon-gradient-${logoId}`;
|
|
8977
|
-
|
|
9220
|
+
const maskId = `moon-mask-${logoId}`;
|
|
9221
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
8978
9222
|
/* @__PURE__ */ jsxs(
|
|
8979
9223
|
"svg",
|
|
8980
9224
|
{
|
|
@@ -8986,11 +9230,17 @@ function MoonLogo({
|
|
|
8986
9230
|
className: "flex-shrink-0",
|
|
8987
9231
|
...props,
|
|
8988
9232
|
children: [
|
|
8989
|
-
|
|
8990
|
-
/* @__PURE__ */
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
9233
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
9234
|
+
variant === "gradient" && /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
9235
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#3B82F6" }),
|
|
9236
|
+
/* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: "#8B5CF6" }),
|
|
9237
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#EC4899" })
|
|
9238
|
+
] }),
|
|
9239
|
+
/* @__PURE__ */ jsxs("mask", { id: maskId, children: [
|
|
9240
|
+
/* @__PURE__ */ jsx("rect", { width: "32", height: "32", fill: "white" }),
|
|
9241
|
+
/* @__PURE__ */ jsx("circle", { cx: "22", cy: "10", r: "10", fill: "black" })
|
|
9242
|
+
] })
|
|
9243
|
+
] }),
|
|
8994
9244
|
/* @__PURE__ */ jsx(
|
|
8995
9245
|
"circle",
|
|
8996
9246
|
{
|
|
@@ -8998,17 +9248,8 @@ function MoonLogo({
|
|
|
8998
9248
|
cy: "16",
|
|
8999
9249
|
r: "14",
|
|
9000
9250
|
fill: variant === "gradient" ? `url(#${gradientId})` : "currentColor",
|
|
9001
|
-
className: variant === "default" ? "fill-primary" : ""
|
|
9002
|
-
|
|
9003
|
-
),
|
|
9004
|
-
/* @__PURE__ */ jsx(
|
|
9005
|
-
"circle",
|
|
9006
|
-
{
|
|
9007
|
-
cx: "22",
|
|
9008
|
-
cy: "10",
|
|
9009
|
-
r: "10",
|
|
9010
|
-
fill: "white",
|
|
9011
|
-
className: "dark:fill-background"
|
|
9251
|
+
className: variant === "default" ? "fill-primary" : "",
|
|
9252
|
+
mask: `url(#${maskId})`
|
|
9012
9253
|
}
|
|
9013
9254
|
)
|
|
9014
9255
|
]
|
|
@@ -9327,22 +9568,30 @@ var formatPhoneNumber = (value, countryCode) => {
|
|
|
9327
9568
|
const cleaned = value.replace(/\D/g, "");
|
|
9328
9569
|
switch (countryCode) {
|
|
9329
9570
|
case "+1":
|
|
9330
|
-
if (cleaned.length <= 3)
|
|
9331
|
-
|
|
9571
|
+
if (cleaned.length <= 3)
|
|
9572
|
+
return cleaned;
|
|
9573
|
+
if (cleaned.length <= 6)
|
|
9574
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
|
|
9332
9575
|
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)}-${cleaned.slice(6, 10)}`;
|
|
9333
9576
|
case "+44":
|
|
9334
|
-
if (cleaned.length <= 4)
|
|
9335
|
-
|
|
9577
|
+
if (cleaned.length <= 4)
|
|
9578
|
+
return cleaned;
|
|
9579
|
+
if (cleaned.length <= 7)
|
|
9580
|
+
return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
|
|
9336
9581
|
return `${cleaned.slice(0, 4)} ${cleaned.slice(4, 7)} ${cleaned.slice(7, 11)}`;
|
|
9337
9582
|
case "+90":
|
|
9338
|
-
if (cleaned.length <= 3)
|
|
9339
|
-
|
|
9340
|
-
if (cleaned.length <=
|
|
9583
|
+
if (cleaned.length <= 3)
|
|
9584
|
+
return cleaned;
|
|
9585
|
+
if (cleaned.length <= 6)
|
|
9586
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
|
|
9587
|
+
if (cleaned.length <= 9)
|
|
9588
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
|
|
9341
9589
|
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8, 10)}`;
|
|
9342
9590
|
default:
|
|
9343
9591
|
let formatted = "";
|
|
9344
9592
|
for (let i = 0; i < cleaned.length; i++) {
|
|
9345
|
-
if (i > 0 && i % 3 === 0)
|
|
9593
|
+
if (i > 0 && i % 3 === 0)
|
|
9594
|
+
formatted += " ";
|
|
9346
9595
|
formatted += cleaned[i];
|
|
9347
9596
|
}
|
|
9348
9597
|
return formatted;
|
|
@@ -9352,13 +9601,10 @@ var getMaxLength = (countryCode) => {
|
|
|
9352
9601
|
switch (countryCode) {
|
|
9353
9602
|
case "+1":
|
|
9354
9603
|
return 10;
|
|
9355
|
-
// US/Canada
|
|
9356
9604
|
case "+44":
|
|
9357
9605
|
return 11;
|
|
9358
|
-
// UK
|
|
9359
9606
|
case "+90":
|
|
9360
9607
|
return 10;
|
|
9361
|
-
// Turkey
|
|
9362
9608
|
default:
|
|
9363
9609
|
return 15;
|
|
9364
9610
|
}
|
|
@@ -9565,54 +9811,236 @@ function RichTextEditor({
|
|
|
9565
9811
|
onChange(e.target.value);
|
|
9566
9812
|
}
|
|
9567
9813
|
};
|
|
9568
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("border border-input rounded-md", className), children: [
|
|
9569
|
-
/* @__PURE__ */ jsx("div", { className: "border-b border-border p-2 bg-muted/50", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
9570
|
-
/* @__PURE__ */ jsx(
|
|
9571
|
-
"button",
|
|
9572
|
-
{
|
|
9573
|
-
type: "button",
|
|
9574
|
-
className: "px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",
|
|
9575
|
-
disabled,
|
|
9576
|
-
title: "Bold (Pro feature)",
|
|
9577
|
-
children: "B"
|
|
9578
|
-
}
|
|
9579
|
-
),
|
|
9580
|
-
/* @__PURE__ */ jsx(
|
|
9581
|
-
"button",
|
|
9582
|
-
{
|
|
9583
|
-
type: "button",
|
|
9584
|
-
className: "px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",
|
|
9585
|
-
disabled,
|
|
9586
|
-
title: "Italic (Pro feature)",
|
|
9587
|
-
children: "I"
|
|
9588
|
-
}
|
|
9589
|
-
),
|
|
9590
|
-
/* @__PURE__ */ jsx(
|
|
9591
|
-
"button",
|
|
9592
|
-
{
|
|
9593
|
-
type: "button",
|
|
9594
|
-
className: "px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",
|
|
9595
|
-
disabled,
|
|
9596
|
-
title: "Underline (Pro feature)",
|
|
9597
|
-
children: "U"
|
|
9598
|
-
}
|
|
9599
|
-
)
|
|
9600
|
-
] }) }),
|
|
9601
|
-
/* @__PURE__ */ jsx(
|
|
9602
|
-
"textarea",
|
|
9603
|
-
{
|
|
9604
|
-
value,
|
|
9605
|
-
onChange: handleChange,
|
|
9606
|
-
placeholder,
|
|
9607
|
-
disabled,
|
|
9608
|
-
className: cn(
|
|
9609
|
-
"w-full min-h-[200px] p-3 resize-none border-0 bg-transparent",
|
|
9610
|
-
"focus:outline-none focus:ring-0",
|
|
9611
|
-
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
9612
|
-
)
|
|
9613
|
-
}
|
|
9614
|
-
)
|
|
9615
|
-
] });
|
|
9814
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("border border-input rounded-md", className), children: [
|
|
9815
|
+
/* @__PURE__ */ jsx("div", { className: "border-b border-border p-2 bg-muted/50", children: /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
9816
|
+
/* @__PURE__ */ jsx(
|
|
9817
|
+
"button",
|
|
9818
|
+
{
|
|
9819
|
+
type: "button",
|
|
9820
|
+
className: "px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",
|
|
9821
|
+
disabled,
|
|
9822
|
+
title: "Bold (Pro feature)",
|
|
9823
|
+
children: "B"
|
|
9824
|
+
}
|
|
9825
|
+
),
|
|
9826
|
+
/* @__PURE__ */ jsx(
|
|
9827
|
+
"button",
|
|
9828
|
+
{
|
|
9829
|
+
type: "button",
|
|
9830
|
+
className: "px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",
|
|
9831
|
+
disabled,
|
|
9832
|
+
title: "Italic (Pro feature)",
|
|
9833
|
+
children: "I"
|
|
9834
|
+
}
|
|
9835
|
+
),
|
|
9836
|
+
/* @__PURE__ */ jsx(
|
|
9837
|
+
"button",
|
|
9838
|
+
{
|
|
9839
|
+
type: "button",
|
|
9840
|
+
className: "px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",
|
|
9841
|
+
disabled,
|
|
9842
|
+
title: "Underline (Pro feature)",
|
|
9843
|
+
children: "U"
|
|
9844
|
+
}
|
|
9845
|
+
)
|
|
9846
|
+
] }) }),
|
|
9847
|
+
/* @__PURE__ */ jsx(
|
|
9848
|
+
"textarea",
|
|
9849
|
+
{
|
|
9850
|
+
value,
|
|
9851
|
+
onChange: handleChange,
|
|
9852
|
+
placeholder,
|
|
9853
|
+
disabled,
|
|
9854
|
+
className: cn(
|
|
9855
|
+
"w-full min-h-[200px] p-3 resize-none border-0 bg-transparent",
|
|
9856
|
+
"focus:outline-none focus:ring-0",
|
|
9857
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
9858
|
+
)
|
|
9859
|
+
}
|
|
9860
|
+
)
|
|
9861
|
+
] });
|
|
9862
|
+
}
|
|
9863
|
+
function useStateMachine2(initialState, machine) {
|
|
9864
|
+
return t.useReducer((state, event) => {
|
|
9865
|
+
const nextState = machine[state][event];
|
|
9866
|
+
return nextState ?? state;
|
|
9867
|
+
}, initialState);
|
|
9868
|
+
}
|
|
9869
|
+
var Presence2 = (props) => {
|
|
9870
|
+
const { present, children } = props;
|
|
9871
|
+
const presence = usePresence2(present);
|
|
9872
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : t.Children.only(children);
|
|
9873
|
+
const ref = useComposedRefs2(presence.ref, getElementRef2(child));
|
|
9874
|
+
const forceMount = typeof children === "function";
|
|
9875
|
+
return forceMount || presence.isPresent ? t.cloneElement(child, { ref }) : null;
|
|
9876
|
+
};
|
|
9877
|
+
Presence2.displayName = "Presence";
|
|
9878
|
+
function usePresence2(present) {
|
|
9879
|
+
const [node, setNode] = t.useState();
|
|
9880
|
+
const stylesRef = t.useRef(null);
|
|
9881
|
+
const prevPresentRef = t.useRef(present);
|
|
9882
|
+
const prevAnimationNameRef = t.useRef("none");
|
|
9883
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
9884
|
+
const [state, send] = useStateMachine2(initialState, {
|
|
9885
|
+
mounted: {
|
|
9886
|
+
UNMOUNT: "unmounted",
|
|
9887
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
9888
|
+
},
|
|
9889
|
+
unmountSuspended: {
|
|
9890
|
+
MOUNT: "mounted",
|
|
9891
|
+
ANIMATION_END: "unmounted"
|
|
9892
|
+
},
|
|
9893
|
+
unmounted: {
|
|
9894
|
+
MOUNT: "mounted"
|
|
9895
|
+
}
|
|
9896
|
+
});
|
|
9897
|
+
t.useEffect(() => {
|
|
9898
|
+
const currentAnimationName = getAnimationName2(stylesRef.current);
|
|
9899
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
9900
|
+
}, [state]);
|
|
9901
|
+
useLayoutEffect22(() => {
|
|
9902
|
+
const styles = stylesRef.current;
|
|
9903
|
+
const wasPresent = prevPresentRef.current;
|
|
9904
|
+
const hasPresentChanged = wasPresent !== present;
|
|
9905
|
+
if (hasPresentChanged) {
|
|
9906
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
9907
|
+
const currentAnimationName = getAnimationName2(styles);
|
|
9908
|
+
if (present) {
|
|
9909
|
+
send("MOUNT");
|
|
9910
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
9911
|
+
send("UNMOUNT");
|
|
9912
|
+
} else {
|
|
9913
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
9914
|
+
if (wasPresent && isAnimating) {
|
|
9915
|
+
send("ANIMATION_OUT");
|
|
9916
|
+
} else {
|
|
9917
|
+
send("UNMOUNT");
|
|
9918
|
+
}
|
|
9919
|
+
}
|
|
9920
|
+
prevPresentRef.current = present;
|
|
9921
|
+
}
|
|
9922
|
+
}, [present, send]);
|
|
9923
|
+
useLayoutEffect22(() => {
|
|
9924
|
+
if (node) {
|
|
9925
|
+
let timeoutId;
|
|
9926
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
9927
|
+
const handleAnimationEnd = (event) => {
|
|
9928
|
+
const currentAnimationName = getAnimationName2(stylesRef.current);
|
|
9929
|
+
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
|
9930
|
+
if (event.target === node && isCurrentAnimation) {
|
|
9931
|
+
send("ANIMATION_END");
|
|
9932
|
+
if (!prevPresentRef.current) {
|
|
9933
|
+
const currentFillMode = node.style.animationFillMode;
|
|
9934
|
+
node.style.animationFillMode = "forwards";
|
|
9935
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
9936
|
+
if (node.style.animationFillMode === "forwards") {
|
|
9937
|
+
node.style.animationFillMode = currentFillMode;
|
|
9938
|
+
}
|
|
9939
|
+
});
|
|
9940
|
+
}
|
|
9941
|
+
}
|
|
9942
|
+
};
|
|
9943
|
+
const handleAnimationStart = (event) => {
|
|
9944
|
+
if (event.target === node) {
|
|
9945
|
+
prevAnimationNameRef.current = getAnimationName2(stylesRef.current);
|
|
9946
|
+
}
|
|
9947
|
+
};
|
|
9948
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
9949
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
9950
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
9951
|
+
return () => {
|
|
9952
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
9953
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
9954
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
9955
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
9956
|
+
};
|
|
9957
|
+
} else {
|
|
9958
|
+
send("ANIMATION_END");
|
|
9959
|
+
}
|
|
9960
|
+
}, [node, send]);
|
|
9961
|
+
return {
|
|
9962
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
9963
|
+
ref: t.useCallback((node2) => {
|
|
9964
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
9965
|
+
setNode(node2);
|
|
9966
|
+
}, [])
|
|
9967
|
+
};
|
|
9968
|
+
}
|
|
9969
|
+
function getAnimationName2(styles) {
|
|
9970
|
+
return styles?.animationName || "none";
|
|
9971
|
+
}
|
|
9972
|
+
function getElementRef2(element) {
|
|
9973
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
9974
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
9975
|
+
if (mayWarn) {
|
|
9976
|
+
return element.ref;
|
|
9977
|
+
}
|
|
9978
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
9979
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
9980
|
+
if (mayWarn) {
|
|
9981
|
+
return element.props.ref;
|
|
9982
|
+
}
|
|
9983
|
+
return element.props.ref || element.ref;
|
|
9984
|
+
}
|
|
9985
|
+
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
9986
|
+
let defaultContexts = [];
|
|
9987
|
+
function createContext32(rootComponentName, defaultContext) {
|
|
9988
|
+
const BaseContext = t.createContext(defaultContext);
|
|
9989
|
+
const index = defaultContexts.length;
|
|
9990
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
9991
|
+
const Provider3 = (props) => {
|
|
9992
|
+
const { scope, children, ...context } = props;
|
|
9993
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
9994
|
+
const value = t.useMemo(() => context, Object.values(context));
|
|
9995
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
9996
|
+
};
|
|
9997
|
+
Provider3.displayName = rootComponentName + "Provider";
|
|
9998
|
+
function useContext22(consumerName, scope) {
|
|
9999
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
10000
|
+
const context = t.useContext(Context);
|
|
10001
|
+
if (context)
|
|
10002
|
+
return context;
|
|
10003
|
+
if (defaultContext !== void 0)
|
|
10004
|
+
return defaultContext;
|
|
10005
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
10006
|
+
}
|
|
10007
|
+
return [Provider3, useContext22];
|
|
10008
|
+
}
|
|
10009
|
+
const createScope = () => {
|
|
10010
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
10011
|
+
return t.createContext(defaultContext);
|
|
10012
|
+
});
|
|
10013
|
+
return function useScope(scope) {
|
|
10014
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
10015
|
+
return t.useMemo(
|
|
10016
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
10017
|
+
[scope, contexts]
|
|
10018
|
+
);
|
|
10019
|
+
};
|
|
10020
|
+
};
|
|
10021
|
+
createScope.scopeName = scopeName;
|
|
10022
|
+
return [createContext32, composeContextScopes2(createScope, ...createContextScopeDeps)];
|
|
10023
|
+
}
|
|
10024
|
+
function composeContextScopes2(...scopes) {
|
|
10025
|
+
const baseScope = scopes[0];
|
|
10026
|
+
if (scopes.length === 1)
|
|
10027
|
+
return baseScope;
|
|
10028
|
+
const createScope = () => {
|
|
10029
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
10030
|
+
useScope: createScope2(),
|
|
10031
|
+
scopeName: createScope2.scopeName
|
|
10032
|
+
}));
|
|
10033
|
+
return function useComposedScopes(overrideScopes) {
|
|
10034
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
10035
|
+
const scopeProps = useScope(overrideScopes);
|
|
10036
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
10037
|
+
return { ...nextScopes2, ...currentScope };
|
|
10038
|
+
}, {});
|
|
10039
|
+
return t.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
10040
|
+
};
|
|
10041
|
+
};
|
|
10042
|
+
createScope.scopeName = baseScope.scopeName;
|
|
10043
|
+
return createScope;
|
|
9616
10044
|
}
|
|
9617
10045
|
function useCallbackRef(callback) {
|
|
9618
10046
|
const callbackRef = t.useRef(callback);
|
|
@@ -9631,14 +10059,22 @@ function useDirection(localDir) {
|
|
|
9631
10059
|
function clamp(value, [min2, max2]) {
|
|
9632
10060
|
return Math.min(max2, Math.max(min2, value));
|
|
9633
10061
|
}
|
|
9634
|
-
function
|
|
10062
|
+
function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
10063
|
+
return function handleEvent(event) {
|
|
10064
|
+
originalEventHandler?.(event);
|
|
10065
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
10066
|
+
return ourEventHandler?.(event);
|
|
10067
|
+
}
|
|
10068
|
+
};
|
|
10069
|
+
}
|
|
10070
|
+
function useStateMachine3(initialState, machine) {
|
|
9635
10071
|
return t.useReducer((state, event) => {
|
|
9636
10072
|
const nextState = machine[state][event];
|
|
9637
10073
|
return nextState ?? state;
|
|
9638
10074
|
}, initialState);
|
|
9639
10075
|
}
|
|
9640
10076
|
var SCROLL_AREA_NAME = "ScrollArea";
|
|
9641
|
-
var [createScrollAreaContext] =
|
|
10077
|
+
var [createScrollAreaContext, createScrollAreaScope] = createContextScope2(SCROLL_AREA_NAME);
|
|
9642
10078
|
var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
9643
10079
|
var ScrollArea = t.forwardRef(
|
|
9644
10080
|
(props, forwardedRef) => {
|
|
@@ -9658,7 +10094,7 @@ var ScrollArea = t.forwardRef(
|
|
|
9658
10094
|
const [cornerHeight, setCornerHeight] = t.useState(0);
|
|
9659
10095
|
const [scrollbarXEnabled, setScrollbarXEnabled] = t.useState(false);
|
|
9660
10096
|
const [scrollbarYEnabled, setScrollbarYEnabled] = t.useState(false);
|
|
9661
|
-
const composedRefs =
|
|
10097
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setScrollArea(node));
|
|
9662
10098
|
const direction = useDirection(dir);
|
|
9663
10099
|
return /* @__PURE__ */ jsx(
|
|
9664
10100
|
ScrollAreaProvider,
|
|
@@ -9683,7 +10119,7 @@ var ScrollArea = t.forwardRef(
|
|
|
9683
10119
|
onCornerWidthChange: setCornerWidth,
|
|
9684
10120
|
onCornerHeightChange: setCornerHeight,
|
|
9685
10121
|
children: /* @__PURE__ */ jsx(
|
|
9686
|
-
|
|
10122
|
+
Primitive2.div,
|
|
9687
10123
|
{
|
|
9688
10124
|
dir: direction,
|
|
9689
10125
|
...scrollAreaProps,
|
|
@@ -9708,7 +10144,7 @@ var ScrollAreaViewport = t.forwardRef(
|
|
|
9708
10144
|
const { __scopeScrollArea, children, nonce, ...viewportProps } = props;
|
|
9709
10145
|
const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
|
|
9710
10146
|
const ref = t.useRef(null);
|
|
9711
|
-
const composedRefs =
|
|
10147
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref, context.onViewportChange);
|
|
9712
10148
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9713
10149
|
/* @__PURE__ */ jsx(
|
|
9714
10150
|
"style",
|
|
@@ -9720,7 +10156,7 @@ var ScrollAreaViewport = t.forwardRef(
|
|
|
9720
10156
|
}
|
|
9721
10157
|
),
|
|
9722
10158
|
/* @__PURE__ */ jsx(
|
|
9723
|
-
|
|
10159
|
+
Primitive2.div,
|
|
9724
10160
|
{
|
|
9725
10161
|
"data-radix-scroll-area-viewport": "",
|
|
9726
10162
|
...viewportProps,
|
|
@@ -9789,7 +10225,7 @@ var ScrollAreaScrollbarHover = t.forwardRef((props, forwardedRef) => {
|
|
|
9789
10225
|
};
|
|
9790
10226
|
}
|
|
9791
10227
|
}, [context.scrollArea, context.scrollHideDelay]);
|
|
9792
|
-
return /* @__PURE__ */ jsx(
|
|
10228
|
+
return /* @__PURE__ */ jsx(Presence2, { present: forceMount || visible, children: /* @__PURE__ */ jsx(
|
|
9793
10229
|
ScrollAreaScrollbarAuto,
|
|
9794
10230
|
{
|
|
9795
10231
|
"data-state": visible ? "visible" : "hidden",
|
|
@@ -9803,7 +10239,7 @@ var ScrollAreaScrollbarScroll = t.forwardRef((props, forwardedRef) => {
|
|
|
9803
10239
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
9804
10240
|
const isHorizontal = props.orientation === "horizontal";
|
|
9805
10241
|
const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100);
|
|
9806
|
-
const [state, send] =
|
|
10242
|
+
const [state, send] = useStateMachine3("hidden", {
|
|
9807
10243
|
hidden: {
|
|
9808
10244
|
SCROLL: "scrolling"
|
|
9809
10245
|
},
|
|
@@ -9845,14 +10281,14 @@ var ScrollAreaScrollbarScroll = t.forwardRef((props, forwardedRef) => {
|
|
|
9845
10281
|
return () => viewport.removeEventListener("scroll", handleScroll);
|
|
9846
10282
|
}
|
|
9847
10283
|
}, [context.viewport, isHorizontal, send, debounceScrollEnd]);
|
|
9848
|
-
return /* @__PURE__ */ jsx(
|
|
10284
|
+
return /* @__PURE__ */ jsx(Presence2, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ jsx(
|
|
9849
10285
|
ScrollAreaScrollbarVisible,
|
|
9850
10286
|
{
|
|
9851
10287
|
"data-state": state === "hidden" ? "hidden" : "visible",
|
|
9852
10288
|
...scrollbarProps,
|
|
9853
10289
|
ref: forwardedRef,
|
|
9854
|
-
onPointerEnter:
|
|
9855
|
-
onPointerLeave:
|
|
10290
|
+
onPointerEnter: composeEventHandlers2(props.onPointerEnter, () => send("POINTER_ENTER")),
|
|
10291
|
+
onPointerLeave: composeEventHandlers2(props.onPointerLeave, () => send("POINTER_LEAVE"))
|
|
9856
10292
|
}
|
|
9857
10293
|
) });
|
|
9858
10294
|
});
|
|
@@ -9870,7 +10306,7 @@ var ScrollAreaScrollbarAuto = t.forwardRef((props, forwardedRef) => {
|
|
|
9870
10306
|
}, 10);
|
|
9871
10307
|
useResizeObserver(context.viewport, handleResize);
|
|
9872
10308
|
useResizeObserver(context.content, handleResize);
|
|
9873
|
-
return /* @__PURE__ */ jsx(
|
|
10309
|
+
return /* @__PURE__ */ jsx(Presence2, { present: forceMount || visible, children: /* @__PURE__ */ jsx(
|
|
9874
10310
|
ScrollAreaScrollbarVisible,
|
|
9875
10311
|
{
|
|
9876
10312
|
"data-state": visible ? "visible" : "hidden",
|
|
@@ -9916,7 +10352,8 @@ var ScrollAreaScrollbarVisible = t.forwardRef((props, forwardedRef) => {
|
|
|
9916
10352
|
}
|
|
9917
10353
|
},
|
|
9918
10354
|
onWheelScroll: (scrollPos) => {
|
|
9919
|
-
if (context.viewport)
|
|
10355
|
+
if (context.viewport)
|
|
10356
|
+
context.viewport.scrollLeft = scrollPos;
|
|
9920
10357
|
},
|
|
9921
10358
|
onDragScroll: (pointerPos) => {
|
|
9922
10359
|
if (context.viewport) {
|
|
@@ -9940,10 +10377,12 @@ var ScrollAreaScrollbarVisible = t.forwardRef((props, forwardedRef) => {
|
|
|
9940
10377
|
}
|
|
9941
10378
|
},
|
|
9942
10379
|
onWheelScroll: (scrollPos) => {
|
|
9943
|
-
if (context.viewport)
|
|
10380
|
+
if (context.viewport)
|
|
10381
|
+
context.viewport.scrollTop = scrollPos;
|
|
9944
10382
|
},
|
|
9945
10383
|
onDragScroll: (pointerPos) => {
|
|
9946
|
-
if (context.viewport)
|
|
10384
|
+
if (context.viewport)
|
|
10385
|
+
context.viewport.scrollTop = getScrollPosition(pointerPos);
|
|
9947
10386
|
}
|
|
9948
10387
|
}
|
|
9949
10388
|
);
|
|
@@ -9955,16 +10394,17 @@ var ScrollAreaScrollbarX = t.forwardRef((props, forwardedRef) => {
|
|
|
9955
10394
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
9956
10395
|
const [computedStyle, setComputedStyle] = t.useState();
|
|
9957
10396
|
const ref = t.useRef(null);
|
|
9958
|
-
const
|
|
10397
|
+
const composeRefs3 = useComposedRefs2(forwardedRef, ref, context.onScrollbarXChange);
|
|
9959
10398
|
t.useEffect(() => {
|
|
9960
|
-
if (ref.current)
|
|
10399
|
+
if (ref.current)
|
|
10400
|
+
setComputedStyle(getComputedStyle(ref.current));
|
|
9961
10401
|
}, [ref]);
|
|
9962
10402
|
return /* @__PURE__ */ jsx(
|
|
9963
10403
|
ScrollAreaScrollbarImpl,
|
|
9964
10404
|
{
|
|
9965
10405
|
"data-orientation": "horizontal",
|
|
9966
10406
|
...scrollbarProps,
|
|
9967
|
-
ref:
|
|
10407
|
+
ref: composeRefs3,
|
|
9968
10408
|
sizes,
|
|
9969
10409
|
style: {
|
|
9970
10410
|
bottom: 0,
|
|
@@ -10005,16 +10445,17 @@ var ScrollAreaScrollbarY = t.forwardRef((props, forwardedRef) => {
|
|
|
10005
10445
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
10006
10446
|
const [computedStyle, setComputedStyle] = t.useState();
|
|
10007
10447
|
const ref = t.useRef(null);
|
|
10008
|
-
const
|
|
10448
|
+
const composeRefs3 = useComposedRefs2(forwardedRef, ref, context.onScrollbarYChange);
|
|
10009
10449
|
t.useEffect(() => {
|
|
10010
|
-
if (ref.current)
|
|
10450
|
+
if (ref.current)
|
|
10451
|
+
setComputedStyle(getComputedStyle(ref.current));
|
|
10011
10452
|
}, [ref]);
|
|
10012
10453
|
return /* @__PURE__ */ jsx(
|
|
10013
10454
|
ScrollAreaScrollbarImpl,
|
|
10014
10455
|
{
|
|
10015
10456
|
"data-orientation": "vertical",
|
|
10016
10457
|
...scrollbarProps,
|
|
10017
|
-
ref:
|
|
10458
|
+
ref: composeRefs3,
|
|
10018
10459
|
sizes,
|
|
10019
10460
|
style: {
|
|
10020
10461
|
top: 0,
|
|
@@ -10068,7 +10509,7 @@ var ScrollAreaScrollbarImpl = t.forwardRef((props, forwardedRef) => {
|
|
|
10068
10509
|
} = props;
|
|
10069
10510
|
const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
|
|
10070
10511
|
const [scrollbar, setScrollbar] = t.useState(null);
|
|
10071
|
-
const
|
|
10512
|
+
const composeRefs3 = useComposedRefs2(forwardedRef, (node) => setScrollbar(node));
|
|
10072
10513
|
const rectRef = t.useRef(null);
|
|
10073
10514
|
const prevWebkitUserSelectRef = t.useRef("");
|
|
10074
10515
|
const viewport = context.viewport;
|
|
@@ -10087,7 +10528,8 @@ var ScrollAreaScrollbarImpl = t.forwardRef((props, forwardedRef) => {
|
|
|
10087
10528
|
const handleWheel = (event) => {
|
|
10088
10529
|
const element = event.target;
|
|
10089
10530
|
const isScrollbarWheel = scrollbar?.contains(element);
|
|
10090
|
-
if (isScrollbarWheel)
|
|
10531
|
+
if (isScrollbarWheel)
|
|
10532
|
+
handleWheelScroll(event, maxScrollPos);
|
|
10091
10533
|
};
|
|
10092
10534
|
document.addEventListener("wheel", handleWheel, { passive: false });
|
|
10093
10535
|
return () => document.removeEventListener("wheel", handleWheel, { passive: false });
|
|
@@ -10106,12 +10548,12 @@ var ScrollAreaScrollbarImpl = t.forwardRef((props, forwardedRef) => {
|
|
|
10106
10548
|
onThumbPositionChange: handleThumbPositionChange,
|
|
10107
10549
|
onThumbPointerDown: useCallbackRef(onThumbPointerDown),
|
|
10108
10550
|
children: /* @__PURE__ */ jsx(
|
|
10109
|
-
|
|
10551
|
+
Primitive2.div,
|
|
10110
10552
|
{
|
|
10111
10553
|
...scrollbarProps,
|
|
10112
|
-
ref:
|
|
10554
|
+
ref: composeRefs3,
|
|
10113
10555
|
style: { position: "absolute", ...scrollbarProps.style },
|
|
10114
|
-
onPointerDown:
|
|
10556
|
+
onPointerDown: composeEventHandlers2(props.onPointerDown, (event) => {
|
|
10115
10557
|
const mainPointer = 0;
|
|
10116
10558
|
if (event.button === mainPointer) {
|
|
10117
10559
|
const element = event.target;
|
|
@@ -10119,18 +10561,20 @@ var ScrollAreaScrollbarImpl = t.forwardRef((props, forwardedRef) => {
|
|
|
10119
10561
|
rectRef.current = scrollbar.getBoundingClientRect();
|
|
10120
10562
|
prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;
|
|
10121
10563
|
document.body.style.webkitUserSelect = "none";
|
|
10122
|
-
if (context.viewport)
|
|
10564
|
+
if (context.viewport)
|
|
10565
|
+
context.viewport.style.scrollBehavior = "auto";
|
|
10123
10566
|
handleDragScroll(event);
|
|
10124
10567
|
}
|
|
10125
10568
|
}),
|
|
10126
|
-
onPointerMove:
|
|
10127
|
-
onPointerUp:
|
|
10569
|
+
onPointerMove: composeEventHandlers2(props.onPointerMove, handleDragScroll),
|
|
10570
|
+
onPointerUp: composeEventHandlers2(props.onPointerUp, (event) => {
|
|
10128
10571
|
const element = event.target;
|
|
10129
10572
|
if (element.hasPointerCapture(event.pointerId)) {
|
|
10130
10573
|
element.releasePointerCapture(event.pointerId);
|
|
10131
10574
|
}
|
|
10132
10575
|
document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;
|
|
10133
|
-
if (context.viewport)
|
|
10576
|
+
if (context.viewport)
|
|
10577
|
+
context.viewport.style.scrollBehavior = "";
|
|
10134
10578
|
rectRef.current = null;
|
|
10135
10579
|
})
|
|
10136
10580
|
}
|
|
@@ -10143,7 +10587,7 @@ var ScrollAreaThumb = t.forwardRef(
|
|
|
10143
10587
|
(props, forwardedRef) => {
|
|
10144
10588
|
const { forceMount, ...thumbProps } = props;
|
|
10145
10589
|
const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
|
|
10146
|
-
return /* @__PURE__ */ jsx(
|
|
10590
|
+
return /* @__PURE__ */ jsx(Presence2, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
|
|
10147
10591
|
}
|
|
10148
10592
|
);
|
|
10149
10593
|
var ScrollAreaThumbImpl = t.forwardRef(
|
|
@@ -10152,7 +10596,7 @@ var ScrollAreaThumbImpl = t.forwardRef(
|
|
|
10152
10596
|
const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
|
|
10153
10597
|
const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
|
|
10154
10598
|
const { onThumbPositionChange } = scrollbarContext;
|
|
10155
|
-
const composedRef =
|
|
10599
|
+
const composedRef = useComposedRefs2(
|
|
10156
10600
|
forwardedRef,
|
|
10157
10601
|
(node) => scrollbarContext.onThumbChange(node)
|
|
10158
10602
|
);
|
|
@@ -10180,7 +10624,7 @@ var ScrollAreaThumbImpl = t.forwardRef(
|
|
|
10180
10624
|
}
|
|
10181
10625
|
}, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
|
|
10182
10626
|
return /* @__PURE__ */ jsx(
|
|
10183
|
-
|
|
10627
|
+
Primitive2.div,
|
|
10184
10628
|
{
|
|
10185
10629
|
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
|
|
10186
10630
|
...thumbProps,
|
|
@@ -10190,14 +10634,14 @@ var ScrollAreaThumbImpl = t.forwardRef(
|
|
|
10190
10634
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
10191
10635
|
...style
|
|
10192
10636
|
},
|
|
10193
|
-
onPointerDownCapture:
|
|
10637
|
+
onPointerDownCapture: composeEventHandlers2(props.onPointerDownCapture, (event) => {
|
|
10194
10638
|
const thumb = event.target;
|
|
10195
10639
|
const thumbRect = thumb.getBoundingClientRect();
|
|
10196
10640
|
const x = event.clientX - thumbRect.left;
|
|
10197
10641
|
const y = event.clientY - thumbRect.top;
|
|
10198
10642
|
scrollbarContext.onThumbPointerDown({ x, y });
|
|
10199
10643
|
}),
|
|
10200
|
-
onPointerUp:
|
|
10644
|
+
onPointerUp: composeEventHandlers2(props.onPointerUp, scrollbarContext.onThumbPointerUp)
|
|
10201
10645
|
}
|
|
10202
10646
|
);
|
|
10203
10647
|
}
|
|
@@ -10230,7 +10674,7 @@ var ScrollAreaCornerImpl = t.forwardRef((props, forwardedRef) => {
|
|
|
10230
10674
|
setWidth(width2);
|
|
10231
10675
|
});
|
|
10232
10676
|
return hasSize ? /* @__PURE__ */ jsx(
|
|
10233
|
-
|
|
10677
|
+
Primitive2.div,
|
|
10234
10678
|
{
|
|
10235
10679
|
...cornerProps,
|
|
10236
10680
|
ref: forwardedRef,
|
|
@@ -10284,7 +10728,8 @@ function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
|
|
|
10284
10728
|
}
|
|
10285
10729
|
function linearScale(input, output) {
|
|
10286
10730
|
return (value) => {
|
|
10287
|
-
if (input[0] === input[1] || output[0] === output[1])
|
|
10731
|
+
if (input[0] === input[1] || output[0] === output[1])
|
|
10732
|
+
return output[0];
|
|
10288
10733
|
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
10289
10734
|
return output[0] + ratio * (value - input[0]);
|
|
10290
10735
|
};
|
|
@@ -10300,7 +10745,8 @@ var addUnlinkedScrollListener = (node, handler = () => {
|
|
|
10300
10745
|
const position = { left: node.scrollLeft, top: node.scrollTop };
|
|
10301
10746
|
const isHorizontalScroll = prevPosition.left !== position.left;
|
|
10302
10747
|
const isVerticalScroll = prevPosition.top !== position.top;
|
|
10303
|
-
if (isHorizontalScroll || isVerticalScroll)
|
|
10748
|
+
if (isHorizontalScroll || isVerticalScroll)
|
|
10749
|
+
handler();
|
|
10304
10750
|
prevPosition = position;
|
|
10305
10751
|
rAF = window.requestAnimationFrame(loop);
|
|
10306
10752
|
})();
|
|
@@ -10317,7 +10763,7 @@ function useDebounceCallback(callback, delay) {
|
|
|
10317
10763
|
}
|
|
10318
10764
|
function useResizeObserver(element, onResize) {
|
|
10319
10765
|
const handleResize = useCallbackRef(onResize);
|
|
10320
|
-
|
|
10766
|
+
useLayoutEffect22(() => {
|
|
10321
10767
|
let rAF = 0;
|
|
10322
10768
|
if (element) {
|
|
10323
10769
|
const resizeObserver = new ResizeObserver(() => {
|
|
@@ -10418,7 +10864,8 @@ var ScrollReveal = t.forwardRef(
|
|
|
10418
10864
|
once: triggerOnce
|
|
10419
10865
|
});
|
|
10420
10866
|
const customVariants = t.useMemo(() => {
|
|
10421
|
-
if (variants)
|
|
10867
|
+
if (variants)
|
|
10868
|
+
return variants;
|
|
10422
10869
|
const baseVariants = defaultVariants[direction] || defaultVariants.up;
|
|
10423
10870
|
return {
|
|
10424
10871
|
hidden: {
|
|
@@ -10432,7 +10879,8 @@ var ScrollReveal = t.forwardRef(
|
|
|
10432
10879
|
};
|
|
10433
10880
|
}, [direction, distance, variants]);
|
|
10434
10881
|
t.useEffect(() => {
|
|
10435
|
-
if (!animate2)
|
|
10882
|
+
if (!animate2)
|
|
10883
|
+
return;
|
|
10436
10884
|
if (isInView) {
|
|
10437
10885
|
controls.start("visible");
|
|
10438
10886
|
} else if (!triggerOnce) {
|
|
@@ -10513,7 +10961,8 @@ var ScrollRevealItem = t.forwardRef(
|
|
|
10513
10961
|
id
|
|
10514
10962
|
}, ref) => {
|
|
10515
10963
|
const customVariants = t.useMemo(() => {
|
|
10516
|
-
if (variants)
|
|
10964
|
+
if (variants)
|
|
10965
|
+
return variants;
|
|
10517
10966
|
const baseVariants = defaultVariants[direction] || defaultVariants.up;
|
|
10518
10967
|
return {
|
|
10519
10968
|
hidden: {
|
|
@@ -10664,17 +11113,81 @@ var Separator3 = t.forwardRef(
|
|
|
10664
11113
|
)
|
|
10665
11114
|
);
|
|
10666
11115
|
Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
11116
|
+
var useInsertionEffect2 = t[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
11117
|
+
function useControllableState2({
|
|
11118
|
+
prop,
|
|
11119
|
+
defaultProp,
|
|
11120
|
+
onChange = () => {
|
|
11121
|
+
},
|
|
11122
|
+
caller
|
|
11123
|
+
}) {
|
|
11124
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState2({
|
|
11125
|
+
defaultProp,
|
|
11126
|
+
onChange
|
|
11127
|
+
});
|
|
11128
|
+
const isControlled = prop !== void 0;
|
|
11129
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
11130
|
+
{
|
|
11131
|
+
const isControlledRef = t.useRef(prop !== void 0);
|
|
11132
|
+
t.useEffect(() => {
|
|
11133
|
+
const wasControlled = isControlledRef.current;
|
|
11134
|
+
if (wasControlled !== isControlled) {
|
|
11135
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
11136
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
11137
|
+
console.warn(
|
|
11138
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
11139
|
+
);
|
|
11140
|
+
}
|
|
11141
|
+
isControlledRef.current = isControlled;
|
|
11142
|
+
}, [isControlled, caller]);
|
|
11143
|
+
}
|
|
11144
|
+
const setValue = t.useCallback(
|
|
11145
|
+
(nextValue) => {
|
|
11146
|
+
if (isControlled) {
|
|
11147
|
+
const value2 = isFunction3(nextValue) ? nextValue(prop) : nextValue;
|
|
11148
|
+
if (value2 !== prop) {
|
|
11149
|
+
onChangeRef.current?.(value2);
|
|
11150
|
+
}
|
|
11151
|
+
} else {
|
|
11152
|
+
setUncontrolledProp(nextValue);
|
|
11153
|
+
}
|
|
11154
|
+
},
|
|
11155
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
11156
|
+
);
|
|
11157
|
+
return [value, setValue];
|
|
11158
|
+
}
|
|
11159
|
+
function useUncontrolledState2({
|
|
11160
|
+
defaultProp,
|
|
11161
|
+
onChange
|
|
11162
|
+
}) {
|
|
11163
|
+
const [value, setValue] = t.useState(defaultProp);
|
|
11164
|
+
const prevValueRef = t.useRef(value);
|
|
11165
|
+
const onChangeRef = t.useRef(onChange);
|
|
11166
|
+
useInsertionEffect2(() => {
|
|
11167
|
+
onChangeRef.current = onChange;
|
|
11168
|
+
}, [onChange]);
|
|
11169
|
+
t.useEffect(() => {
|
|
11170
|
+
if (prevValueRef.current !== value) {
|
|
11171
|
+
onChangeRef.current?.(value);
|
|
11172
|
+
prevValueRef.current = value;
|
|
11173
|
+
}
|
|
11174
|
+
}, [value, prevValueRef]);
|
|
11175
|
+
return [value, setValue, onChangeRef];
|
|
11176
|
+
}
|
|
11177
|
+
function isFunction3(value) {
|
|
11178
|
+
return typeof value === "function";
|
|
11179
|
+
}
|
|
10667
11180
|
var NAME = "Toggle";
|
|
10668
11181
|
var Toggle = t.forwardRef((props, forwardedRef) => {
|
|
10669
11182
|
const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;
|
|
10670
|
-
const [pressed, setPressed] =
|
|
11183
|
+
const [pressed, setPressed] = useControllableState2({
|
|
10671
11184
|
prop: pressedProp,
|
|
10672
11185
|
onChange: onPressedChange,
|
|
10673
11186
|
defaultProp: defaultPressed ?? false,
|
|
10674
11187
|
caller: NAME
|
|
10675
11188
|
});
|
|
10676
11189
|
return /* @__PURE__ */ jsx(
|
|
10677
|
-
|
|
11190
|
+
Primitive2.button,
|
|
10678
11191
|
{
|
|
10679
11192
|
type: "button",
|
|
10680
11193
|
"aria-pressed": pressed,
|
|
@@ -10682,7 +11195,7 @@ var Toggle = t.forwardRef((props, forwardedRef) => {
|
|
|
10682
11195
|
"data-disabled": props.disabled ? "" : void 0,
|
|
10683
11196
|
...buttonProps,
|
|
10684
11197
|
ref: forwardedRef,
|
|
10685
|
-
onClick:
|
|
11198
|
+
onClick: composeEventHandlers2(props.onClick, () => {
|
|
10686
11199
|
if (!props.disabled) {
|
|
10687
11200
|
setPressed(!pressed);
|
|
10688
11201
|
}
|
|
@@ -10872,7 +11385,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
10872
11385
|
const [content, setContent] = useState(value);
|
|
10873
11386
|
const [isPreview, setIsPreview] = useState(false);
|
|
10874
11387
|
const [sourceContent, setSourceContent] = useState(value);
|
|
10875
|
-
|
|
11388
|
+
useState(null);
|
|
10876
11389
|
const editorRef = t__default.useRef(null);
|
|
10877
11390
|
const sourceRef = t__default.useRef(null);
|
|
10878
11391
|
const [formatState, setFormatState] = useState({
|
|
@@ -10901,7 +11414,8 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
10901
11414
|
return null;
|
|
10902
11415
|
}, []);
|
|
10903
11416
|
useCallback((range) => {
|
|
10904
|
-
if (!range)
|
|
11417
|
+
if (!range)
|
|
11418
|
+
return;
|
|
10905
11419
|
const selection2 = window.getSelection();
|
|
10906
11420
|
if (selection2) {
|
|
10907
11421
|
selection2.removeAllRanges();
|
|
@@ -10909,7 +11423,8 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
10909
11423
|
}
|
|
10910
11424
|
}, []);
|
|
10911
11425
|
const executeCommand = useCallback((command, value2) => {
|
|
10912
|
-
if (disabled)
|
|
11426
|
+
if (disabled)
|
|
11427
|
+
return;
|
|
10913
11428
|
if (editorRef.current) {
|
|
10914
11429
|
editorRef.current.focus();
|
|
10915
11430
|
}
|
|
@@ -11368,7 +11883,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11368
11883
|
);
|
|
11369
11884
|
SimpleEditor.displayName = "SimpleEditor";
|
|
11370
11885
|
var CharacterCount = ({ content }) => {
|
|
11371
|
-
const [
|
|
11886
|
+
const [count4, setCount] = useState(0);
|
|
11372
11887
|
useEffect(() => {
|
|
11373
11888
|
const getPlainText = (html) => {
|
|
11374
11889
|
const div = document.createElement("div");
|
|
@@ -11378,7 +11893,7 @@ var CharacterCount = ({ content }) => {
|
|
|
11378
11893
|
setCount(getPlainText(content).length);
|
|
11379
11894
|
}, [content]);
|
|
11380
11895
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11381
|
-
|
|
11896
|
+
count4,
|
|
11382
11897
|
" characters"
|
|
11383
11898
|
] });
|
|
11384
11899
|
};
|
|
@@ -11647,16 +12162,19 @@ var SwipeableCard = t.forwardRef(
|
|
|
11647
12162
|
const [currentX, setCurrentX] = t.useState(0);
|
|
11648
12163
|
const [isSwiping, setIsSwiping] = t.useState(false);
|
|
11649
12164
|
const handleTouchStart = (e) => {
|
|
11650
|
-
if (disabled)
|
|
12165
|
+
if (disabled)
|
|
12166
|
+
return;
|
|
11651
12167
|
setStartX(e.touches[0].clientX);
|
|
11652
12168
|
setIsSwiping(true);
|
|
11653
12169
|
};
|
|
11654
12170
|
const handleTouchMove = (e) => {
|
|
11655
|
-
if (disabled || !isSwiping)
|
|
12171
|
+
if (disabled || !isSwiping)
|
|
12172
|
+
return;
|
|
11656
12173
|
setCurrentX(e.touches[0].clientX);
|
|
11657
12174
|
};
|
|
11658
12175
|
const handleTouchEnd = () => {
|
|
11659
|
-
if (disabled || !isSwiping)
|
|
12176
|
+
if (disabled || !isSwiping)
|
|
12177
|
+
return;
|
|
11660
12178
|
const deltaX = currentX - startX;
|
|
11661
12179
|
if (Math.abs(deltaX) > threshold) {
|
|
11662
12180
|
if (deltaX > 0 && onSwipeRight) {
|
|
@@ -11760,7 +12278,8 @@ var TagsInput = t.forwardRef(
|
|
|
11760
12278
|
};
|
|
11761
12279
|
const addTag = () => {
|
|
11762
12280
|
const tag = inputValue.trim();
|
|
11763
|
-
if (!tag)
|
|
12281
|
+
if (!tag)
|
|
12282
|
+
return;
|
|
11764
12283
|
if (!allowDuplicates && value.includes(tag)) {
|
|
11765
12284
|
setError("This tag already exists");
|
|
11766
12285
|
setTimeout(() => setError(""), 2e3);
|
|
@@ -11776,7 +12295,8 @@ var TagsInput = t.forwardRef(
|
|
|
11776
12295
|
setError("");
|
|
11777
12296
|
};
|
|
11778
12297
|
const removeTag = (index) => {
|
|
11779
|
-
if (disabled)
|
|
12298
|
+
if (disabled)
|
|
12299
|
+
return;
|
|
11780
12300
|
onChange(value.filter((_, i) => i !== index));
|
|
11781
12301
|
};
|
|
11782
12302
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
@@ -11839,32 +12359,147 @@ var TagsInput = t.forwardRef(
|
|
|
11839
12359
|
}
|
|
11840
12360
|
);
|
|
11841
12361
|
TagsInput.displayName = "TagsInput";
|
|
12362
|
+
var textareaVariants = cva(
|
|
12363
|
+
[
|
|
12364
|
+
"flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200",
|
|
12365
|
+
"text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500",
|
|
12366
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
12367
|
+
"focus-visible:outline-none dark:text-gray-200",
|
|
12368
|
+
"resize-none"
|
|
12369
|
+
// Always disable manual resize, we control it
|
|
12370
|
+
],
|
|
12371
|
+
{
|
|
12372
|
+
variants: {
|
|
12373
|
+
variant: {
|
|
12374
|
+
default: "border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-800/80 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:shadow-inner dark:shadow-gray-950/10",
|
|
12375
|
+
outline: "border-2 border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:border-primary dark:focus-visible:border-primary/80",
|
|
12376
|
+
ghost: "border-none bg-transparent hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
|
|
12377
|
+
underline: "border-t-0 border-l-0 border-r-0 border-b-2 border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"
|
|
12378
|
+
},
|
|
12379
|
+
size: {
|
|
12380
|
+
sm: "min-h-[60px] text-xs",
|
|
12381
|
+
md: "min-h-[80px] text-sm",
|
|
12382
|
+
lg: "min-h-[120px] text-base"
|
|
12383
|
+
},
|
|
12384
|
+
isError: {
|
|
12385
|
+
true: "border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",
|
|
12386
|
+
false: ""
|
|
12387
|
+
},
|
|
12388
|
+
isSuccess: {
|
|
12389
|
+
true: "border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",
|
|
12390
|
+
false: ""
|
|
12391
|
+
}
|
|
12392
|
+
},
|
|
12393
|
+
defaultVariants: {
|
|
12394
|
+
variant: "default",
|
|
12395
|
+
size: "md",
|
|
12396
|
+
isError: false,
|
|
12397
|
+
isSuccess: false
|
|
12398
|
+
}
|
|
12399
|
+
}
|
|
12400
|
+
);
|
|
11842
12401
|
var Textarea = t.forwardRef(
|
|
11843
12402
|
({
|
|
11844
12403
|
className,
|
|
11845
|
-
|
|
12404
|
+
wrapperClassName,
|
|
12405
|
+
messageClassName,
|
|
11846
12406
|
variant,
|
|
11847
12407
|
size,
|
|
11848
12408
|
error,
|
|
11849
12409
|
success,
|
|
11850
12410
|
loading,
|
|
11851
|
-
autoResize,
|
|
12411
|
+
autoResize = false,
|
|
11852
12412
|
maxHeight,
|
|
11853
|
-
characterCount,
|
|
12413
|
+
characterCount = false,
|
|
12414
|
+
disabled,
|
|
12415
|
+
maxLength,
|
|
12416
|
+
value,
|
|
12417
|
+
defaultValue,
|
|
12418
|
+
onChange,
|
|
11854
12419
|
...props
|
|
11855
12420
|
}, ref) => {
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
|
|
11865
|
-
|
|
12421
|
+
const textareaRef = t.useRef(null);
|
|
12422
|
+
const [internalValue, setInternalValue] = t.useState(value || defaultValue || "");
|
|
12423
|
+
t.useImperativeHandle(ref, () => textareaRef.current);
|
|
12424
|
+
const adjustHeight = t.useCallback(() => {
|
|
12425
|
+
const textarea = textareaRef.current;
|
|
12426
|
+
if (!textarea || !autoResize)
|
|
12427
|
+
return;
|
|
12428
|
+
textarea.style.height = "auto";
|
|
12429
|
+
const newHeight = textarea.scrollHeight;
|
|
12430
|
+
if (maxHeight && newHeight > maxHeight) {
|
|
12431
|
+
textarea.style.height = `${maxHeight}px`;
|
|
12432
|
+
textarea.style.overflowY = "auto";
|
|
12433
|
+
} else {
|
|
12434
|
+
textarea.style.height = `${newHeight}px`;
|
|
12435
|
+
textarea.style.overflowY = "hidden";
|
|
11866
12436
|
}
|
|
11867
|
-
);
|
|
12437
|
+
}, [autoResize, maxHeight]);
|
|
12438
|
+
t.useEffect(() => {
|
|
12439
|
+
adjustHeight();
|
|
12440
|
+
}, [internalValue, adjustHeight]);
|
|
12441
|
+
t.useEffect(() => {
|
|
12442
|
+
if (value !== void 0) {
|
|
12443
|
+
setInternalValue(value);
|
|
12444
|
+
}
|
|
12445
|
+
}, [value]);
|
|
12446
|
+
const handleChange = (e) => {
|
|
12447
|
+
setInternalValue(e.target.value);
|
|
12448
|
+
onChange?.(e);
|
|
12449
|
+
};
|
|
12450
|
+
const currentLength = String(internalValue).length;
|
|
12451
|
+
const showCharCount = characterCount && (maxLength !== void 0 || currentLength > 0);
|
|
12452
|
+
const errorMessage = typeof error === "string" ? error : void 0;
|
|
12453
|
+
const successMessage = typeof success === "string" ? success : void 0;
|
|
12454
|
+
const showMessage = errorMessage || successMessage;
|
|
12455
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", "space-y-1.5 w-full", wrapperClassName), children: [
|
|
12456
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
12457
|
+
/* @__PURE__ */ jsx(
|
|
12458
|
+
"textarea",
|
|
12459
|
+
{
|
|
12460
|
+
ref: textareaRef,
|
|
12461
|
+
className: cn(
|
|
12462
|
+
textareaVariants({
|
|
12463
|
+
variant,
|
|
12464
|
+
size,
|
|
12465
|
+
isError: !!error,
|
|
12466
|
+
isSuccess: !!success
|
|
12467
|
+
}),
|
|
12468
|
+
loading && "pr-10",
|
|
12469
|
+
className
|
|
12470
|
+
),
|
|
12471
|
+
disabled: disabled || loading,
|
|
12472
|
+
value,
|
|
12473
|
+
defaultValue,
|
|
12474
|
+
onChange: handleChange,
|
|
12475
|
+
maxLength,
|
|
12476
|
+
"aria-invalid": !!error || void 0,
|
|
12477
|
+
"aria-describedby": errorMessage ? `${props.id || ""}-error` : successMessage ? `${props.id || ""}-success` : void 0,
|
|
12478
|
+
...props
|
|
12479
|
+
}
|
|
12480
|
+
),
|
|
12481
|
+
loading && /* @__PURE__ */ jsx("div", { className: "absolute top-3 right-3 text-gray-500", children: /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }) })
|
|
12482
|
+
] }),
|
|
12483
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
12484
|
+
showMessage && /* @__PURE__ */ jsx(
|
|
12485
|
+
"p",
|
|
12486
|
+
{
|
|
12487
|
+
className: cn(
|
|
12488
|
+
"text-xs transition-all",
|
|
12489
|
+
errorMessage && "text-error",
|
|
12490
|
+
successMessage && "text-success",
|
|
12491
|
+
messageClassName
|
|
12492
|
+
),
|
|
12493
|
+
id: errorMessage ? `${props.id || ""}-error` : successMessage ? `${props.id || ""}-success` : void 0,
|
|
12494
|
+
children: errorMessage || successMessage
|
|
12495
|
+
}
|
|
12496
|
+
),
|
|
12497
|
+
showCharCount && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground dark:text-gray-500 ml-auto", children: [
|
|
12498
|
+
currentLength,
|
|
12499
|
+
maxLength !== void 0 && ` / ${maxLength}`
|
|
12500
|
+
] })
|
|
12501
|
+
] })
|
|
12502
|
+
] });
|
|
11868
12503
|
}
|
|
11869
12504
|
);
|
|
11870
12505
|
Textarea.displayName = "Textarea";
|
|
@@ -12040,7 +12675,8 @@ function toast({ ...props }) {
|
|
|
12040
12675
|
id,
|
|
12041
12676
|
open: true,
|
|
12042
12677
|
onOpenChange: (open) => {
|
|
12043
|
-
if (!open)
|
|
12678
|
+
if (!open)
|
|
12679
|
+
dismiss();
|
|
12044
12680
|
}
|
|
12045
12681
|
}
|
|
12046
12682
|
});
|
|
@@ -12110,6 +12746,6 @@ function Toaster() {
|
|
|
12110
12746
|
*)
|
|
12111
12747
|
*/
|
|
12112
12748
|
|
|
12113
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardCVCInput, CardContent, CardDescription, CardExpiryInput, CardFooter, CardHeader, CardNumberInput, CardTitle, CardZipInput, Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogForm, DialogHeader, DialogTitle, DialogTrigger, DraggableList, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, FreeBadge, GestureDrawer, GitHubStarButton, GitHubStars, GradientPicker, Input, Label, LockedComponent, MonthPicker, MoonLogo, MoonLogoAnimated, MoonLogoIcon, Accordion as MoonUIAccordion, AccordionContent as MoonUIAccordionContent, AccordionItem as MoonUIAccordionItem, AccordionTrigger as MoonUIAccordionTrigger, Alert as MoonUIAlert, AlertDescription as MoonUIAlertDescription, AlertTitle as MoonUIAlertTitle, AspectRatio as MoonUIAspectRatio, Avatar as MoonUIAvatar, AvatarFallback as MoonUIAvatarFallback, AvatarGroup as MoonUIAvatarGroup, AvatarImage as MoonUIAvatarImage, Badge as MoonUIBadge, Breadcrumb as MoonUIBreadcrumb, BreadcrumbEllipsis as MoonUIBreadcrumbEllipsis, BreadcrumbItem as MoonUIBreadcrumbItem, BreadcrumbLink as MoonUIBreadcrumbLink, BreadcrumbList as MoonUIBreadcrumbList, BreadcrumbPage as MoonUIBreadcrumbPage, BreadcrumbSeparator as MoonUIBreadcrumbSeparator, Button as MoonUIButton, Card as MoonUICard, CardCVCInput as MoonUICardCVCInput, CardContent as MoonUICardContent, CardDescription as MoonUICardDescription, CardExpiryInput as MoonUICardExpiryInput, CardFooter as MoonUICardFooter, CardHeader as MoonUICardHeader, CardNumberInput as MoonUICardNumberInput, CardTitle as MoonUICardTitle, CardZipInput as MoonUICardZipInput, Checkbox as MoonUICheckbox, CheckboxGroup as MoonUICheckboxGroup, CheckboxLabel as MoonUICheckboxLabel, CheckboxWithLabel as MoonUICheckboxWithLabel, Collapsible2 as MoonUICollapsible, CollapsibleContent2 as MoonUICollapsibleContent, CollapsibleTrigger2 as MoonUICollapsibleTrigger, ColorPicker as MoonUIColorPicker, Command as MoonUICommand, CommandDialog as MoonUICommandDialog, CommandEmpty as MoonUICommandEmpty, CommandGroup as MoonUICommandGroup, CommandInput as MoonUICommandInput, CommandItem as MoonUICommandItem, CommandList as MoonUICommandList, CommandSeparator as MoonUICommandSeparator, CommandShortcut as MoonUICommandShortcut, DataTableBasic as MoonUIDataTableBasic, DatePicker as MoonUIDatePicker, DateRangePicker as MoonUIDateRangePicker, DateTimePicker as MoonUIDateTimePicker, Dialog as MoonUIDialog, DialogClose as MoonUIDialogClose, DialogContent as MoonUIDialogContent, DialogDescription as MoonUIDialogDescription, DialogFooter as MoonUIDialogFooter, DialogHeader as MoonUIDialogHeader, DialogTitle as MoonUIDialogTitle, DialogTrigger as MoonUIDialogTrigger, DraggableList as MoonUIDraggableList, DropdownMenu as MoonUIDropdownMenu, DropdownMenuCheckboxItem as MoonUIDropdownMenuCheckboxItem, DropdownMenuContent as MoonUIDropdownMenuContent, DropdownMenuGroup as MoonUIDropdownMenuGroup, DropdownMenuItem as MoonUIDropdownMenuItem, DropdownMenuLabel as MoonUIDropdownMenuLabel, DropdownMenuPortal as MoonUIDropdownMenuPortal, DropdownMenuRadioGroup as MoonUIDropdownMenuRadioGroup, DropdownMenuRadioItem as MoonUIDropdownMenuRadioItem, DropdownMenuSeparator as MoonUIDropdownMenuSeparator, DropdownMenuShortcut as MoonUIDropdownMenuShortcut, DropdownMenuSub as MoonUIDropdownMenuSub, DropdownMenuSubContent as MoonUIDropdownMenuSubContent, DropdownMenuSubTrigger as MoonUIDropdownMenuSubTrigger, DropdownMenuTrigger as MoonUIDropdownMenuTrigger, FileUpload as MoonUIFileUpload, FreeBadge as MoonUIFreeBadge, GestureDrawer as MoonUIGestureDrawer, GitHubStars as MoonUIGitHubStars, GradientPicker as MoonUIGradientPicker, Input as MoonUIInput, Label as MoonUILabel, LockedComponent as MoonUILockedComponent, MonthPicker as MoonUIMonthPicker, MoonLogo as MoonUIMoonLogo, Pagination as MoonUIPagination, PaginationContent as MoonUIPaginationContent, PaginationEllipsis as MoonUIPaginationEllipsis, PaginationItem as MoonUIPaginationItem, PaginationLink as MoonUIPaginationLink, PaginationNext as MoonUIPaginationNext, PaginationPrevious as MoonUIPaginationPrevious, PhoneInput as MoonUIPhoneInput, Popover as MoonUIPopover, PopoverContent as MoonUIPopoverContent, PopoverTrigger as MoonUIPopoverTrigger, ProBadge as MoonUIProBadge, ProComponentWrapper as MoonUIProComponentWrapper, Progress as MoonUIProgress, RadioGroup2 as MoonUIRadioGroup, RadioGroupItem as MoonUIRadioGroupItem, RadioItemWithLabel as MoonUIRadioItemWithLabel, RadioLabel as MoonUIRadioLabel, RichTextEditor as MoonUIRichTextEditor, ScrollArea2 as MoonUIScrollArea, ScrollBar as MoonUIScrollBar, ScrollReveal as MoonUIScrollReveal, ScrollRevealContainer as MoonUIScrollRevealContainer, ScrollRevealItem as MoonUIScrollRevealItem, Select as MoonUISelect, SelectContent as MoonUISelectContent, SelectGroup as MoonUISelectGroup, SelectItem as MoonUISelectItem, SelectLabel as MoonUISelectLabel, SelectScrollDownButton as MoonUISelectScrollDownButton, SelectScrollUpButton as MoonUISelectScrollUpButton, SelectSeparator as MoonUISelectSeparator, SelectTrigger as MoonUISelectTrigger, SelectValue as MoonUISelectValue, Separator3 as MoonUISeparator, SimpleColorPicker as MoonUISimpleColorPicker, SimpleEditor as MoonUISimpleEditor, Skeleton as MoonUISkeleton, SkeletonAvatar as MoonUISkeletonAvatar, SkeletonCard as MoonUISkeletonCard, SkeletonText as MoonUISkeletonText, Slider as MoonUISlider, SwipeableCard as MoonUISwipeableCard, Switch as MoonUISwitch, Table as MoonUITable, TableBody as MoonUITableBody, TableCaption as MoonUITableCaption, TableCell as MoonUITableCell, TableFooter as MoonUITableFooter, TableHead as MoonUITableHead, TableHeader as MoonUITableHeader, TableRow as MoonUITableRow, Tabs as MoonUITabs, TabsContent as MoonUITabsContent, TabsList as MoonUITabsList, TabsTrigger as MoonUITabsTrigger, TagsInput as MoonUITagsInput, Textarea as MoonUITextarea, Toast as MoonUIToast, ToastAction as MoonUIToastAction, ToastClose as MoonUIToastClose, ToastDescription as MoonUIToastDescription, ToastProvider as MoonUIToastProvider, ToastTitle as MoonUIToastTitle, ToastViewport as MoonUIToastViewport, Toaster as MoonUIToaster, Toggle2 as MoonUIToggle, Tooltip as MoonUITooltip, TooltipContent as MoonUITooltipContent, TooltipProvider as MoonUITooltipProvider, TooltipTrigger as MoonUITooltipTrigger, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneInput, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverSeparator, PopoverTrigger, ProBadge, ProComponentWrapper, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, RadioItemWithLabel, RadioLabel, RichTextEditor, ScrollArea2 as ScrollArea, ScrollBar, ScrollReveal, ScrollRevealContainer, ScrollRevealItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SimpleColorPicker, SimpleEditor, SimpleTooltip, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonText, Slider, SwipeableCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle2 as Toggle, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, aspectRatioVariants, badgeVariants, buttonVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, badgeVariants as moonUIBadgeVariants, buttonVariants as moonUIButtonVariants, createSortableHeader as moonUICreateSortableHeader, skeletonVariants as moonUISkeletonVariants, toggleVariants as moonUIToggleVariants, popoverContentVariants, progressVariants, separatorVariants, skeletonVariants, toast, toggleVariants, tooltipVariants, useToast };
|
|
12114
|
-
//# sourceMappingURL=
|
|
12749
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardCVCInput, CardContent, CardDescription, CardExpiryInput, CardFooter, CardHeader, CardNumberInput, CardTitle, CardZipInput, Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogForm, DialogHeader, DialogTitle, DialogTrigger, DraggableList, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, FreeBadge, GestureDrawer, GitHubStarButton, GitHubStars, GradientPicker, Input, Label, LockedComponent, MonthPicker, MoonLogo, MoonLogoAnimated, MoonLogoIcon, Accordion as MoonUIAccordion, AccordionContent as MoonUIAccordionContent, AccordionItem as MoonUIAccordionItem, AccordionTrigger as MoonUIAccordionTrigger, Alert as MoonUIAlert, AlertDescription as MoonUIAlertDescription, AlertTitle as MoonUIAlertTitle, AspectRatio as MoonUIAspectRatio, Avatar as MoonUIAvatar, AvatarFallback as MoonUIAvatarFallback, AvatarGroup as MoonUIAvatarGroup, AvatarImage as MoonUIAvatarImage, Badge as MoonUIBadge, Breadcrumb as MoonUIBreadcrumb, BreadcrumbEllipsis as MoonUIBreadcrumbEllipsis, BreadcrumbItem as MoonUIBreadcrumbItem, BreadcrumbLink as MoonUIBreadcrumbLink, BreadcrumbList as MoonUIBreadcrumbList, BreadcrumbPage as MoonUIBreadcrumbPage, BreadcrumbSeparator as MoonUIBreadcrumbSeparator, Button as MoonUIButton, Calendar as MoonUICalendar, Card as MoonUICard, CardCVCInput as MoonUICardCVCInput, CardContent as MoonUICardContent, CardDescription as MoonUICardDescription, CardExpiryInput as MoonUICardExpiryInput, CardFooter as MoonUICardFooter, CardHeader as MoonUICardHeader, CardNumberInput as MoonUICardNumberInput, CardTitle as MoonUICardTitle, CardZipInput as MoonUICardZipInput, Checkbox as MoonUICheckbox, CheckboxGroup as MoonUICheckboxGroup, CheckboxLabel as MoonUICheckboxLabel, CheckboxWithLabel as MoonUICheckboxWithLabel, Collapsible2 as MoonUICollapsible, CollapsibleContent2 as MoonUICollapsibleContent, CollapsibleTrigger2 as MoonUICollapsibleTrigger, ColorPicker as MoonUIColorPicker, Command as MoonUICommand, CommandDialog as MoonUICommandDialog, CommandEmpty as MoonUICommandEmpty, CommandGroup as MoonUICommandGroup, CommandInput as MoonUICommandInput, CommandItem as MoonUICommandItem, CommandList as MoonUICommandList, CommandSeparator as MoonUICommandSeparator, CommandShortcut as MoonUICommandShortcut, DataTableBasic as MoonUIDataTableBasic, DatePicker as MoonUIDatePicker, DateRangePicker as MoonUIDateRangePicker, DateTimePicker as MoonUIDateTimePicker, Dialog as MoonUIDialog, DialogClose as MoonUIDialogClose, DialogContent as MoonUIDialogContent, DialogDescription as MoonUIDialogDescription, DialogFooter as MoonUIDialogFooter, DialogHeader as MoonUIDialogHeader, DialogTitle as MoonUIDialogTitle, DialogTrigger as MoonUIDialogTrigger, DraggableList as MoonUIDraggableList, DropdownMenu as MoonUIDropdownMenu, DropdownMenuCheckboxItem as MoonUIDropdownMenuCheckboxItem, DropdownMenuContent as MoonUIDropdownMenuContent, DropdownMenuGroup as MoonUIDropdownMenuGroup, DropdownMenuItem as MoonUIDropdownMenuItem, DropdownMenuLabel as MoonUIDropdownMenuLabel, DropdownMenuPortal as MoonUIDropdownMenuPortal, DropdownMenuRadioGroup as MoonUIDropdownMenuRadioGroup, DropdownMenuRadioItem as MoonUIDropdownMenuRadioItem, DropdownMenuSeparator as MoonUIDropdownMenuSeparator, DropdownMenuShortcut as MoonUIDropdownMenuShortcut, DropdownMenuSub as MoonUIDropdownMenuSub, DropdownMenuSubContent as MoonUIDropdownMenuSubContent, DropdownMenuSubTrigger as MoonUIDropdownMenuSubTrigger, DropdownMenuTrigger as MoonUIDropdownMenuTrigger, FileUpload as MoonUIFileUpload, FreeBadge as MoonUIFreeBadge, GestureDrawer as MoonUIGestureDrawer, GitHubStars as MoonUIGitHubStars, GradientPicker as MoonUIGradientPicker, Input as MoonUIInput, Label as MoonUILabel, LockedComponent as MoonUILockedComponent, MonthPicker as MoonUIMonthPicker, MoonLogo as MoonUIMoonLogo, Pagination as MoonUIPagination, PaginationContent as MoonUIPaginationContent, PaginationEllipsis as MoonUIPaginationEllipsis, PaginationItem as MoonUIPaginationItem, PaginationLink as MoonUIPaginationLink, PaginationNext as MoonUIPaginationNext, PaginationPrevious as MoonUIPaginationPrevious, PhoneInput as MoonUIPhoneInput, Popover as MoonUIPopover, PopoverContent as MoonUIPopoverContent, PopoverTrigger as MoonUIPopoverTrigger, ProBadge as MoonUIProBadge, ProComponentWrapper as MoonUIProComponentWrapper, Progress as MoonUIProgress, RadioGroup2 as MoonUIRadioGroup, RadioGroupItem as MoonUIRadioGroupItem, RadioItemWithLabel as MoonUIRadioItemWithLabel, RadioLabel as MoonUIRadioLabel, RichTextEditor as MoonUIRichTextEditor, ScrollArea2 as MoonUIScrollArea, ScrollBar as MoonUIScrollBar, ScrollReveal as MoonUIScrollReveal, ScrollRevealContainer as MoonUIScrollRevealContainer, ScrollRevealItem as MoonUIScrollRevealItem, Select as MoonUISelect, SelectContent as MoonUISelectContent, SelectGroup as MoonUISelectGroup, SelectItem as MoonUISelectItem, SelectLabel as MoonUISelectLabel, SelectScrollDownButton as MoonUISelectScrollDownButton, SelectScrollUpButton as MoonUISelectScrollUpButton, SelectSeparator as MoonUISelectSeparator, SelectTrigger as MoonUISelectTrigger, SelectValue as MoonUISelectValue, Separator3 as MoonUISeparator, SimpleColorPicker as MoonUISimpleColorPicker, SimpleEditor as MoonUISimpleEditor, Skeleton as MoonUISkeleton, SkeletonAvatar as MoonUISkeletonAvatar, SkeletonCard as MoonUISkeletonCard, SkeletonText as MoonUISkeletonText, Slider as MoonUISlider, SwipeableCard as MoonUISwipeableCard, Switch as MoonUISwitch, Table as MoonUITable, TableBody as MoonUITableBody, TableCaption as MoonUITableCaption, TableCell as MoonUITableCell, TableFooter as MoonUITableFooter, TableHead as MoonUITableHead, TableHeader as MoonUITableHeader, TableRow as MoonUITableRow, Tabs as MoonUITabs, TabsContent as MoonUITabsContent, TabsList as MoonUITabsList, TabsTrigger as MoonUITabsTrigger, TagsInput as MoonUITagsInput, Textarea as MoonUITextarea, Toast as MoonUIToast, ToastAction as MoonUIToastAction, ToastClose as MoonUIToastClose, ToastDescription as MoonUIToastDescription, ToastProvider as MoonUIToastProvider, ToastTitle as MoonUIToastTitle, ToastViewport as MoonUIToastViewport, Toaster as MoonUIToaster, Toggle2 as MoonUIToggle, Tooltip as MoonUITooltip, TooltipContent as MoonUITooltipContent, TooltipProvider as MoonUITooltipProvider, TooltipTrigger as MoonUITooltipTrigger, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneInput, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverSeparator, PopoverTrigger, ProBadge, ProComponentWrapper, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, RadioItemWithLabel, RadioLabel, RichTextEditor, ScrollArea2 as ScrollArea, ScrollBar, ScrollReveal, ScrollRevealContainer, ScrollRevealItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SimpleColorPicker, SimpleEditor, SimpleTooltip, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonText, Slider, SwipeableCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle2 as Toggle, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, aspectRatioVariants, badgeVariants, buttonVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, badgeVariants as moonUIBadgeVariants, buttonVariants as moonUIButtonVariants, createSortableHeader as moonUICreateSortableHeader, skeletonVariants as moonUISkeletonVariants, toggleVariants as moonUIToggleVariants, popoverContentVariants, progressVariants, separatorVariants, skeletonVariants, toast, toggleVariants, tooltipVariants, useToast };
|
|
12750
|
+
//# sourceMappingURL=out.js.map
|
|
12115
12751
|
//# sourceMappingURL=index.mjs.map
|