@moontra/moonui 6.1.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -754,7 +754,7 @@ var buttonVariants = classVarianceAuthority.cva(
754
754
  "dark:bg-gray-800 dark:text-gray-100",
755
755
  "hover:bg-gray-200 dark:hover:bg-gray-700",
756
756
  "active:bg-gray-300 dark:active:bg-gray-600",
757
- "border border-gray-200 dark:border-gray-700",
757
+ "border border-input",
758
758
  "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
759
759
  "shadow-sm hover:shadow-md"
760
760
  ],
@@ -996,7 +996,26 @@ var springAnimations = {
996
996
  type: "spring",
997
997
  stiffness: 260,
998
998
  damping: 20
999
- }};
999
+ },
1000
+ // Bouncy spring for playful interactions
1001
+ bouncy: {
1002
+ type: "spring",
1003
+ stiffness: 300,
1004
+ damping: 15
1005
+ },
1006
+ // Stiff spring for quick responses
1007
+ stiff: {
1008
+ type: "spring",
1009
+ stiffness: 400,
1010
+ damping: 25
1011
+ },
1012
+ // Gentle spring for subtle movements
1013
+ gentle: {
1014
+ type: "spring",
1015
+ stiffness: 150,
1016
+ damping: 15
1017
+ }
1018
+ };
1000
1019
  var hoverAnimations = {
1001
1020
  lift: {
1002
1021
  y: -2,
@@ -1009,12 +1028,22 @@ var hoverAnimations = {
1009
1028
  glow: {
1010
1029
  boxShadow: "0 0 20px rgba(var(--primary), 0.3)",
1011
1030
  transition: springAnimations.smooth
1012
- }};
1031
+ },
1032
+ rotate: {
1033
+ rotate: 2,
1034
+ transition: springAnimations.bouncy
1035
+ }
1036
+ };
1013
1037
  var tapAnimations = {
1014
1038
  scale: {
1015
1039
  scale: 0.95,
1016
1040
  transition: { duration: 0.1 }
1017
- }};
1041
+ },
1042
+ depress: {
1043
+ y: 1,
1044
+ transition: { duration: 0.1 }
1045
+ }
1046
+ };
1018
1047
  var skeletonAnimation = {
1019
1048
  initial: { opacity: 0.5 },
1020
1049
  animate: {
@@ -1160,7 +1189,8 @@ function Calendar({
1160
1189
  setCurrentMonth(dateFns.addMonths(currentMonth, 1));
1161
1190
  };
1162
1191
  const handleDateClick = (date) => {
1163
- if (disabled?.(date)) return;
1192
+ if (disabled?.(date))
1193
+ return;
1164
1194
  if (mode === "single") {
1165
1195
  onSelect?.(date);
1166
1196
  } else if (mode === "range") {
@@ -1177,7 +1207,8 @@ function Calendar({
1177
1207
  }
1178
1208
  };
1179
1209
  const isDateSelected = (date) => {
1180
- if (!selected) return false;
1210
+ if (!selected)
1211
+ return false;
1181
1212
  if (mode === "single") {
1182
1213
  return dateFns.isSameDay(date, selected);
1183
1214
  } else if (mode === "range") {
@@ -1190,19 +1221,23 @@ function Calendar({
1190
1221
  return false;
1191
1222
  };
1192
1223
  const isRangeStart = (date) => {
1193
- if (mode !== "range" || !selected) return false;
1224
+ if (mode !== "range" || !selected)
1225
+ return false;
1194
1226
  const range = selected;
1195
1227
  return range.from ? dateFns.isSameDay(date, range.from) : false;
1196
1228
  };
1197
1229
  const isRangeEnd = (date) => {
1198
- if (mode !== "range" || !selected) return false;
1230
+ if (mode !== "range" || !selected)
1231
+ return false;
1199
1232
  const range = selected;
1200
1233
  return range.to ? dateFns.isSameDay(date, range.to) : false;
1201
1234
  };
1202
1235
  const isRangeMiddle = (date) => {
1203
- if (mode !== "range" || !selected) return false;
1236
+ if (mode !== "range" || !selected)
1237
+ return false;
1204
1238
  const range = selected;
1205
- if (!range.from || !range.to) return false;
1239
+ if (!range.from || !range.to)
1240
+ return false;
1206
1241
  return date > range.from && date < range.to;
1207
1242
  };
1208
1243
  const getDaysInMonth = () => {
@@ -1329,7 +1364,8 @@ var getCardType = (number) => {
1329
1364
  jcb: /^35/
1330
1365
  };
1331
1366
  for (const [type, pattern] of Object.entries(patterns)) {
1332
- if (pattern.test(number)) return type;
1367
+ if (pattern.test(number))
1368
+ return type;
1333
1369
  }
1334
1370
  return "unknown";
1335
1371
  };
@@ -1339,8 +1375,10 @@ var formatCardNumber = (value, cardType) => {
1339
1375
  let formatted = "";
1340
1376
  let position = 0;
1341
1377
  for (const group of groups) {
1342
- if (position >= cleaned.length) break;
1343
- if (formatted) formatted += " ";
1378
+ if (position >= cleaned.length)
1379
+ break;
1380
+ if (formatted)
1381
+ formatted += " ";
1344
1382
  formatted += cleaned.slice(position, position + group);
1345
1383
  position += group;
1346
1384
  }
@@ -1522,7 +1560,8 @@ var Carousel = React24__namespace.forwardRef(
1522
1560
  const [canScrollPrev, setCanScrollPrev] = React24__namespace.useState(false);
1523
1561
  const [canScrollNext, setCanScrollNext] = React24__namespace.useState(false);
1524
1562
  const onSelect = React24__namespace.useCallback((emblaApi) => {
1525
- if (!emblaApi) return;
1563
+ if (!emblaApi)
1564
+ return;
1526
1565
  setCanScrollPrev(emblaApi.canScrollPrev());
1527
1566
  setCanScrollNext(emblaApi.canScrollNext());
1528
1567
  }, []);
@@ -1547,11 +1586,13 @@ var Carousel = React24__namespace.forwardRef(
1547
1586
  [resolvedOrientation, scrollPrev, scrollNext]
1548
1587
  );
1549
1588
  React24__namespace.useEffect(() => {
1550
- if (!api || !setApi) return;
1589
+ if (!api || !setApi)
1590
+ return;
1551
1591
  setApi(api);
1552
1592
  }, [api, setApi]);
1553
1593
  React24__namespace.useEffect(() => {
1554
- if (!api) return;
1594
+ if (!api)
1595
+ return;
1555
1596
  onSelect(api);
1556
1597
  api.on("reInit", onSelect);
1557
1598
  api.on("select", onSelect);
@@ -1937,7 +1978,7 @@ var inputWrapperVariants = classVarianceAuthority.cva(
1937
1978
  var inputVariants = classVarianceAuthority.cva(
1938
1979
  [
1939
1980
  "w-full bg-background transition-all duration-200",
1940
- "text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500",
1981
+ "text-foreground placeholder:text-muted-foreground",
1941
1982
  "disabled:cursor-not-allowed disabled:opacity-50",
1942
1983
  "file:border-0 file:bg-transparent file:font-medium",
1943
1984
  "focus-visible:outline-none dark:text-gray-200"
@@ -1945,10 +1986,10 @@ var inputVariants = classVarianceAuthority.cva(
1945
1986
  {
1946
1987
  variants: {
1947
1988
  variant: {
1948
- 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",
1989
+ standard: "border border-input rounded-md px-3 py-2 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",
1949
1990
  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",
1950
- 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",
1951
- 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"
1991
+ ghost: "border-none bg-transparent shadow-none px-1 dark:text-gray-300 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
1992
+ underline: "border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 py-2 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"
1952
1993
  },
1953
1994
  size: {
1954
1995
  sm: "h-8 text-xs",
@@ -2512,9 +2553,11 @@ var Slider = React24__namespace.forwardRef(({
2512
2553
  }
2513
2554
  };
2514
2555
  const handleTrackClick = (event) => {
2515
- if (disabled) return;
2556
+ if (disabled)
2557
+ return;
2516
2558
  const track = trackRef.current;
2517
- if (!track) return;
2559
+ if (!track)
2560
+ return;
2518
2561
  const rect = track.getBoundingClientRect();
2519
2562
  const percent = (event.clientX - rect.left) / rect.width;
2520
2563
  const rawValue = min + percent * (max - min);
@@ -2525,11 +2568,13 @@ var Slider = React24__namespace.forwardRef(({
2525
2568
  handleValueChange(newValues);
2526
2569
  };
2527
2570
  const handleThumbMouseDown = (index) => (event) => {
2528
- if (disabled) return;
2571
+ if (disabled)
2572
+ return;
2529
2573
  event.preventDefault();
2530
2574
  const handleMouseMove = (moveEvent) => {
2531
2575
  const track = trackRef.current;
2532
- if (!track) return;
2576
+ if (!track)
2577
+ return;
2533
2578
  const rect = track.getBoundingClientRect();
2534
2579
  const percent = (moveEvent.clientX - rect.left) / rect.width;
2535
2580
  const rawValue = min + percent * (max - min);
@@ -2547,7 +2592,8 @@ var Slider = React24__namespace.forwardRef(({
2547
2592
  document.addEventListener("mouseup", handleMouseUp);
2548
2593
  };
2549
2594
  const handleThumbKeyDown = (index) => (event) => {
2550
- if (disabled) return;
2595
+ if (disabled)
2596
+ return;
2551
2597
  const largeStep = step * 10;
2552
2598
  const current = sliderValue[index];
2553
2599
  let next;
@@ -2684,7 +2730,8 @@ function rgbToHex(r, g, b) {
2684
2730
  }
2685
2731
  function hexToHsl(hex) {
2686
2732
  const rgb = hexToRgb(hex);
2687
- if (!rgb) return null;
2733
+ if (!rgb)
2734
+ return null;
2688
2735
  const r = rgb.r / 255;
2689
2736
  const g = rgb.g / 255;
2690
2737
  const b = rgb.b / 255;
@@ -2723,11 +2770,16 @@ function hslToHex(h, s, l) {
2723
2770
  r = g = b = l;
2724
2771
  } else {
2725
2772
  const hue2rgb = (p2, q2, t) => {
2726
- if (t < 0) t += 1;
2727
- if (t > 1) t -= 1;
2728
- if (t < 1 / 6) return p2 + (q2 - p2) * 6 * t;
2729
- if (t < 1 / 2) return q2;
2730
- if (t < 2 / 3) return p2 + (q2 - p2) * (2 / 3 - t) * 6;
2773
+ if (t < 0)
2774
+ t += 1;
2775
+ if (t > 1)
2776
+ t -= 1;
2777
+ if (t < 1 / 6)
2778
+ return p2 + (q2 - p2) * 6 * t;
2779
+ if (t < 1 / 2)
2780
+ return q2;
2781
+ if (t < 2 / 3)
2782
+ return p2 + (q2 - p2) * (2 / 3 - t) * 6;
2731
2783
  return p2;
2732
2784
  };
2733
2785
  const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
@@ -2844,8 +2896,10 @@ function ColorPicker({
2844
2896
  }
2845
2897
  };
2846
2898
  const formatDisplay = () => {
2847
- if (format4 === "rgb") return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
2848
- if (format4 === "hsl") return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
2899
+ if (format4 === "rgb")
2900
+ return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
2901
+ if (format4 === "hsl")
2902
+ return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
2849
2903
  return color;
2850
2904
  };
2851
2905
  return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
@@ -3719,7 +3773,8 @@ TableRow.displayName = "TableRow";
3719
3773
  var TableHead = React24__namespace.forwardRef(
3720
3774
  ({ className, sortable, sorted, onSort, align = "left", children, ...props }, ref) => {
3721
3775
  const renderSortIcon = () => {
3722
- if (!sortable) return null;
3776
+ if (!sortable)
3777
+ return null;
3723
3778
  if (sorted === "asc") {
3724
3779
  return /* @__PURE__ */ jsxRuntime.jsx(
3725
3780
  "svg",
@@ -4048,10 +4103,14 @@ var DatePicker = React24__namespace.forwardRef(function DatePicker2({
4048
4103
  handleSelect(today);
4049
4104
  };
4050
4105
  const isDateDisabled = (date) => {
4051
- if (minDate && date < minDate) return true;
4052
- if (maxDate && date > maxDate) return true;
4053
- if (disabledDates?.some((d) => d.toDateString() === date.toDateString())) return true;
4054
- if (disabledDaysOfWeek?.includes(date.getDay())) return true;
4106
+ if (minDate && date < minDate)
4107
+ return true;
4108
+ if (maxDate && date > maxDate)
4109
+ return true;
4110
+ if (disabledDates?.some((d) => d.toDateString() === date.toDateString()))
4111
+ return true;
4112
+ if (disabledDaysOfWeek?.includes(date.getDay()))
4113
+ return true;
4055
4114
  return false;
4056
4115
  };
4057
4116
  const displayValue = internalDate && dateFns.isValid(internalDate) ? dateFns.format(internalDate, formatString) : null;
@@ -4194,7 +4253,8 @@ var DateRangePicker = React24__namespace.forwardRef(function DateRangePicker2({
4194
4253
  }
4195
4254
  };
4196
4255
  const displayValue = React24__namespace.useMemo(() => {
4197
- if (!internalRange?.from) return null;
4256
+ if (!internalRange?.from)
4257
+ return null;
4198
4258
  if (!internalRange?.to) {
4199
4259
  return dateFns.format(internalRange.from, formatString);
4200
4260
  }
@@ -4438,7 +4498,8 @@ function DraggableList({
4438
4498
  }) {
4439
4499
  const [draggedIndex, setDraggedIndex] = React24__namespace.useState(null);
4440
4500
  const handleDragStart = (e, index) => {
4441
- if (disabled) return;
4501
+ if (disabled)
4502
+ return;
4442
4503
  setDraggedIndex(index);
4443
4504
  e.dataTransfer.effectAllowed = "move";
4444
4505
  };
@@ -4732,14 +4793,19 @@ var Progress = React24__namespace.forwardRef(({
4732
4793
  });
4733
4794
  Progress.displayName = "Progress";
4734
4795
  var getFileIcon = (type) => {
4735
- if (type.startsWith("image/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Image, { className: "h-4 w-4" });
4736
- if (type.startsWith("video/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Video, { className: "h-4 w-4" });
4737
- if (type.startsWith("audio/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Music, { className: "h-4 w-4" });
4738
- if (type.includes("text") || type.includes("document")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-4 w-4" });
4796
+ if (type.startsWith("image/"))
4797
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Image, { className: "h-4 w-4" });
4798
+ if (type.startsWith("video/"))
4799
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Video, { className: "h-4 w-4" });
4800
+ if (type.startsWith("audio/"))
4801
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Music, { className: "h-4 w-4" });
4802
+ if (type.includes("text") || type.includes("document"))
4803
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-4 w-4" });
4739
4804
  return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.File, { className: "h-4 w-4" });
4740
4805
  };
4741
4806
  var formatFileSize = (bytes) => {
4742
- if (bytes === 0) return "0 Bytes";
4807
+ if (bytes === 0)
4808
+ return "0 Bytes";
4743
4809
  const k = 1024;
4744
4810
  const sizes = ["Bytes", "KB", "MB", "GB"];
4745
4811
  const i = Math.floor(Math.log(bytes) / Math.log(k));
@@ -4900,7 +4966,8 @@ var FileUpload = React24__namespace.default.forwardRef(
4900
4966
  const handleDrop = React24.useCallback((e) => {
4901
4967
  e.preventDefault();
4902
4968
  setIsDragOver(false);
4903
- if (disabled) return;
4969
+ if (disabled)
4970
+ return;
4904
4971
  const files = e.dataTransfer.files;
4905
4972
  if (files.length > 0) {
4906
4973
  processFiles(files);
@@ -5042,7 +5109,8 @@ var GestureDrawer = React24__namespace.default.forwardRef(
5042
5109
  const motionValue = isVertical ? y : x;
5043
5110
  const opacity = framerMotion.useTransform(motionValue, [0, threshold], [1, 0.5]);
5044
5111
  const handleDragEnd = (event, info) => {
5045
- if (!enableSwipeToClose) return;
5112
+ if (!enableSwipeToClose)
5113
+ return;
5046
5114
  const offset = isVertical ? info.offset.y : info.offset.x;
5047
5115
  const velocity = isVertical ? info.velocity.y : info.velocity.x;
5048
5116
  let shouldClose = false;
@@ -5083,7 +5151,8 @@ var GestureDrawer = React24__namespace.default.forwardRef(
5083
5151
  const getAnimatePosition = () => {
5084
5152
  return isVertical ? { y: 0 } : { x: 0 };
5085
5153
  };
5086
- if (!isOpen) return null;
5154
+ if (!isOpen)
5155
+ return null;
5087
5156
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50", children: [
5088
5157
  /* @__PURE__ */ jsxRuntime.jsx(
5089
5158
  framerMotion.motion.div,
@@ -5375,7 +5444,8 @@ function LockedComponent({
5375
5444
  const [isPreviewActive, setIsPreviewActive] = React24.useState(false);
5376
5445
  const [previewTimeout, setPreviewTimeout] = React24.useState(null);
5377
5446
  const handleMouseEnter = () => {
5378
- if (!showPreview) return;
5447
+ if (!showPreview)
5448
+ return;
5379
5449
  setIsPreviewActive(true);
5380
5450
  if (previewTimeout) {
5381
5451
  clearTimeout(previewTimeout);
@@ -5481,6 +5551,7 @@ function ProComponentWrapper({
5481
5551
  nodeEnv: process.env.NODE_ENV === "development",
5482
5552
  nextPublicEnv: process.env.NEXT_PUBLIC_VERCEL_ENV === "development",
5483
5553
  localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
5554
+ port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080"),
5484
5555
  vercelEnv: !process.env.VERCEL,
5485
5556
  ciEnv: !process.env.CI,
5486
5557
  deploymentEnv: !process.env.DEPLOYMENT_ENV
@@ -5561,7 +5632,9 @@ function ProComponentWrapper({
5561
5632
  const isDevelopment = () => {
5562
5633
  const checks = {
5563
5634
  nodeEnv: process.env.NODE_ENV === "development",
5564
- localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local"))};
5635
+ localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
5636
+ port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080")
5637
+ };
5565
5638
  if (process.env.VERCEL || process.env.NETLIFY || process.env.RENDER || process.env.RAILWAY_ENVIRONMENT || process.env.FLY_APP_NAME) {
5566
5639
  return false;
5567
5640
  }
@@ -5916,7 +5989,7 @@ var SelectContent = React24__namespace.forwardRef(({ className, children, positi
5916
5989
  className: cn(
5917
5990
  [
5918
5991
  "relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
5919
- "rounded-md border border-gray-200 dark:border-gray-700",
5992
+ "rounded-md border border-input",
5920
5993
  "bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200",
5921
5994
  "shadow-lg dark:shadow-gray-900/20",
5922
5995
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
@@ -6026,22 +6099,30 @@ var formatPhoneNumber = (value, countryCode) => {
6026
6099
  const cleaned = value.replace(/\D/g, "");
6027
6100
  switch (countryCode) {
6028
6101
  case "+1":
6029
- if (cleaned.length <= 3) return cleaned;
6030
- if (cleaned.length <= 6) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
6102
+ if (cleaned.length <= 3)
6103
+ return cleaned;
6104
+ if (cleaned.length <= 6)
6105
+ return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
6031
6106
  return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)}-${cleaned.slice(6, 10)}`;
6032
6107
  case "+44":
6033
- if (cleaned.length <= 4) return cleaned;
6034
- if (cleaned.length <= 7) return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
6108
+ if (cleaned.length <= 4)
6109
+ return cleaned;
6110
+ if (cleaned.length <= 7)
6111
+ return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
6035
6112
  return `${cleaned.slice(0, 4)} ${cleaned.slice(4, 7)} ${cleaned.slice(7, 11)}`;
6036
6113
  case "+90":
6037
- if (cleaned.length <= 3) return cleaned;
6038
- if (cleaned.length <= 6) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
6039
- if (cleaned.length <= 9) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
6114
+ if (cleaned.length <= 3)
6115
+ return cleaned;
6116
+ if (cleaned.length <= 6)
6117
+ return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
6118
+ if (cleaned.length <= 9)
6119
+ return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
6040
6120
  return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8, 10)}`;
6041
6121
  default:
6042
6122
  let formatted = "";
6043
6123
  for (let i = 0; i < cleaned.length; i++) {
6044
- if (i > 0 && i % 3 === 0) formatted += " ";
6124
+ if (i > 0 && i % 3 === 0)
6125
+ formatted += " ";
6045
6126
  formatted += cleaned[i];
6046
6127
  }
6047
6128
  return formatted;
@@ -6051,13 +6132,10 @@ var getMaxLength = (countryCode) => {
6051
6132
  switch (countryCode) {
6052
6133
  case "+1":
6053
6134
  return 10;
6054
- // US/Canada
6055
6135
  case "+44":
6056
6136
  return 11;
6057
- // UK
6058
6137
  case "+90":
6059
6138
  return 10;
6060
- // Turkey
6061
6139
  default:
6062
6140
  return 15;
6063
6141
  }
@@ -6433,7 +6511,8 @@ var ScrollReveal = React24__namespace.forwardRef(
6433
6511
  }, ref) => {
6434
6512
  const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
6435
6513
  const animationVariants = React24__namespace.useMemo(() => {
6436
- if (variants) return variants;
6514
+ if (variants)
6515
+ return variants;
6437
6516
  return createDefaultVariants(direction, distance);
6438
6517
  }, [direction, distance, variants]);
6439
6518
  const transition = React24__namespace.useMemo(() => ({
@@ -6532,7 +6611,8 @@ var ScrollRevealItem = React24__namespace.forwardRef(
6532
6611
  id
6533
6612
  }, ref) => {
6534
6613
  const animationVariants = React24__namespace.useMemo(() => {
6535
- if (variants) return variants;
6614
+ if (variants)
6615
+ return variants;
6536
6616
  return createDefaultVariants(direction, distance);
6537
6617
  }, [direction, distance, variants]);
6538
6618
  const transition = React24__namespace.useMemo(() => ({
@@ -6857,7 +6937,7 @@ var SimpleEditor = React24__namespace.default.forwardRef(
6857
6937
  const [content, setContent] = React24.useState(value);
6858
6938
  const [isPreview, setIsPreview] = React24.useState(false);
6859
6939
  const [sourceContent, setSourceContent] = React24.useState(value);
6860
- const [selection, setSelection] = React24.useState(null);
6940
+ React24.useState(null);
6861
6941
  const editorRef = React24__namespace.default.useRef(null);
6862
6942
  const sourceRef = React24__namespace.default.useRef(null);
6863
6943
  const [formatState, setFormatState] = React24.useState({
@@ -6886,7 +6966,8 @@ var SimpleEditor = React24__namespace.default.forwardRef(
6886
6966
  return null;
6887
6967
  }, []);
6888
6968
  React24.useCallback((range) => {
6889
- if (!range) return;
6969
+ if (!range)
6970
+ return;
6890
6971
  const selection2 = window.getSelection();
6891
6972
  if (selection2) {
6892
6973
  selection2.removeAllRanges();
@@ -6894,7 +6975,8 @@ var SimpleEditor = React24__namespace.default.forwardRef(
6894
6975
  }
6895
6976
  }, []);
6896
6977
  const executeCommand = React24.useCallback((command, value2) => {
6897
- if (disabled) return;
6978
+ if (disabled)
6979
+ return;
6898
6980
  if (editorRef.current) {
6899
6981
  editorRef.current.focus();
6900
6982
  }
@@ -7637,16 +7719,19 @@ var SwipeableCard = React24__namespace.forwardRef(
7637
7719
  const [currentX, setCurrentX] = React24__namespace.useState(0);
7638
7720
  const [isSwiping, setIsSwiping] = React24__namespace.useState(false);
7639
7721
  const handleTouchStart = (e) => {
7640
- if (disabled) return;
7722
+ if (disabled)
7723
+ return;
7641
7724
  setStartX(e.touches[0].clientX);
7642
7725
  setIsSwiping(true);
7643
7726
  };
7644
7727
  const handleTouchMove = (e) => {
7645
- if (disabled || !isSwiping) return;
7728
+ if (disabled || !isSwiping)
7729
+ return;
7646
7730
  setCurrentX(e.touches[0].clientX);
7647
7731
  };
7648
7732
  const handleTouchEnd = () => {
7649
- if (disabled || !isSwiping) return;
7733
+ if (disabled || !isSwiping)
7734
+ return;
7650
7735
  const deltaX = currentX - startX;
7651
7736
  if (Math.abs(deltaX) > threshold) {
7652
7737
  if (deltaX > 0 && onSwipeRight) {
@@ -7786,7 +7871,8 @@ var TagsInput = React24__namespace.forwardRef(
7786
7871
  const tagButtonRefs = React24__namespace.useRef([]);
7787
7872
  const errorId = React24__namespace.useId();
7788
7873
  const focusTag = (index) => {
7789
- if (value.length === 0) return;
7874
+ if (value.length === 0)
7875
+ return;
7790
7876
  const clamped = Math.max(0, Math.min(value.length - 1, index));
7791
7877
  tagButtonRefs.current[clamped]?.focus();
7792
7878
  };
@@ -7809,8 +7895,10 @@ var TagsInput = React24__namespace.forwardRef(
7809
7895
  break;
7810
7896
  case "ArrowRight":
7811
7897
  e.preventDefault();
7812
- if (index >= value.length - 1) innerInputRef.current?.focus();
7813
- else focusTag(index + 1);
7898
+ if (index >= value.length - 1)
7899
+ innerInputRef.current?.focus();
7900
+ else
7901
+ focusTag(index + 1);
7814
7902
  break;
7815
7903
  case "Home":
7816
7904
  e.preventDefault();
@@ -7826,8 +7914,10 @@ var TagsInput = React24__namespace.forwardRef(
7826
7914
  const remaining = value.length - 1;
7827
7915
  removeTag(index);
7828
7916
  requestAnimationFrame(() => {
7829
- if (remaining > 0) focusTag(Math.min(index, remaining - 1));
7830
- else innerInputRef.current?.focus();
7917
+ if (remaining > 0)
7918
+ focusTag(Math.min(index, remaining - 1));
7919
+ else
7920
+ innerInputRef.current?.focus();
7831
7921
  });
7832
7922
  break;
7833
7923
  }
@@ -7835,7 +7925,8 @@ var TagsInput = React24__namespace.forwardRef(
7835
7925
  };
7836
7926
  const addTag = () => {
7837
7927
  const tag = inputValue.trim();
7838
- if (!tag) return;
7928
+ if (!tag)
7929
+ return;
7839
7930
  if (!allowDuplicates && value.includes(tag)) {
7840
7931
  setError("This tag already exists");
7841
7932
  setTimeout(() => setError(""), 2e3);
@@ -7851,7 +7942,8 @@ var TagsInput = React24__namespace.forwardRef(
7851
7942
  setError("");
7852
7943
  };
7853
7944
  const removeTag = (index) => {
7854
- if (disabled) return;
7945
+ if (disabled)
7946
+ return;
7855
7947
  onChange(value.filter((_, i) => i !== index));
7856
7948
  };
7857
7949
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
@@ -7918,7 +8010,7 @@ TagsInput.displayName = "TagsInput";
7918
8010
  var textareaVariants = classVarianceAuthority.cva(
7919
8011
  [
7920
8012
  "flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200",
7921
- "text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500",
8013
+ "text-foreground placeholder:text-muted-foreground",
7922
8014
  "disabled:cursor-not-allowed disabled:opacity-50",
7923
8015
  "focus-visible:outline-none dark:text-gray-200",
7924
8016
  "resize-none"
@@ -7927,10 +8019,10 @@ var textareaVariants = classVarianceAuthority.cva(
7927
8019
  {
7928
8020
  variants: {
7929
8021
  variant: {
7930
- 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",
7931
- 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",
8022
+ default: "border border-input bg-background dark:bg-gray-800/80 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",
8023
+ outline: "border-2 border-input bg-transparent focus-visible:border-primary dark:focus-visible:border-primary/80",
7932
8024
  ghost: "border-none bg-transparent hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
7933
- 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"
8025
+ underline: "border-t-0 border-l-0 border-r-0 border-b-2 border-input rounded-none px-0 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"
7934
8026
  },
7935
8027
  size: {
7936
8028
  sm: "min-h-[60px] text-xs",
@@ -7981,7 +8073,8 @@ var Textarea = React24__namespace.forwardRef(
7981
8073
  React24__namespace.useImperativeHandle(ref, () => textareaRef.current);
7982
8074
  const adjustHeight = React24__namespace.useCallback(() => {
7983
8075
  const textarea = textareaRef.current;
7984
- if (!textarea || !autoResize) return;
8076
+ if (!textarea || !autoResize)
8077
+ return;
7985
8078
  textarea.style.height = "auto";
7986
8079
  const newHeight = textarea.scrollHeight;
7987
8080
  if (maxHeight && newHeight > maxHeight) {
@@ -8235,7 +8328,8 @@ function toast({ ...props }) {
8235
8328
  id,
8236
8329
  open: true,
8237
8330
  onOpenChange: (open) => {
8238
- if (!open) dismiss();
8331
+ if (!open)
8332
+ dismiss();
8239
8333
  }
8240
8334
  }
8241
8335
  });
@@ -8361,15 +8455,18 @@ var Rating = React24__namespace.forwardRef(
8361
8455
  const displayValue = hoverValue !== null ? hoverValue : currentValue;
8362
8456
  const commit = React24__namespace.useCallback(
8363
8457
  (next) => {
8364
- if (readOnly) return;
8365
- if (!isControlled) setInternalValue(next);
8458
+ if (readOnly)
8459
+ return;
8460
+ if (!isControlled)
8461
+ setInternalValue(next);
8366
8462
  onValueChange?.(next);
8367
8463
  },
8368
8464
  [readOnly, isControlled, onValueChange]
8369
8465
  );
8370
8466
  const handleKeyDown = React24__namespace.useCallback(
8371
8467
  (event) => {
8372
- if (readOnly) return;
8468
+ if (readOnly)
8469
+ return;
8373
8470
  let next = null;
8374
8471
  switch (event.key) {
8375
8472
  case "ArrowRight":
@@ -8677,27 +8774,27 @@ var ToggleGroupItem = React24__namespace.forwardRef(({ className, children, vari
8677
8774
  });
8678
8775
  ToggleGroupItem.displayName = "ToggleGroupItem";
8679
8776
 
8680
- Object.defineProperty(exports, "Palette", {
8777
+ Object.defineProperty(exports, 'Palette', {
8681
8778
  enumerable: true,
8682
8779
  get: function () { return lucideReact.Palette; }
8683
8780
  });
8684
- Object.defineProperty(exports, "Pipette", {
8781
+ Object.defineProperty(exports, 'Pipette', {
8685
8782
  enumerable: true,
8686
8783
  get: function () { return lucideReact.Pipette; }
8687
8784
  });
8688
- Object.defineProperty(exports, "format", {
8785
+ Object.defineProperty(exports, 'format', {
8689
8786
  enumerable: true,
8690
8787
  get: function () { return dateFns.format; }
8691
8788
  });
8692
- Object.defineProperty(exports, "REGEXP_ONLY_CHARS", {
8789
+ Object.defineProperty(exports, 'REGEXP_ONLY_CHARS', {
8693
8790
  enumerable: true,
8694
8791
  get: function () { return inputOtp.REGEXP_ONLY_CHARS; }
8695
8792
  });
8696
- Object.defineProperty(exports, "REGEXP_ONLY_DIGITS", {
8793
+ Object.defineProperty(exports, 'REGEXP_ONLY_DIGITS', {
8697
8794
  enumerable: true,
8698
8795
  get: function () { return inputOtp.REGEXP_ONLY_DIGITS; }
8699
8796
  });
8700
- Object.defineProperty(exports, "REGEXP_ONLY_DIGITS_AND_CHARS", {
8797
+ Object.defineProperty(exports, 'REGEXP_ONLY_DIGITS_AND_CHARS', {
8701
8798
  enumerable: true,
8702
8799
  get: function () { return inputOtp.REGEXP_ONLY_DIGITS_AND_CHARS; }
8703
8800
  });
@@ -9091,5 +9188,5 @@ exports.toggleVariants = toggleVariants;
9091
9188
  exports.tooltipVariants = tooltipVariants;
9092
9189
  exports.useCarousel = useCarousel;
9093
9190
  exports.useToast = useToast;
9094
- //# sourceMappingURL=index.js.map
9191
+ //# sourceMappingURL=out.js.map
9095
9192
  //# sourceMappingURL=index.js.map