@moontra/moonui 6.0.0 → 6.1.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.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  import * as React24 from 'react';
4
4
  import React24__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, ArrowLeft, ArrowRight, Minus, Search, Calendar as Calendar$1, Clock, ChevronLeft, ChevronRight, Circle, Upload, Dot, ChevronUp, Phone, Bold, Italic, Underline, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code, Link, Image, Palette, Undo, Redo, Edit, Eye, Copy, ArrowDown, ArrowUp, ArrowUpDown, CheckCircle, Star, GitFork, ExternalLink, Crown, Lock, Zap, Video, Music, FileText, File } from 'lucide-react';
6
+ import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, CreditCard, ArrowLeft, ArrowRight, Minus, Search, Calendar as Calendar$1, Clock, ChevronLeft, ChevronRight, Circle, Upload, Dot, ChevronUp, Phone, Bold, Italic, Underline, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code, Link, Image, Palette, Undo, Redo, Edit, Eye, CheckCircle, Star, Video, Music, FileText, File, Copy, ArrowDown, ArrowUp, ArrowUpDown, GitFork, ExternalLink, Crown, Lock, Zap } 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,7 +11,7 @@ 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, animate } from 'framer-motion';
14
- import { isValid, format, isSameMonth, isToday, subMonths, addMonths, isSameDay, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek } from 'date-fns';
14
+ import { isValid, format, isSameMonth, isToday, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek, subMonths, addMonths, isSameDay } from 'date-fns';
15
15
  export { format } from 'date-fns';
16
16
  import useEmblaCarousel from 'embla-carousel-react';
17
17
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
@@ -21,7 +21,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
21
21
  import * as TabsPrimitive from '@radix-ui/react-tabs';
22
22
  import { Command as Command$1 } from 'cmdk';
23
23
  import * as DialogPrimitive from '@radix-ui/react-dialog';
24
- import { useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel, flexRender } from '@tanstack/react-table';
24
+ import { useReactTable, getFilteredRowModel, getSortedRowModel, getPaginationRowModel, getCoreRowModel, flexRender } from '@tanstack/react-table';
25
25
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
26
26
  import { OTPInput, OTPInputContext } from 'input-otp';
27
27
  export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from 'input-otp';
@@ -958,26 +958,7 @@ var springAnimations = {
958
958
  type: "spring",
959
959
  stiffness: 260,
960
960
  damping: 20
961
- },
962
- // Bouncy spring for playful interactions
963
- bouncy: {
964
- type: "spring",
965
- stiffness: 300,
966
- damping: 15
967
- },
968
- // Stiff spring for quick responses
969
- stiff: {
970
- type: "spring",
971
- stiffness: 400,
972
- damping: 25
973
- },
974
- // Gentle spring for subtle movements
975
- gentle: {
976
- type: "spring",
977
- stiffness: 150,
978
- damping: 15
979
- }
980
- };
961
+ }};
981
962
  var hoverAnimations = {
982
963
  lift: {
983
964
  y: -2,
@@ -990,22 +971,12 @@ var hoverAnimations = {
990
971
  glow: {
991
972
  boxShadow: "0 0 20px rgba(var(--primary), 0.3)",
992
973
  transition: springAnimations.smooth
993
- },
994
- rotate: {
995
- rotate: 2,
996
- transition: springAnimations.bouncy
997
- }
998
- };
974
+ }};
999
975
  var tapAnimations = {
1000
976
  scale: {
1001
977
  scale: 0.95,
1002
978
  transition: { duration: 0.1 }
1003
- },
1004
- depress: {
1005
- y: 1,
1006
- transition: { duration: 0.1 }
1007
- }
1008
- };
979
+ }};
1009
980
  var skeletonAnimation = {
1010
981
  initial: { opacity: 0.5 },
1011
982
  animate: {
@@ -1151,8 +1122,7 @@ function Calendar({
1151
1122
  setCurrentMonth(addMonths(currentMonth, 1));
1152
1123
  };
1153
1124
  const handleDateClick = (date) => {
1154
- if (disabled?.(date))
1155
- return;
1125
+ if (disabled?.(date)) return;
1156
1126
  if (mode === "single") {
1157
1127
  onSelect?.(date);
1158
1128
  } else if (mode === "range") {
@@ -1169,8 +1139,7 @@ function Calendar({
1169
1139
  }
1170
1140
  };
1171
1141
  const isDateSelected = (date) => {
1172
- if (!selected)
1173
- return false;
1142
+ if (!selected) return false;
1174
1143
  if (mode === "single") {
1175
1144
  return isSameDay(date, selected);
1176
1145
  } else if (mode === "range") {
@@ -1183,23 +1152,19 @@ function Calendar({
1183
1152
  return false;
1184
1153
  };
1185
1154
  const isRangeStart = (date) => {
1186
- if (mode !== "range" || !selected)
1187
- return false;
1155
+ if (mode !== "range" || !selected) return false;
1188
1156
  const range = selected;
1189
1157
  return range.from ? isSameDay(date, range.from) : false;
1190
1158
  };
1191
1159
  const isRangeEnd = (date) => {
1192
- if (mode !== "range" || !selected)
1193
- return false;
1160
+ if (mode !== "range" || !selected) return false;
1194
1161
  const range = selected;
1195
1162
  return range.to ? isSameDay(date, range.to) : false;
1196
1163
  };
1197
1164
  const isRangeMiddle = (date) => {
1198
- if (mode !== "range" || !selected)
1199
- return false;
1165
+ if (mode !== "range" || !selected) return false;
1200
1166
  const range = selected;
1201
- if (!range.from || !range.to)
1202
- return false;
1167
+ if (!range.from || !range.to) return false;
1203
1168
  return date > range.from && date < range.to;
1204
1169
  };
1205
1170
  const getDaysInMonth = () => {
@@ -1326,8 +1291,7 @@ var getCardType = (number) => {
1326
1291
  jcb: /^35/
1327
1292
  };
1328
1293
  for (const [type, pattern] of Object.entries(patterns)) {
1329
- if (pattern.test(number))
1330
- return type;
1294
+ if (pattern.test(number)) return type;
1331
1295
  }
1332
1296
  return "unknown";
1333
1297
  };
@@ -1337,10 +1301,8 @@ var formatCardNumber = (value, cardType) => {
1337
1301
  let formatted = "";
1338
1302
  let position = 0;
1339
1303
  for (const group of groups) {
1340
- if (position >= cleaned.length)
1341
- break;
1342
- if (formatted)
1343
- formatted += " ";
1304
+ if (position >= cleaned.length) break;
1305
+ if (formatted) formatted += " ";
1344
1306
  formatted += cleaned.slice(position, position + group);
1345
1307
  position += group;
1346
1308
  }
@@ -1522,8 +1484,7 @@ var Carousel = React24.forwardRef(
1522
1484
  const [canScrollPrev, setCanScrollPrev] = React24.useState(false);
1523
1485
  const [canScrollNext, setCanScrollNext] = React24.useState(false);
1524
1486
  const onSelect = React24.useCallback((emblaApi) => {
1525
- if (!emblaApi)
1526
- return;
1487
+ if (!emblaApi) return;
1527
1488
  setCanScrollPrev(emblaApi.canScrollPrev());
1528
1489
  setCanScrollNext(emblaApi.canScrollNext());
1529
1490
  }, []);
@@ -1548,13 +1509,11 @@ var Carousel = React24.forwardRef(
1548
1509
  [resolvedOrientation, scrollPrev, scrollNext]
1549
1510
  );
1550
1511
  React24.useEffect(() => {
1551
- if (!api || !setApi)
1552
- return;
1512
+ if (!api || !setApi) return;
1553
1513
  setApi(api);
1554
1514
  }, [api, setApi]);
1555
1515
  React24.useEffect(() => {
1556
- if (!api)
1557
- return;
1516
+ if (!api) return;
1558
1517
  onSelect(api);
1559
1518
  api.on("reInit", onSelect);
1560
1519
  api.on("select", onSelect);
@@ -2515,11 +2474,9 @@ var Slider = React24.forwardRef(({
2515
2474
  }
2516
2475
  };
2517
2476
  const handleTrackClick = (event) => {
2518
- if (disabled)
2519
- return;
2477
+ if (disabled) return;
2520
2478
  const track = trackRef.current;
2521
- if (!track)
2522
- return;
2479
+ if (!track) return;
2523
2480
  const rect = track.getBoundingClientRect();
2524
2481
  const percent = (event.clientX - rect.left) / rect.width;
2525
2482
  const rawValue = min + percent * (max - min);
@@ -2530,13 +2487,11 @@ var Slider = React24.forwardRef(({
2530
2487
  handleValueChange(newValues);
2531
2488
  };
2532
2489
  const handleThumbMouseDown = (index) => (event) => {
2533
- if (disabled)
2534
- return;
2490
+ if (disabled) return;
2535
2491
  event.preventDefault();
2536
2492
  const handleMouseMove = (moveEvent) => {
2537
2493
  const track = trackRef.current;
2538
- if (!track)
2539
- return;
2494
+ if (!track) return;
2540
2495
  const rect = track.getBoundingClientRect();
2541
2496
  const percent = (moveEvent.clientX - rect.left) / rect.width;
2542
2497
  const rawValue = min + percent * (max - min);
@@ -2554,8 +2509,7 @@ var Slider = React24.forwardRef(({
2554
2509
  document.addEventListener("mouseup", handleMouseUp);
2555
2510
  };
2556
2511
  const handleThumbKeyDown = (index) => (event) => {
2557
- if (disabled)
2558
- return;
2512
+ if (disabled) return;
2559
2513
  const largeStep = step * 10;
2560
2514
  const current = sliderValue[index];
2561
2515
  let next;
@@ -2692,8 +2646,7 @@ function rgbToHex(r, g, b) {
2692
2646
  }
2693
2647
  function hexToHsl(hex) {
2694
2648
  const rgb = hexToRgb(hex);
2695
- if (!rgb)
2696
- return null;
2649
+ if (!rgb) return null;
2697
2650
  const r = rgb.r / 255;
2698
2651
  const g = rgb.g / 255;
2699
2652
  const b = rgb.b / 255;
@@ -2732,16 +2685,11 @@ function hslToHex(h, s, l) {
2732
2685
  r = g = b = l;
2733
2686
  } else {
2734
2687
  const hue2rgb = (p2, q2, t) => {
2735
- if (t < 0)
2736
- t += 1;
2737
- if (t > 1)
2738
- t -= 1;
2739
- if (t < 1 / 6)
2740
- return p2 + (q2 - p2) * 6 * t;
2741
- if (t < 1 / 2)
2742
- return q2;
2743
- if (t < 2 / 3)
2744
- return p2 + (q2 - p2) * (2 / 3 - t) * 6;
2688
+ if (t < 0) t += 1;
2689
+ if (t > 1) t -= 1;
2690
+ if (t < 1 / 6) return p2 + (q2 - p2) * 6 * t;
2691
+ if (t < 1 / 2) return q2;
2692
+ if (t < 2 / 3) return p2 + (q2 - p2) * (2 / 3 - t) * 6;
2745
2693
  return p2;
2746
2694
  };
2747
2695
  const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
@@ -2858,10 +2806,8 @@ function ColorPicker({
2858
2806
  }
2859
2807
  };
2860
2808
  const formatDisplay = () => {
2861
- if (format4 === "rgb")
2862
- return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
2863
- if (format4 === "hsl")
2864
- return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
2809
+ if (format4 === "rgb") return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
2810
+ if (format4 === "hsl") return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
2865
2811
  return color;
2866
2812
  };
2867
2813
  return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
@@ -3735,8 +3681,7 @@ TableRow.displayName = "TableRow";
3735
3681
  var TableHead = React24.forwardRef(
3736
3682
  ({ className, sortable, sorted, onSort, align = "left", children, ...props }, ref) => {
3737
3683
  const renderSortIcon = () => {
3738
- if (!sortable)
3739
- return null;
3684
+ if (!sortable) return null;
3740
3685
  if (sorted === "asc") {
3741
3686
  return /* @__PURE__ */ jsx(
3742
3687
  "svg",
@@ -4065,14 +4010,10 @@ var DatePicker = React24.forwardRef(function DatePicker2({
4065
4010
  handleSelect(today);
4066
4011
  };
4067
4012
  const isDateDisabled = (date) => {
4068
- if (minDate && date < minDate)
4069
- return true;
4070
- if (maxDate && date > maxDate)
4071
- return true;
4072
- if (disabledDates?.some((d) => d.toDateString() === date.toDateString()))
4073
- return true;
4074
- if (disabledDaysOfWeek?.includes(date.getDay()))
4075
- return true;
4013
+ if (minDate && date < minDate) return true;
4014
+ if (maxDate && date > maxDate) return true;
4015
+ if (disabledDates?.some((d) => d.toDateString() === date.toDateString())) return true;
4016
+ if (disabledDaysOfWeek?.includes(date.getDay())) return true;
4076
4017
  return false;
4077
4018
  };
4078
4019
  const displayValue = internalDate && isValid(internalDate) ? format(internalDate, formatString) : null;
@@ -4215,8 +4156,7 @@ var DateRangePicker = React24.forwardRef(function DateRangePicker2({
4215
4156
  }
4216
4157
  };
4217
4158
  const displayValue = React24.useMemo(() => {
4218
- if (!internalRange?.from)
4219
- return null;
4159
+ if (!internalRange?.from) return null;
4220
4160
  if (!internalRange?.to) {
4221
4161
  return format(internalRange.from, formatString);
4222
4162
  }
@@ -4460,8 +4400,7 @@ function DraggableList({
4460
4400
  }) {
4461
4401
  const [draggedIndex, setDraggedIndex] = React24.useState(null);
4462
4402
  const handleDragStart = (e, index) => {
4463
- if (disabled)
4464
- return;
4403
+ if (disabled) return;
4465
4404
  setDraggedIndex(index);
4466
4405
  e.dataTransfer.effectAllowed = "move";
4467
4406
  };
@@ -4755,19 +4694,14 @@ var Progress = React24.forwardRef(({
4755
4694
  });
4756
4695
  Progress.displayName = "Progress";
4757
4696
  var getFileIcon = (type) => {
4758
- if (type.startsWith("image/"))
4759
- return /* @__PURE__ */ jsx(Image, { className: "h-4 w-4" });
4760
- if (type.startsWith("video/"))
4761
- return /* @__PURE__ */ jsx(Video, { className: "h-4 w-4" });
4762
- if (type.startsWith("audio/"))
4763
- return /* @__PURE__ */ jsx(Music, { className: "h-4 w-4" });
4764
- if (type.includes("text") || type.includes("document"))
4765
- return /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" });
4697
+ if (type.startsWith("image/")) return /* @__PURE__ */ jsx(Image, { className: "h-4 w-4" });
4698
+ if (type.startsWith("video/")) return /* @__PURE__ */ jsx(Video, { className: "h-4 w-4" });
4699
+ if (type.startsWith("audio/")) return /* @__PURE__ */ jsx(Music, { className: "h-4 w-4" });
4700
+ if (type.includes("text") || type.includes("document")) return /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" });
4766
4701
  return /* @__PURE__ */ jsx(File, { className: "h-4 w-4" });
4767
4702
  };
4768
4703
  var formatFileSize = (bytes) => {
4769
- if (bytes === 0)
4770
- return "0 Bytes";
4704
+ if (bytes === 0) return "0 Bytes";
4771
4705
  const k = 1024;
4772
4706
  const sizes = ["Bytes", "KB", "MB", "GB"];
4773
4707
  const i = Math.floor(Math.log(bytes) / Math.log(k));
@@ -4928,8 +4862,7 @@ var FileUpload = React24__default.forwardRef(
4928
4862
  const handleDrop = useCallback((e) => {
4929
4863
  e.preventDefault();
4930
4864
  setIsDragOver(false);
4931
- if (disabled)
4932
- return;
4865
+ if (disabled) return;
4933
4866
  const files = e.dataTransfer.files;
4934
4867
  if (files.length > 0) {
4935
4868
  processFiles(files);
@@ -5071,8 +5004,7 @@ var GestureDrawer = React24__default.forwardRef(
5071
5004
  const motionValue = isVertical ? y : x;
5072
5005
  const opacity = useTransform(motionValue, [0, threshold], [1, 0.5]);
5073
5006
  const handleDragEnd = (event, info) => {
5074
- if (!enableSwipeToClose)
5075
- return;
5007
+ if (!enableSwipeToClose) return;
5076
5008
  const offset = isVertical ? info.offset.y : info.offset.x;
5077
5009
  const velocity = isVertical ? info.velocity.y : info.velocity.x;
5078
5010
  let shouldClose = false;
@@ -5113,8 +5045,7 @@ var GestureDrawer = React24__default.forwardRef(
5113
5045
  const getAnimatePosition = () => {
5114
5046
  return isVertical ? { y: 0 } : { x: 0 };
5115
5047
  };
5116
- if (!isOpen)
5117
- return null;
5048
+ if (!isOpen) return null;
5118
5049
  return /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-50", children: [
5119
5050
  /* @__PURE__ */ jsx(
5120
5051
  motion.div,
@@ -5406,8 +5337,7 @@ function LockedComponent({
5406
5337
  const [isPreviewActive, setIsPreviewActive] = useState(false);
5407
5338
  const [previewTimeout, setPreviewTimeout] = useState(null);
5408
5339
  const handleMouseEnter = () => {
5409
- if (!showPreview)
5410
- return;
5340
+ if (!showPreview) return;
5411
5341
  setIsPreviewActive(true);
5412
5342
  if (previewTimeout) {
5413
5343
  clearTimeout(previewTimeout);
@@ -5513,7 +5443,6 @@ function ProComponentWrapper({
5513
5443
  nodeEnv: process.env.NODE_ENV === "development",
5514
5444
  nextPublicEnv: process.env.NEXT_PUBLIC_VERCEL_ENV === "development",
5515
5445
  localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
5516
- port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080"),
5517
5446
  vercelEnv: !process.env.VERCEL,
5518
5447
  ciEnv: !process.env.CI,
5519
5448
  deploymentEnv: !process.env.DEPLOYMENT_ENV
@@ -5594,9 +5523,7 @@ function ProComponentWrapper({
5594
5523
  const isDevelopment = () => {
5595
5524
  const checks = {
5596
5525
  nodeEnv: process.env.NODE_ENV === "development",
5597
- localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
5598
- port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080")
5599
- };
5526
+ localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local"))};
5600
5527
  if (process.env.VERCEL || process.env.NETLIFY || process.env.RENDER || process.env.RAILWAY_ENVIRONMENT || process.env.FLY_APP_NAME) {
5601
5528
  return false;
5602
5529
  }
@@ -6061,30 +5988,22 @@ var formatPhoneNumber = (value, countryCode) => {
6061
5988
  const cleaned = value.replace(/\D/g, "");
6062
5989
  switch (countryCode) {
6063
5990
  case "+1":
6064
- if (cleaned.length <= 3)
6065
- return cleaned;
6066
- if (cleaned.length <= 6)
6067
- return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
5991
+ if (cleaned.length <= 3) return cleaned;
5992
+ if (cleaned.length <= 6) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
6068
5993
  return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)}-${cleaned.slice(6, 10)}`;
6069
5994
  case "+44":
6070
- if (cleaned.length <= 4)
6071
- return cleaned;
6072
- if (cleaned.length <= 7)
6073
- return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
5995
+ if (cleaned.length <= 4) return cleaned;
5996
+ if (cleaned.length <= 7) return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
6074
5997
  return `${cleaned.slice(0, 4)} ${cleaned.slice(4, 7)} ${cleaned.slice(7, 11)}`;
6075
5998
  case "+90":
6076
- if (cleaned.length <= 3)
6077
- return cleaned;
6078
- if (cleaned.length <= 6)
6079
- return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
6080
- if (cleaned.length <= 9)
6081
- return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
5999
+ if (cleaned.length <= 3) return cleaned;
6000
+ if (cleaned.length <= 6) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
6001
+ if (cleaned.length <= 9) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
6082
6002
  return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8, 10)}`;
6083
6003
  default:
6084
6004
  let formatted = "";
6085
6005
  for (let i = 0; i < cleaned.length; i++) {
6086
- if (i > 0 && i % 3 === 0)
6087
- formatted += " ";
6006
+ if (i > 0 && i % 3 === 0) formatted += " ";
6088
6007
  formatted += cleaned[i];
6089
6008
  }
6090
6009
  return formatted;
@@ -6094,10 +6013,13 @@ var getMaxLength = (countryCode) => {
6094
6013
  switch (countryCode) {
6095
6014
  case "+1":
6096
6015
  return 10;
6016
+ // US/Canada
6097
6017
  case "+44":
6098
6018
  return 11;
6019
+ // UK
6099
6020
  case "+90":
6100
6021
  return 10;
6022
+ // Turkey
6101
6023
  default:
6102
6024
  return 15;
6103
6025
  }
@@ -6473,8 +6395,7 @@ var ScrollReveal = React24.forwardRef(
6473
6395
  }, ref) => {
6474
6396
  const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
6475
6397
  const animationVariants = React24.useMemo(() => {
6476
- if (variants)
6477
- return variants;
6398
+ if (variants) return variants;
6478
6399
  return createDefaultVariants(direction, distance);
6479
6400
  }, [direction, distance, variants]);
6480
6401
  const transition = React24.useMemo(() => ({
@@ -6573,8 +6494,7 @@ var ScrollRevealItem = React24.forwardRef(
6573
6494
  id
6574
6495
  }, ref) => {
6575
6496
  const animationVariants = React24.useMemo(() => {
6576
- if (variants)
6577
- return variants;
6497
+ if (variants) return variants;
6578
6498
  return createDefaultVariants(direction, distance);
6579
6499
  }, [direction, distance, variants]);
6580
6500
  const transition = React24.useMemo(() => ({
@@ -6899,7 +6819,7 @@ var SimpleEditor = React24__default.forwardRef(
6899
6819
  const [content, setContent] = useState(value);
6900
6820
  const [isPreview, setIsPreview] = useState(false);
6901
6821
  const [sourceContent, setSourceContent] = useState(value);
6902
- useState(null);
6822
+ const [selection, setSelection] = useState(null);
6903
6823
  const editorRef = React24__default.useRef(null);
6904
6824
  const sourceRef = React24__default.useRef(null);
6905
6825
  const [formatState, setFormatState] = useState({
@@ -6928,8 +6848,7 @@ var SimpleEditor = React24__default.forwardRef(
6928
6848
  return null;
6929
6849
  }, []);
6930
6850
  useCallback((range) => {
6931
- if (!range)
6932
- return;
6851
+ if (!range) return;
6933
6852
  const selection2 = window.getSelection();
6934
6853
  if (selection2) {
6935
6854
  selection2.removeAllRanges();
@@ -6937,8 +6856,7 @@ var SimpleEditor = React24__default.forwardRef(
6937
6856
  }
6938
6857
  }, []);
6939
6858
  const executeCommand = useCallback((command, value2) => {
6940
- if (disabled)
6941
- return;
6859
+ if (disabled) return;
6942
6860
  if (editorRef.current) {
6943
6861
  editorRef.current.focus();
6944
6862
  }
@@ -7681,19 +7599,16 @@ var SwipeableCard = React24.forwardRef(
7681
7599
  const [currentX, setCurrentX] = React24.useState(0);
7682
7600
  const [isSwiping, setIsSwiping] = React24.useState(false);
7683
7601
  const handleTouchStart = (e) => {
7684
- if (disabled)
7685
- return;
7602
+ if (disabled) return;
7686
7603
  setStartX(e.touches[0].clientX);
7687
7604
  setIsSwiping(true);
7688
7605
  };
7689
7606
  const handleTouchMove = (e) => {
7690
- if (disabled || !isSwiping)
7691
- return;
7607
+ if (disabled || !isSwiping) return;
7692
7608
  setCurrentX(e.touches[0].clientX);
7693
7609
  };
7694
7610
  const handleTouchEnd = () => {
7695
- if (disabled || !isSwiping)
7696
- return;
7611
+ if (disabled || !isSwiping) return;
7697
7612
  const deltaX = currentX - startX;
7698
7613
  if (Math.abs(deltaX) > threshold) {
7699
7614
  if (deltaX > 0 && onSwipeRight) {
@@ -7833,8 +7748,7 @@ var TagsInput = React24.forwardRef(
7833
7748
  const tagButtonRefs = React24.useRef([]);
7834
7749
  const errorId = React24.useId();
7835
7750
  const focusTag = (index) => {
7836
- if (value.length === 0)
7837
- return;
7751
+ if (value.length === 0) return;
7838
7752
  const clamped = Math.max(0, Math.min(value.length - 1, index));
7839
7753
  tagButtonRefs.current[clamped]?.focus();
7840
7754
  };
@@ -7857,10 +7771,8 @@ var TagsInput = React24.forwardRef(
7857
7771
  break;
7858
7772
  case "ArrowRight":
7859
7773
  e.preventDefault();
7860
- if (index >= value.length - 1)
7861
- innerInputRef.current?.focus();
7862
- else
7863
- focusTag(index + 1);
7774
+ if (index >= value.length - 1) innerInputRef.current?.focus();
7775
+ else focusTag(index + 1);
7864
7776
  break;
7865
7777
  case "Home":
7866
7778
  e.preventDefault();
@@ -7876,10 +7788,8 @@ var TagsInput = React24.forwardRef(
7876
7788
  const remaining = value.length - 1;
7877
7789
  removeTag(index);
7878
7790
  requestAnimationFrame(() => {
7879
- if (remaining > 0)
7880
- focusTag(Math.min(index, remaining - 1));
7881
- else
7882
- innerInputRef.current?.focus();
7791
+ if (remaining > 0) focusTag(Math.min(index, remaining - 1));
7792
+ else innerInputRef.current?.focus();
7883
7793
  });
7884
7794
  break;
7885
7795
  }
@@ -7887,8 +7797,7 @@ var TagsInput = React24.forwardRef(
7887
7797
  };
7888
7798
  const addTag = () => {
7889
7799
  const tag = inputValue.trim();
7890
- if (!tag)
7891
- return;
7800
+ if (!tag) return;
7892
7801
  if (!allowDuplicates && value.includes(tag)) {
7893
7802
  setError("This tag already exists");
7894
7803
  setTimeout(() => setError(""), 2e3);
@@ -7904,8 +7813,7 @@ var TagsInput = React24.forwardRef(
7904
7813
  setError("");
7905
7814
  };
7906
7815
  const removeTag = (index) => {
7907
- if (disabled)
7908
- return;
7816
+ if (disabled) return;
7909
7817
  onChange(value.filter((_, i) => i !== index));
7910
7818
  };
7911
7819
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
@@ -8035,8 +7943,7 @@ var Textarea = React24.forwardRef(
8035
7943
  React24.useImperativeHandle(ref, () => textareaRef.current);
8036
7944
  const adjustHeight = React24.useCallback(() => {
8037
7945
  const textarea = textareaRef.current;
8038
- if (!textarea || !autoResize)
8039
- return;
7946
+ if (!textarea || !autoResize) return;
8040
7947
  textarea.style.height = "auto";
8041
7948
  const newHeight = textarea.scrollHeight;
8042
7949
  if (maxHeight && newHeight > maxHeight) {
@@ -8290,8 +8197,7 @@ function toast({ ...props }) {
8290
8197
  id,
8291
8198
  open: true,
8292
8199
  onOpenChange: (open) => {
8293
- if (!open)
8294
- dismiss();
8200
+ if (!open) dismiss();
8295
8201
  }
8296
8202
  }
8297
8203
  });
@@ -8417,18 +8323,15 @@ var Rating = React24.forwardRef(
8417
8323
  const displayValue = hoverValue !== null ? hoverValue : currentValue;
8418
8324
  const commit = React24.useCallback(
8419
8325
  (next) => {
8420
- if (readOnly)
8421
- return;
8422
- if (!isControlled)
8423
- setInternalValue(next);
8326
+ if (readOnly) return;
8327
+ if (!isControlled) setInternalValue(next);
8424
8328
  onValueChange?.(next);
8425
8329
  },
8426
8330
  [readOnly, isControlled, onValueChange]
8427
8331
  );
8428
8332
  const handleKeyDown = React24.useCallback(
8429
8333
  (event) => {
8430
- if (readOnly)
8431
- return;
8334
+ if (readOnly) return;
8432
8335
  let next = null;
8433
8336
  switch (event.key) {
8434
8337
  case "ArrowRight":
@@ -8737,5 +8640,5 @@ var ToggleGroupItem = React24.forwardRef(({ className, children, variant, size,
8737
8640
  ToggleGroupItem.displayName = "ToggleGroupItem";
8738
8641
 
8739
8642
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, Card, CardCVCInput, CardContent, CardDescription, CardExpiryInput, CardFooter, CardHeader, CardNumberInput, CardTitle, CardZipInput, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, Collapsible, CollapsibleContent, 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, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Kbd, 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, ButtonGroup as MoonUIButtonGroup, 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, Carousel as MoonUICarousel, CarouselContent as MoonUICarouselContent, CarouselItem as MoonUICarouselItem, CarouselNext as MoonUICarouselNext, CarouselPrevious as MoonUICarouselPrevious, Checkbox as MoonUICheckbox, CheckboxGroup as MoonUICheckboxGroup, CheckboxLabel as MoonUICheckboxLabel, CheckboxWithLabel as MoonUICheckboxWithLabel, Collapsible as MoonUICollapsible, CollapsibleContent as MoonUICollapsibleContent, CollapsibleTrigger 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, InputOTP as MoonUIInputOTP, InputOTPGroup as MoonUIInputOTPGroup, InputOTPSeparator as MoonUIInputOTPSeparator, InputOTPSlot as MoonUIInputOTPSlot, Kbd as MoonUIKbd, 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, Rating as MoonUIRating, RichTextEditor as MoonUIRichTextEditor, ScrollArea 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, Spinner as MoonUISpinner, 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, Toggle as MoonUIToggle, ToggleGroup as MoonUIToggleGroup, ToggleGroupItem as MoonUIToggleGroupItem, 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, Rating, RichTextEditor, 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, Spinner, SwipeableCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, aspectRatioVariants, badgeVariants, buttonGroupVariants, buttonVariants, carouselContentVariants, carouselItemVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, inputOTPSlotVariants, kbdVariants, badgeVariants as moonUIBadgeVariants, buttonGroupVariants as moonUIButtonGroupVariants, buttonVariants as moonUIButtonVariants, carouselContentVariants as moonUICarouselContentVariants, carouselItemVariants as moonUICarouselItemVariants, createSortableHeader as moonUICreateSortableHeader, inputOTPSlotVariants as moonUIInputOTPSlotVariants, kbdVariants as moonUIKbdVariants, ratingVariants as moonUIRatingVariants, skeletonVariants as moonUISkeletonVariants, spinnerVariants as moonUISpinnerVariants, toggleVariants as moonUIToggleVariants, popoverContentVariants, progressVariants, ratingVariants, separatorVariants, skeletonVariants, spinnerVariants, switchVariants, toast, toggleVariants, tooltipVariants, useCarousel, useToast };
8740
- //# sourceMappingURL=out.js.map
8643
+ //# sourceMappingURL=index.mjs.map
8741
8644
  //# sourceMappingURL=index.mjs.map