@moontra/moonui 2.3.8 → 2.3.10

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
@@ -966,26 +966,7 @@ var springAnimations = {
966
966
  type: "spring",
967
967
  stiffness: 260,
968
968
  damping: 20
969
- },
970
- // Bouncy spring for playful interactions
971
- bouncy: {
972
- type: "spring",
973
- stiffness: 300,
974
- damping: 15
975
- },
976
- // Stiff spring for quick responses
977
- stiff: {
978
- type: "spring",
979
- stiffness: 400,
980
- damping: 25
981
- },
982
- // Gentle spring for subtle movements
983
- gentle: {
984
- type: "spring",
985
- stiffness: 150,
986
- damping: 15
987
- }
988
- };
969
+ }};
989
970
  var hoverAnimations = {
990
971
  lift: {
991
972
  y: -2,
@@ -998,22 +979,12 @@ var hoverAnimations = {
998
979
  glow: {
999
980
  boxShadow: "0 0 20px rgba(var(--primary), 0.3)",
1000
981
  transition: springAnimations.smooth
1001
- },
1002
- rotate: {
1003
- rotate: 2,
1004
- transition: springAnimations.bouncy
1005
- }
1006
- };
982
+ }};
1007
983
  var tapAnimations = {
1008
984
  scale: {
1009
985
  scale: 0.95,
1010
986
  transition: { duration: 0.1 }
1011
- },
1012
- depress: {
1013
- y: 1,
1014
- transition: { duration: 0.1 }
1015
- }
1016
- };
987
+ }};
1017
988
  var skeletonAnimation = {
1018
989
  initial: { opacity: 0.5 },
1019
990
  animate: {
@@ -1138,8 +1109,7 @@ var getCardType = (number) => {
1138
1109
  jcb: /^35/
1139
1110
  };
1140
1111
  for (const [type, pattern] of Object.entries(patterns)) {
1141
- if (pattern.test(number))
1142
- return type;
1112
+ if (pattern.test(number)) return type;
1143
1113
  }
1144
1114
  return "unknown";
1145
1115
  };
@@ -1149,10 +1119,8 @@ var formatCardNumber = (value, cardType) => {
1149
1119
  let formatted = "";
1150
1120
  let position = 0;
1151
1121
  for (const group of groups) {
1152
- if (position >= cleaned.length)
1153
- break;
1154
- if (formatted)
1155
- formatted += " ";
1122
+ if (position >= cleaned.length) break;
1123
+ if (formatted) formatted += " ";
1156
1124
  formatted += cleaned.slice(position, position + group);
1157
1125
  position += group;
1158
1126
  }
@@ -1478,10 +1446,8 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
1478
1446
  function useContext22(consumerName, scope) {
1479
1447
  const Context = scope?.[scopeName]?.[index] || BaseContext;
1480
1448
  const context = t__namespace.useContext(Context);
1481
- if (context)
1482
- return context;
1483
- if (defaultContext !== void 0)
1484
- return defaultContext;
1449
+ if (context) return context;
1450
+ if (defaultContext !== void 0) return defaultContext;
1485
1451
  throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
1486
1452
  }
1487
1453
  return [Provider3, useContext22];
@@ -1503,8 +1469,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
1503
1469
  }
1504
1470
  function composeContextScopes(...scopes) {
1505
1471
  const baseScope = scopes[0];
1506
- if (scopes.length === 1)
1507
- return baseScope;
1472
+ if (scopes.length === 1) return baseScope;
1508
1473
  const createScope = () => {
1509
1474
  const scopeHooks = scopes.map((createScope2) => ({
1510
1475
  useScope: createScope2(),
@@ -1781,13 +1746,12 @@ var count = 0;
1781
1746
  function useId2(deterministicId) {
1782
1747
  const [id, setId] = t__namespace.useState(useReactId());
1783
1748
  useLayoutEffect2(() => {
1784
- if (!deterministicId)
1785
- setId((reactId) => reactId ?? String(count++));
1749
+ setId((reactId) => reactId ?? String(count++));
1786
1750
  }, [deterministicId]);
1787
1751
  return deterministicId || (id ? `radix-${id}` : "");
1788
1752
  }
1789
1753
  var COLLAPSIBLE_NAME = "Collapsible";
1790
- var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
1754
+ var [createCollapsibleContext] = createContextScope(COLLAPSIBLE_NAME);
1791
1755
  var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
1792
1756
  var Collapsible = t__namespace.forwardRef(
1793
1757
  (props, forwardedRef) => {
@@ -2531,11 +2495,9 @@ var Slider = t__namespace.forwardRef(({
2531
2495
  }
2532
2496
  };
2533
2497
  const handleTrackClick = (event) => {
2534
- if (disabled)
2535
- return;
2498
+ if (disabled) return;
2536
2499
  const track = trackRef.current;
2537
- if (!track)
2538
- return;
2500
+ if (!track) return;
2539
2501
  const rect = track.getBoundingClientRect();
2540
2502
  const percent = (event.clientX - rect.left) / rect.width;
2541
2503
  const rawValue = min2 + percent * (max2 - min2);
@@ -2546,13 +2508,11 @@ var Slider = t__namespace.forwardRef(({
2546
2508
  handleValueChange(newValues);
2547
2509
  };
2548
2510
  const handleThumbMouseDown = (index) => (event) => {
2549
- if (disabled)
2550
- return;
2511
+ if (disabled) return;
2551
2512
  event.preventDefault();
2552
2513
  const handleMouseMove = (moveEvent) => {
2553
2514
  const track = trackRef.current;
2554
- if (!track)
2555
- return;
2515
+ if (!track) return;
2556
2516
  const rect = track.getBoundingClientRect();
2557
2517
  const percent = (moveEvent.clientX - rect.left) / rect.width;
2558
2518
  const rawValue = min2 + percent * (max2 - min2);
@@ -2669,8 +2629,7 @@ function rgbToHex(r, g, b) {
2669
2629
  }
2670
2630
  function hexToHsl(hex) {
2671
2631
  const rgb = hexToRgb(hex);
2672
- if (!rgb)
2673
- return null;
2632
+ if (!rgb) return null;
2674
2633
  const r = rgb.r / 255;
2675
2634
  const g = rgb.g / 255;
2676
2635
  const b = rgb.b / 255;
@@ -2709,16 +2668,11 @@ function hslToHex(h, s, l) {
2709
2668
  r = g = b = l;
2710
2669
  } else {
2711
2670
  const hue2rgb = (p3, q2, t2) => {
2712
- if (t2 < 0)
2713
- t2 += 1;
2714
- if (t2 > 1)
2715
- t2 -= 1;
2716
- if (t2 < 1 / 6)
2717
- return p3 + (q2 - p3) * 6 * t2;
2718
- if (t2 < 1 / 2)
2719
- return q2;
2720
- if (t2 < 2 / 3)
2721
- return p3 + (q2 - p3) * (2 / 3 - t2) * 6;
2671
+ if (t2 < 0) t2 += 1;
2672
+ if (t2 > 1) t2 -= 1;
2673
+ if (t2 < 1 / 6) return p3 + (q2 - p3) * 6 * t2;
2674
+ if (t2 < 1 / 2) return q2;
2675
+ if (t2 < 2 / 3) return p3 + (q2 - p3) * (2 / 3 - t2) * 6;
2722
2676
  return p3;
2723
2677
  };
2724
2678
  const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
@@ -2835,10 +2789,8 @@ function ColorPicker({
2835
2789
  }
2836
2790
  };
2837
2791
  const formatDisplay = () => {
2838
- if (format4 === "rgb")
2839
- return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
2840
- if (format4 === "hsl")
2841
- return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
2792
+ if (format4 === "rgb") return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
2793
+ if (format4 === "hsl") return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
2842
2794
  return color;
2843
2795
  };
2844
2796
  return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
@@ -3255,13 +3207,10 @@ var B = /[\\\/_+.#"@\[\(\{&]/g;
3255
3207
  var K = /[\s-]/;
3256
3208
  var X2 = /[\s-]/g;
3257
3209
  function G(_, C, h, P2, A, f, O) {
3258
- if (f === C.length)
3259
- return A === _.length ? U : k;
3210
+ if (f === C.length) return A === _.length ? U : k;
3260
3211
  var T2 = `${A},${f}`;
3261
- if (O[T2] !== void 0)
3262
- return O[T2];
3263
- for (var L2 = P2.charAt(f), c = h.indexOf(L2, A), S = 0, E, N2, R, M; c >= 0; )
3264
- 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);
3212
+ if (O[T2] !== void 0) return O[T2];
3213
+ for (var L2 = P2.charAt(f), c = h.indexOf(L2, A), S = 0, E, N2, R, M; c >= 0; ) 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);
3265
3214
  return O[T2] = S, S;
3266
3215
  }
3267
3216
  function D(_) {
@@ -3270,88 +3219,6 @@ function D(_) {
3270
3219
  function W(_, C, h) {
3271
3220
  return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
3272
3221
  }
3273
- var NODES2 = [
3274
- "a",
3275
- "button",
3276
- "div",
3277
- "form",
3278
- "h2",
3279
- "h3",
3280
- "img",
3281
- "input",
3282
- "label",
3283
- "li",
3284
- "nav",
3285
- "ol",
3286
- "p",
3287
- "select",
3288
- "span",
3289
- "svg",
3290
- "ul"
3291
- ];
3292
- var Primitive2 = NODES2.reduce((primitive, node) => {
3293
- const Slot = reactSlot.createSlot(`Primitive.${node}`);
3294
- const Node = t__namespace.forwardRef((props, forwardedRef) => {
3295
- const { asChild, ...primitiveProps } = props;
3296
- const Comp = asChild ? Slot : node;
3297
- if (typeof window !== "undefined") {
3298
- window[Symbol.for("radix-ui")] = true;
3299
- }
3300
- return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
3301
- });
3302
- Node.displayName = `Primitive.${node}`;
3303
- return { ...primitive, [node]: Node };
3304
- }, {});
3305
- var useLayoutEffect22 = globalThis?.document ? t__namespace.useLayoutEffect : () => {
3306
- };
3307
-
3308
- // ../../node_modules/@radix-ui/react-id/dist/index.mjs
3309
- var useReactId2 = t__namespace[" useId ".trim().toString()] || (() => void 0);
3310
- var count2 = 0;
3311
- function useId3(deterministicId) {
3312
- const [id, setId] = t__namespace.useState(useReactId2());
3313
- useLayoutEffect22(() => {
3314
- if (!deterministicId)
3315
- setId((reactId) => reactId ?? String(count2++));
3316
- }, [deterministicId]);
3317
- return deterministicId || (id ? `radix-${id}` : "");
3318
- }
3319
- function setRef2(ref, value) {
3320
- if (typeof ref === "function") {
3321
- return ref(value);
3322
- } else if (ref !== null && ref !== void 0) {
3323
- ref.current = value;
3324
- }
3325
- }
3326
- function composeRefs2(...refs) {
3327
- return (node) => {
3328
- let hasCleanup = false;
3329
- const cleanups = refs.map((ref) => {
3330
- const cleanup = setRef2(ref, node);
3331
- if (!hasCleanup && typeof cleanup == "function") {
3332
- hasCleanup = true;
3333
- }
3334
- return cleanup;
3335
- });
3336
- if (hasCleanup) {
3337
- return () => {
3338
- for (let i = 0; i < cleanups.length; i++) {
3339
- const cleanup = cleanups[i];
3340
- if (typeof cleanup == "function") {
3341
- cleanup();
3342
- } else {
3343
- setRef2(refs[i], null);
3344
- }
3345
- }
3346
- };
3347
- }
3348
- };
3349
- }
3350
- function useComposedRefs2(...refs) {
3351
- return t__namespace.useCallback(composeRefs2(...refs), refs);
3352
- }
3353
-
3354
- // ../../node_modules/cmdk/dist/index.mjs
3355
3222
  var N = '[cmdk-group=""]';
3356
3223
  var Y2 = '[cmdk-group-items=""]';
3357
3224
  var be = '[cmdk-group-heading=""]';
@@ -3369,7 +3236,7 @@ var me = t__namespace.forwardRef((r, o) => {
3369
3236
  let n = L(() => {
3370
3237
  var e, a;
3371
3238
  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() } };
3372
- }), 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__namespace.useRef(null), v = ke();
3239
+ }), 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 = useId2(), q = useId2(), _ = useId2(), I = t__namespace.useRef(null), v = ke();
3373
3240
  k2(() => {
3374
3241
  if (R !== void 0) {
3375
3242
  let e = R.trim();
@@ -3381,8 +3248,7 @@ var me = t__namespace.forwardRef((r, o) => {
3381
3248
  let E = t__namespace.useMemo(() => ({ subscribe: (e) => (f.current.add(e), () => f.current.delete(e)), snapshot: () => n.current, setState: (e, a, s) => {
3382
3249
  var i, l, g, y;
3383
3250
  if (!Object.is(n.current[e], a)) {
3384
- if (n.current[e] = a, e === "search")
3385
- J2(), z(), v(1, W2);
3251
+ if (n.current[e] = a, e === "search") J2(), z(), v(1, W2);
3386
3252
  else if (e === "value") {
3387
3253
  if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
3388
3254
  let h = document.getElementById(_);
@@ -3423,8 +3289,7 @@ var me = t__namespace.forwardRef((r, o) => {
3423
3289
  return e ? s(e, n.current.search, a) : 0;
3424
3290
  }
3425
3291
  function z() {
3426
- if (!n.current.search || p2.current.shouldFilter === false)
3427
- return;
3292
+ if (!n.current.search || p2.current.shouldFilter === false) return;
3428
3293
  let e = n.current.filtered.items, a = [];
3429
3294
  n.current.filtered.groups.forEach((i) => {
3430
3295
  let l = c.current.get(i), g = 0;
@@ -3463,12 +3328,10 @@ var me = t__namespace.forwardRef((r, o) => {
3463
3328
  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);
3464
3329
  n.current.filtered.items.set(g, F), F > 0 && e++;
3465
3330
  }
3466
- for (let [g, y] of c.current)
3467
- for (let h of y)
3468
- if (n.current.filtered.items.get(h) > 0) {
3469
- n.current.filtered.groups.add(g);
3470
- break;
3471
- }
3331
+ for (let [g, y] of c.current) for (let h of y) if (n.current.filtered.items.get(h) > 0) {
3332
+ n.current.filtered.groups.add(g);
3333
+ break;
3334
+ }
3472
3335
  n.current.filtered.count = e;
3473
3336
  }
3474
3337
  function ne() {
@@ -3495,8 +3358,7 @@ var me = t__namespace.forwardRef((r, o) => {
3495
3358
  }
3496
3359
  function re(e) {
3497
3360
  let a = M(), s = a == null ? void 0 : a.closest(N), i;
3498
- for (; s && !i; )
3499
- s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
3361
+ for (; s && !i; ) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
3500
3362
  i ? E.setState("value", i.getAttribute(T)) : Q(e);
3501
3363
  }
3502
3364
  let oe = () => X7(V().length - 1), ie = (e) => {
@@ -3504,61 +3366,58 @@ var me = t__namespace.forwardRef((r, o) => {
3504
3366
  }, se = (e) => {
3505
3367
  e.preventDefault(), e.metaKey ? X7(0) : e.altKey ? re(-1) : Q(-1);
3506
3368
  };
3507
- return t__namespace.createElement(Primitive2.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
3369
+ return t__namespace.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
3508
3370
  var s;
3509
3371
  (s = O.onKeyDown) == null || s.call(O, e);
3510
3372
  let a = e.nativeEvent.isComposing || e.keyCode === 229;
3511
- if (!(e.defaultPrevented || a))
3512
- switch (e.key) {
3513
- case "n":
3514
- case "j": {
3515
- j && e.ctrlKey && ie(e);
3516
- break;
3517
- }
3518
- case "ArrowDown": {
3519
- ie(e);
3520
- break;
3521
- }
3522
- case "p":
3523
- case "k": {
3524
- j && e.ctrlKey && se(e);
3525
- break;
3526
- }
3527
- case "ArrowUp": {
3528
- se(e);
3529
- break;
3530
- }
3531
- case "Home": {
3532
- e.preventDefault(), X7(0);
3533
- break;
3534
- }
3535
- case "End": {
3536
- e.preventDefault(), oe();
3537
- break;
3538
- }
3539
- case "Enter": {
3540
- e.preventDefault();
3541
- let i = M();
3542
- if (i) {
3543
- let l = new Event(Z);
3544
- i.dispatchEvent(l);
3545
- }
3373
+ if (!(e.defaultPrevented || a)) switch (e.key) {
3374
+ case "n":
3375
+ case "j": {
3376
+ j && e.ctrlKey && ie(e);
3377
+ break;
3378
+ }
3379
+ case "ArrowDown": {
3380
+ ie(e);
3381
+ break;
3382
+ }
3383
+ case "p":
3384
+ case "k": {
3385
+ j && e.ctrlKey && se(e);
3386
+ break;
3387
+ }
3388
+ case "ArrowUp": {
3389
+ se(e);
3390
+ break;
3391
+ }
3392
+ case "Home": {
3393
+ e.preventDefault(), X7(0);
3394
+ break;
3395
+ }
3396
+ case "End": {
3397
+ e.preventDefault(), oe();
3398
+ break;
3399
+ }
3400
+ case "Enter": {
3401
+ e.preventDefault();
3402
+ let i = M();
3403
+ if (i) {
3404
+ let l = new Event(Z);
3405
+ i.dispatchEvent(l);
3546
3406
  }
3547
3407
  }
3408
+ }
3548
3409
  } }, t__namespace.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b), B2(r, (e) => t__namespace.createElement(de.Provider, { value: E }, t__namespace.createElement(ue.Provider, { value: U2 }, e))));
3549
3410
  });
3550
3411
  var he = t__namespace.forwardRef((r, o) => {
3551
3412
  var _, I;
3552
- let n = useId3(), u2 = t__namespace.useRef(null), c = t__namespace.useContext(fe), d = K2(), f = pe(r), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
3413
+ let n = useId2(), u2 = t__namespace.useRef(null), c = t__namespace.useContext(fe), d = K2(), f = pe(r), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
3553
3414
  k2(() => {
3554
- if (!p2)
3555
- return d.item(n, c == null ? void 0 : c.id);
3415
+ if (!p2) return d.item(n, c == null ? void 0 : c.id);
3556
3416
  }, [p2]);
3557
3417
  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);
3558
3418
  t__namespace.useEffect(() => {
3559
3419
  let v = u2.current;
3560
- if (!(!v || r.disabled))
3561
- return v.addEventListener(Z, C), () => v.removeEventListener(Z, C);
3420
+ if (!(!v || r.disabled)) return v.addEventListener(Z, C), () => v.removeEventListener(Z, C);
3562
3421
  }, [x, r.onSelect, r.disabled]);
3563
3422
  function C() {
3564
3423
  var v, E;
@@ -3567,26 +3426,25 @@ var he = t__namespace.forwardRef((r, o) => {
3567
3426
  function S() {
3568
3427
  m2.setState("value", b.current, true);
3569
3428
  }
3570
- if (!x)
3571
- return null;
3429
+ if (!x) return null;
3572
3430
  let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r;
3573
- return t__namespace.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);
3431
+ return t__namespace.createElement(Primitive.div, { ref: composeRefs(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);
3574
3432
  });
3575
3433
  var Ee = t__namespace.forwardRef((r, o) => {
3576
- let { heading: n, children: u2, forceMount: c, ...d } = r, f = useId3(), p2 = t__namespace.useRef(null), b = t__namespace.useRef(null), m2 = useId3(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
3434
+ let { heading: n, children: u2, forceMount: c, ...d } = r, f = useId2(), p2 = t__namespace.useRef(null), b = t__namespace.useRef(null), m2 = useId2(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
3577
3435
  k2(() => R.group(f), []), ve(f, p2, [r.value, r.heading, b]);
3578
3436
  let C = t__namespace.useMemo(() => ({ id: f, forceMount: c }), [c]);
3579
- return t__namespace.createElement(Primitive2.div, { ref: composeRefs2(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t__namespace.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r, (S) => t__namespace.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t__namespace.createElement(fe.Provider, { value: C }, S))));
3437
+ return t__namespace.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t__namespace.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r, (S) => t__namespace.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t__namespace.createElement(fe.Provider, { value: C }, S))));
3580
3438
  });
3581
3439
  var ye = t__namespace.forwardRef((r, o) => {
3582
3440
  let { alwaysRender: n, ...u2 } = r, c = t__namespace.useRef(null), d = P((f) => !f.search);
3583
- return !n && !d ? null : t__namespace.createElement(Primitive2.div, { ref: composeRefs2(c, o), ...u2, "cmdk-separator": "", role: "separator" });
3441
+ return !n && !d ? null : t__namespace.createElement(Primitive.div, { ref: composeRefs(c, o), ...u2, "cmdk-separator": "", role: "separator" });
3584
3442
  });
3585
3443
  var Se = t__namespace.forwardRef((r, o) => {
3586
3444
  let { onValueChange: n, ...u2 } = r, c = r.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
3587
3445
  return t__namespace.useEffect(() => {
3588
3446
  r.value != null && d.setState("search", r.value);
3589
- }, [r.value]), t__namespace.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) => {
3447
+ }, [r.value]), t__namespace.createElement(Primitive.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) => {
3590
3448
  c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
3591
3449
  } });
3592
3450
  });
@@ -3604,31 +3462,29 @@ var Ce = t__namespace.forwardRef((r, o) => {
3604
3462
  cancelAnimationFrame(x), C.unobserve(m2);
3605
3463
  };
3606
3464
  }
3607
- }, []), t__namespace.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__namespace.createElement("div", { ref: composeRefs2(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
3465
+ }, []), t__namespace.createElement(Primitive.div, { ref: composeRefs(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r, (m2) => t__namespace.createElement("div", { ref: composeRefs(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
3608
3466
  });
3609
3467
  var xe = t__namespace.forwardRef((r, o) => {
3610
3468
  let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r;
3611
3469
  return t__namespace.createElement(DialogPrimitive__namespace.Root, { open: n, onOpenChange: u2 }, t__namespace.createElement(DialogPrimitive__namespace.Portal, { container: f }, t__namespace.createElement(DialogPrimitive__namespace.Overlay, { "cmdk-overlay": "", className: c }), t__namespace.createElement(DialogPrimitive__namespace.Content, { "aria-label": r.label, "cmdk-dialog": "", className: d }, t__namespace.createElement(me, { ref: o, ...p2 }))));
3612
3470
  });
3613
- var Ie = t__namespace.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t__namespace.createElement(Primitive2.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
3471
+ var Ie = t__namespace.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t__namespace.createElement(Primitive.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
3614
3472
  var Pe = t__namespace.forwardRef((r, o) => {
3615
3473
  let { progress: n, children: u2, label: c = "Loading...", ...d } = r;
3616
- return t__namespace.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__namespace.createElement("div", { "aria-hidden": true }, f)));
3474
+ return t__namespace.createElement(Primitive.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r, (f) => t__namespace.createElement("div", { "aria-hidden": true }, f)));
3617
3475
  });
3618
3476
  var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
3619
3477
  function we(r, o) {
3620
3478
  let n = r.nextElementSibling;
3621
3479
  for (; n; ) {
3622
- if (n.matches(o))
3623
- return n;
3480
+ if (n.matches(o)) return n;
3624
3481
  n = n.nextElementSibling;
3625
3482
  }
3626
3483
  }
3627
3484
  function De(r, o) {
3628
3485
  let n = r.previousElementSibling;
3629
3486
  for (; n; ) {
3630
- if (n.matches(o))
3631
- return n;
3487
+ if (n.matches(o)) return n;
3632
3488
  n = n.previousElementSibling;
3633
3489
  }
3634
3490
  }
@@ -3654,10 +3510,8 @@ function ve(r, o, n, u2 = []) {
3654
3510
  let f = (() => {
3655
3511
  var m2;
3656
3512
  for (let R of n) {
3657
- if (typeof R == "string")
3658
- return R.trim();
3659
- if (typeof R == "object" && "current" in R)
3660
- return R.current ? (m2 = R.current.textContent) == null ? void 0 : m2.trim() : c.current;
3513
+ if (typeof R == "string") return R.trim();
3514
+ if (typeof R == "object" && "current" in R) return R.current ? (m2 = R.current.textContent) == null ? void 0 : m2.trim() : c.current;
3661
3515
  }
3662
3516
  })(), p2 = u2.map((m2) => m2.trim());
3663
3517
  d.value(r, f, p2), (b = o.current) == null || b.setAttribute(T, f), c.current = f;
@@ -4075,8 +3929,7 @@ function memo(getDeps, fn, opts) {
4075
3929
  let result;
4076
3930
  return (depArgs) => {
4077
3931
  let depTime;
4078
- if (opts.key && opts.debug)
4079
- depTime = Date.now();
3932
+ if (opts.key && opts.debug) depTime = Date.now();
4080
3933
  const newDeps = getDeps(depArgs);
4081
3934
  const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);
4082
3935
  if (!depsChanged) {
@@ -4084,8 +3937,7 @@ function memo(getDeps, fn, opts) {
4084
3937
  }
4085
3938
  deps = newDeps;
4086
3939
  let resultTime;
4087
- if (opts.key && opts.debug)
4088
- resultTime = Date.now();
3940
+ if (opts.key && opts.debug) resultTime = Date.now();
4089
3941
  result = fn(...newDeps);
4090
3942
  opts == null || opts.onChange == null || opts.onChange(result);
4091
3943
  if (opts.key && opts.debug) {
@@ -4456,7 +4308,7 @@ var createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {
4456
4308
  var _row$getValue;
4457
4309
  return (_row$getValue = row.getValue(columnId)) != null ? _row$getValue : table.options.renderFallbackValue;
4458
4310
  },
4459
- subRows: subRows != null ? subRows : [],
4311
+ subRows: [],
4460
4312
  getLeafRows: () => flattenBy(row.subRows, (d) => d.subRows),
4461
4313
  getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : void 0,
4462
4314
  getParentRows: () => {
@@ -4464,8 +4316,7 @@ var createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {
4464
4316
  let currentRow = row;
4465
4317
  while (true) {
4466
4318
  const parentRow = currentRow.getParentRow();
4467
- if (!parentRow)
4468
- break;
4319
+ if (!parentRow) break;
4469
4320
  parentRows.push(parentRow);
4470
4321
  currentRow = parentRow;
4471
4322
  }
@@ -4753,29 +4604,25 @@ var extent = (columnId, _leafRows, childRows) => {
4753
4604
  const value = row.getValue(columnId);
4754
4605
  if (value != null) {
4755
4606
  if (min2 === void 0) {
4756
- if (value >= value)
4757
- min2 = max2 = value;
4607
+ if (value >= value) min2 = max2 = value;
4758
4608
  } else {
4759
- if (min2 > value)
4760
- min2 = value;
4761
- if (max2 < value)
4762
- max2 = value;
4609
+ if (min2 > value) min2 = value;
4610
+ if (max2 < value) max2 = value;
4763
4611
  }
4764
4612
  }
4765
4613
  });
4766
4614
  return [min2, max2];
4767
4615
  };
4768
4616
  var mean = (columnId, leafRows) => {
4769
- let count4 = 0;
4617
+ let count3 = 0;
4770
4618
  let sum2 = 0;
4771
4619
  leafRows.forEach((row) => {
4772
4620
  let value = row.getValue(columnId);
4773
4621
  if (value != null && (value = +value) >= value) {
4774
- ++count4, sum2 += value;
4622
+ ++count3, sum2 += value;
4775
4623
  }
4776
4624
  });
4777
- if (count4)
4778
- return sum2 / count4;
4625
+ if (count3) return sum2 / count3;
4779
4626
  return;
4780
4627
  };
4781
4628
  var median = (columnId, leafRows) => {
@@ -4799,7 +4646,7 @@ var unique = (columnId, leafRows) => {
4799
4646
  var uniqueCount = (columnId, leafRows) => {
4800
4647
  return new Set(leafRows.map((d) => d.getValue(columnId))).size;
4801
4648
  };
4802
- var count3 = (_columnId, leafRows) => {
4649
+ var count2 = (_columnId, leafRows) => {
4803
4650
  return leafRows.length;
4804
4651
  };
4805
4652
  var aggregationFns = {
@@ -4811,7 +4658,7 @@ var aggregationFns = {
4811
4658
  median,
4812
4659
  unique,
4813
4660
  uniqueCount,
4814
- count: count3
4661
+ count: count2
4815
4662
  };
4816
4663
  var ColumnGrouping = {
4817
4664
  getDefaultColumnDef: () => {
@@ -4859,8 +4706,7 @@ var ColumnGrouping = {
4859
4706
  column.getToggleGroupingHandler = () => {
4860
4707
  const canGroup = column.getCanGroup();
4861
4708
  return () => {
4862
- if (!canGroup)
4863
- return;
4709
+ if (!canGroup) return;
4864
4710
  column.toggleGrouping();
4865
4711
  };
4866
4712
  };
@@ -5323,8 +5169,7 @@ var ColumnSizing = {
5323
5169
  };
5324
5170
  var passiveSupported = null;
5325
5171
  function passiveEventSupported() {
5326
- if (typeof passiveSupported === "boolean")
5327
- return passiveSupported;
5172
+ if (typeof passiveSupported === "boolean") return passiveSupported;
5328
5173
  let supported = false;
5329
5174
  try {
5330
5175
  const options = {
@@ -5518,8 +5363,7 @@ var RowExpanding = {
5518
5363
  return;
5519
5364
  }
5520
5365
  if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetExpanded) != null ? _ref : !table.options.manualExpanding) {
5521
- if (queued)
5522
- return;
5366
+ if (queued) return;
5523
5367
  queued = true;
5524
5368
  table._queue(() => {
5525
5369
  table.resetExpanded();
@@ -5636,8 +5480,7 @@ var RowExpanding = {
5636
5480
  row.getToggleExpandedHandler = () => {
5637
5481
  const canExpand = row.getCanExpand();
5638
5482
  return () => {
5639
- if (!canExpand)
5640
- return;
5483
+ if (!canExpand) return;
5641
5484
  row.toggleExpanded();
5642
5485
  };
5643
5486
  };
@@ -5676,8 +5519,7 @@ var RowPagination = {
5676
5519
  return;
5677
5520
  }
5678
5521
  if ((_ref = (_table$options$autoRe = table.options.autoResetAll) != null ? _table$options$autoRe : table.options.autoResetPageIndex) != null ? _ref : !table.options.manualPagination) {
5679
- if (queued)
5680
- return;
5522
+ if (queued) return;
5681
5523
  queued = true;
5682
5524
  table._queue(() => {
5683
5525
  table.resetPageIndex();
@@ -5870,8 +5712,7 @@ var RowPinning = {
5870
5712
  row.getPinnedIndex = () => {
5871
5713
  var _ref4, _visiblePinnedRowIds$;
5872
5714
  const position = row.getIsPinned();
5873
- if (!position)
5874
- return -1;
5715
+ if (!position) return -1;
5875
5716
  const visiblePinnedRowIds = (_ref4 = position === "top" ? table.getTopRows() : table.getBottomRows()) == null ? void 0 : _ref4.map((_ref5) => {
5876
5717
  let {
5877
5718
  id
@@ -6112,8 +5953,7 @@ var RowSelection = {
6112
5953
  const canSelect = row.getCanSelect();
6113
5954
  return (e) => {
6114
5955
  var _target;
6115
- if (!canSelect)
6116
- return;
5956
+ if (!canSelect) return;
6117
5957
  row.toggleSelected((_target = e.target) == null ? void 0 : _target.checked);
6118
5958
  };
6119
5959
  };
@@ -6171,8 +6011,7 @@ function isRowSelected(row, selection) {
6171
6011
  }
6172
6012
  function isSubRowSelected(row, selection, table) {
6173
6013
  var _row$subRows3;
6174
- if (!((_row$subRows3 = row.subRows) != null && _row$subRows3.length))
6175
- return false;
6014
+ if (!((_row$subRows3 = row.subRows) != null && _row$subRows3.length)) return false;
6176
6015
  let allChildrenSelected = true;
6177
6016
  let someSelected = false;
6178
6017
  row.subRows.forEach((subRow) => {
@@ -6431,8 +6270,7 @@ var RowSorting = {
6431
6270
  column.getToggleSortingHandler = () => {
6432
6271
  const canSort = column.getCanSort();
6433
6272
  return (e) => {
6434
- if (!canSort)
6435
- return;
6273
+ if (!canSort) return;
6436
6274
  e.persist == null || e.persist();
6437
6275
  column.toggleSorting == null || column.toggleSorting(void 0, column.getCanMultiSort() ? table.options.isMultiSortEvent == null ? void 0 : table.options.isMultiSortEvent(e) : false);
6438
6276
  };
@@ -6915,8 +6753,7 @@ function getSortedRowModel() {
6915
6753
  const columnInfoById = {};
6916
6754
  availableSorting.forEach((sortEntry) => {
6917
6755
  const column = table.getColumn(sortEntry.id);
6918
- if (!column)
6919
- return;
6756
+ if (!column) return;
6920
6757
  columnInfoById[sortEntry.id] = {
6921
6758
  sortUndefined: column.columnDef.sortUndefined,
6922
6759
  invertSorting: column.columnDef.invertSorting,
@@ -6941,10 +6778,8 @@ function getSortedRowModel() {
6941
6778
  const aUndefined = aValue === void 0;
6942
6779
  const bUndefined = bValue === void 0;
6943
6780
  if (aUndefined || bUndefined) {
6944
- if (sortUndefined === "first")
6945
- return aUndefined ? -1 : 1;
6946
- if (sortUndefined === "last")
6947
- return aUndefined ? 1 : -1;
6781
+ if (sortUndefined === "first") return aUndefined ? -1 : 1;
6782
+ if (sortUndefined === "last") return aUndefined ? 1 : -1;
6948
6783
  sortInt = aUndefined && bUndefined ? 0 : aUndefined ? sortUndefined : -sortUndefined;
6949
6784
  }
6950
6785
  }
@@ -7132,10 +6967,9 @@ var TableRow = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__P
7132
6967
  ));
7133
6968
  TableRow.displayName = "TableRow";
7134
6969
  var TableHead = t__namespace.forwardRef(
7135
- ({ className, sortable, sorted, onSort, children, ...props }, ref) => {
6970
+ ({ className, sortable, sorted, onSort, align = "left", children, ...props }, ref) => {
7136
6971
  const renderSortIcon = () => {
7137
- if (!sortable)
7138
- return null;
6972
+ if (!sortable) return null;
7139
6973
  if (sorted === "asc") {
7140
6974
  return /* @__PURE__ */ jsxRuntime.jsx(
7141
6975
  "svg",
@@ -7192,34 +7026,48 @@ var TableHead = t__namespace.forwardRef(
7192
7026
  }
7193
7027
  );
7194
7028
  };
7029
+ const alignmentClasses = {
7030
+ left: "text-left justify-start",
7031
+ center: "text-center justify-center",
7032
+ right: "text-right justify-end"
7033
+ };
7195
7034
  return /* @__PURE__ */ jsxRuntime.jsx(
7196
7035
  "th",
7197
7036
  {
7198
7037
  ref,
7199
7038
  className: cn(
7200
- "h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
7039
+ "h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
7040
+ alignmentClasses[align].split(" ")[0],
7041
+ // text alignment
7201
7042
  sortable && "cursor-pointer hover:text-foreground select-none",
7202
7043
  className
7203
7044
  ),
7204
7045
  onClick: sortable ? onSort : void 0,
7205
7046
  ...props,
7206
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
7047
+ children: sortable || align !== "left" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center", alignmentClasses[align].split(" ")[1]), children: [
7207
7048
  children,
7208
7049
  sortable && renderSortIcon()
7209
- ] })
7050
+ ] }) : children
7210
7051
  }
7211
7052
  );
7212
7053
  }
7213
7054
  );
7214
7055
  TableHead.displayName = "TableHead";
7215
- var TableCell = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7216
- "td",
7217
- {
7218
- ref,
7219
- className: cn("moonui-theme", "p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
7220
- ...props
7221
- }
7222
- ));
7056
+ var TableCell = t__namespace.forwardRef(({ className, align = "left", ...props }, ref) => {
7057
+ const alignmentClass = {
7058
+ left: "text-left",
7059
+ center: "text-center",
7060
+ right: "text-right"
7061
+ }[align];
7062
+ return /* @__PURE__ */ jsxRuntime.jsx(
7063
+ "td",
7064
+ {
7065
+ ref,
7066
+ className: cn("moonui-theme", "p-4 align-middle [&:has([role=checkbox])]:pr-0", alignmentClass, className),
7067
+ ...props
7068
+ }
7069
+ );
7070
+ });
7223
7071
  TableCell.displayName = "TableCell";
7224
7072
  var TableCaption = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7225
7073
  "caption",
@@ -7402,8 +7250,7 @@ function Calendar({
7402
7250
  setCurrentMonth(dateFns.addMonths(currentMonth, 1));
7403
7251
  };
7404
7252
  const handleDateClick = (date) => {
7405
- if (disabled?.(date))
7406
- return;
7253
+ if (disabled?.(date)) return;
7407
7254
  if (mode === "single") {
7408
7255
  onSelect?.(date);
7409
7256
  } else if (mode === "range") {
@@ -7420,8 +7267,7 @@ function Calendar({
7420
7267
  }
7421
7268
  };
7422
7269
  const isDateSelected = (date) => {
7423
- if (!selected)
7424
- return false;
7270
+ if (!selected) return false;
7425
7271
  if (mode === "single") {
7426
7272
  return dateFns.isSameDay(date, selected);
7427
7273
  } else if (mode === "range") {
@@ -7434,23 +7280,19 @@ function Calendar({
7434
7280
  return false;
7435
7281
  };
7436
7282
  const isRangeStart = (date) => {
7437
- if (mode !== "range" || !selected)
7438
- return false;
7283
+ if (mode !== "range" || !selected) return false;
7439
7284
  const range = selected;
7440
7285
  return range.from ? dateFns.isSameDay(date, range.from) : false;
7441
7286
  };
7442
7287
  const isRangeEnd = (date) => {
7443
- if (mode !== "range" || !selected)
7444
- return false;
7288
+ if (mode !== "range" || !selected) return false;
7445
7289
  const range = selected;
7446
7290
  return range.to ? dateFns.isSameDay(date, range.to) : false;
7447
7291
  };
7448
7292
  const isRangeMiddle = (date) => {
7449
- if (mode !== "range" || !selected)
7450
- return false;
7293
+ if (mode !== "range" || !selected) return false;
7451
7294
  const range = selected;
7452
- if (!range.from || !range.to)
7453
- return false;
7295
+ if (!range.from || !range.to) return false;
7454
7296
  return date > range.from && date < range.to;
7455
7297
  };
7456
7298
  const getDaysInMonth = () => {
@@ -7646,14 +7488,10 @@ function DatePicker({
7646
7488
  handleSelect(today);
7647
7489
  };
7648
7490
  const isDateDisabled = (date) => {
7649
- if (minDate && date < minDate)
7650
- return true;
7651
- if (maxDate && date > maxDate)
7652
- return true;
7653
- if (disabledDates?.some((d) => d.toDateString() === date.toDateString()))
7654
- return true;
7655
- if (disabledDaysOfWeek?.includes(date.getDay()))
7656
- return true;
7491
+ if (minDate && date < minDate) return true;
7492
+ if (maxDate && date > maxDate) return true;
7493
+ if (disabledDates?.some((d) => d.toDateString() === date.toDateString())) return true;
7494
+ if (disabledDaysOfWeek?.includes(date.getDay())) return true;
7657
7495
  return false;
7658
7496
  };
7659
7497
  const displayValue = internalDate && dateFns.isValid(internalDate) ? dateFns.format(internalDate, formatString) : null;
@@ -7795,8 +7633,7 @@ function DateRangePicker({
7795
7633
  }
7796
7634
  };
7797
7635
  const displayValue = t__namespace.useMemo(() => {
7798
- if (!internalRange?.from)
7799
- return null;
7636
+ if (!internalRange?.from) return null;
7800
7637
  if (!internalRange?.to) {
7801
7638
  return dateFns.format(internalRange.from, formatString);
7802
7639
  }
@@ -8030,8 +7867,7 @@ function DraggableList({
8030
7867
  }) {
8031
7868
  const [draggedIndex, setDraggedIndex] = t__namespace.useState(null);
8032
7869
  const handleDragStart = (e, index) => {
8033
- if (disabled)
8034
- return;
7870
+ if (disabled) return;
8035
7871
  setDraggedIndex(index);
8036
7872
  e.dataTransfer.effectAllowed = "move";
8037
7873
  };
@@ -8325,19 +8161,14 @@ var Progress = t__namespace.forwardRef(({
8325
8161
  });
8326
8162
  Progress.displayName = "Progress";
8327
8163
  var getFileIcon = (type) => {
8328
- if (type.startsWith("image/"))
8329
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Image, { className: "h-4 w-4" });
8330
- if (type.startsWith("video/"))
8331
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Video, { className: "h-4 w-4" });
8332
- if (type.startsWith("audio/"))
8333
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Music, { className: "h-4 w-4" });
8334
- if (type.includes("text") || type.includes("document"))
8335
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-4 w-4" });
8164
+ if (type.startsWith("image/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Image, { className: "h-4 w-4" });
8165
+ if (type.startsWith("video/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Video, { className: "h-4 w-4" });
8166
+ if (type.startsWith("audio/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Music, { className: "h-4 w-4" });
8167
+ if (type.includes("text") || type.includes("document")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-4 w-4" });
8336
8168
  return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.File, { className: "h-4 w-4" });
8337
8169
  };
8338
8170
  var formatFileSize = (bytes) => {
8339
- if (bytes === 0)
8340
- return "0 Bytes";
8171
+ if (bytes === 0) return "0 Bytes";
8341
8172
  const k3 = 1024;
8342
8173
  const sizes = ["Bytes", "KB", "MB", "GB"];
8343
8174
  const i = Math.floor(Math.log(bytes) / Math.log(k3));
@@ -8497,8 +8328,7 @@ var FileUpload = t__namespace.default.forwardRef(
8497
8328
  const handleDrop = t.useCallback((e) => {
8498
8329
  e.preventDefault();
8499
8330
  setIsDragOver(false);
8500
- if (disabled)
8501
- return;
8331
+ if (disabled) return;
8502
8332
  const files = e.dataTransfer.files;
8503
8333
  if (files.length > 0) {
8504
8334
  processFiles(files);
@@ -8639,8 +8469,7 @@ var GestureDrawer = t__namespace.default.forwardRef(
8639
8469
  const motionValue = isVertical ? y : x;
8640
8470
  const opacity = framerMotion.useTransform(motionValue, [0, threshold], [1, 0.5]);
8641
8471
  const handleDragEnd = (event, info) => {
8642
- if (!enableSwipeToClose)
8643
- return;
8472
+ if (!enableSwipeToClose) return;
8644
8473
  const offset = isVertical ? info.offset.y : info.offset.x;
8645
8474
  const velocity = isVertical ? info.velocity.y : info.velocity.x;
8646
8475
  let shouldClose = false;
@@ -8681,8 +8510,7 @@ var GestureDrawer = t__namespace.default.forwardRef(
8681
8510
  const getAnimatePosition = () => {
8682
8511
  return isVertical ? { y: 0 } : { x: 0 };
8683
8512
  };
8684
- if (!isOpen)
8685
- return null;
8513
+ if (!isOpen) return null;
8686
8514
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50", children: [
8687
8515
  /* @__PURE__ */ jsxRuntime.jsx(
8688
8516
  framerMotion.motion.div,
@@ -8902,8 +8730,7 @@ function LockedComponent({
8902
8730
  const [isPreviewActive, setIsPreviewActive] = t.useState(false);
8903
8731
  const [previewTimeout, setPreviewTimeout] = t.useState(null);
8904
8732
  const handleMouseEnter = () => {
8905
- if (!showPreview)
8906
- return;
8733
+ if (!showPreview) return;
8907
8734
  setIsPreviewActive(true);
8908
8735
  if (previewTimeout) {
8909
8736
  clearTimeout(previewTimeout);
@@ -9009,7 +8836,6 @@ function ProComponentWrapper({
9009
8836
  nodeEnv: process.env.NODE_ENV === "development",
9010
8837
  nextPublicEnv: process.env.NEXT_PUBLIC_VERCEL_ENV === "development",
9011
8838
  localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
9012
- port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080"),
9013
8839
  vercelEnv: !process.env.VERCEL,
9014
8840
  ciEnv: !process.env.CI,
9015
8841
  deploymentEnv: !process.env.DEPLOYMENT_ENV
@@ -9090,9 +8916,7 @@ function ProComponentWrapper({
9090
8916
  const isDevelopment = () => {
9091
8917
  const checks = {
9092
8918
  nodeEnv: process.env.NODE_ENV === "development",
9093
- localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
9094
- port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080")
9095
- };
8919
+ localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local"))};
9096
8920
  if (process.env.VERCEL || process.env.NETLIFY || process.env.RENDER || process.env.RAILWAY_ENVIRONMENT || process.env.FLY_APP_NAME) {
9097
8921
  return false;
9098
8922
  }
@@ -9535,30 +9359,22 @@ var formatPhoneNumber = (value, countryCode) => {
9535
9359
  const cleaned = value.replace(/\D/g, "");
9536
9360
  switch (countryCode) {
9537
9361
  case "+1":
9538
- if (cleaned.length <= 3)
9539
- return cleaned;
9540
- if (cleaned.length <= 6)
9541
- return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
9362
+ if (cleaned.length <= 3) return cleaned;
9363
+ if (cleaned.length <= 6) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
9542
9364
  return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)}-${cleaned.slice(6, 10)}`;
9543
9365
  case "+44":
9544
- if (cleaned.length <= 4)
9545
- return cleaned;
9546
- if (cleaned.length <= 7)
9547
- return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
9366
+ if (cleaned.length <= 4) return cleaned;
9367
+ if (cleaned.length <= 7) return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
9548
9368
  return `${cleaned.slice(0, 4)} ${cleaned.slice(4, 7)} ${cleaned.slice(7, 11)}`;
9549
9369
  case "+90":
9550
- if (cleaned.length <= 3)
9551
- return cleaned;
9552
- if (cleaned.length <= 6)
9553
- return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
9554
- if (cleaned.length <= 9)
9555
- return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
9370
+ if (cleaned.length <= 3) return cleaned;
9371
+ if (cleaned.length <= 6) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
9372
+ if (cleaned.length <= 9) return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
9556
9373
  return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8, 10)}`;
9557
9374
  default:
9558
9375
  let formatted = "";
9559
9376
  for (let i = 0; i < cleaned.length; i++) {
9560
- if (i > 0 && i % 3 === 0)
9561
- formatted += " ";
9377
+ if (i > 0 && i % 3 === 0) formatted += " ";
9562
9378
  formatted += cleaned[i];
9563
9379
  }
9564
9380
  return formatted;
@@ -9568,10 +9384,13 @@ var getMaxLength = (countryCode) => {
9568
9384
  switch (countryCode) {
9569
9385
  case "+1":
9570
9386
  return 10;
9387
+ // US/Canada
9571
9388
  case "+44":
9572
9389
  return 11;
9390
+ // UK
9573
9391
  case "+90":
9574
9392
  return 10;
9393
+ // Turkey
9575
9394
  default:
9576
9395
  return 15;
9577
9396
  }
@@ -9827,188 +9646,6 @@ function RichTextEditor({
9827
9646
  )
9828
9647
  ] });
9829
9648
  }
9830
- function useStateMachine2(initialState, machine) {
9831
- return t__namespace.useReducer((state, event) => {
9832
- const nextState = machine[state][event];
9833
- return nextState ?? state;
9834
- }, initialState);
9835
- }
9836
- var Presence2 = (props) => {
9837
- const { present, children } = props;
9838
- const presence = usePresence2(present);
9839
- const child = typeof children === "function" ? children({ present: presence.isPresent }) : t__namespace.Children.only(children);
9840
- const ref = useComposedRefs2(presence.ref, getElementRef2(child));
9841
- const forceMount = typeof children === "function";
9842
- return forceMount || presence.isPresent ? t__namespace.cloneElement(child, { ref }) : null;
9843
- };
9844
- Presence2.displayName = "Presence";
9845
- function usePresence2(present) {
9846
- const [node, setNode] = t__namespace.useState();
9847
- const stylesRef = t__namespace.useRef(null);
9848
- const prevPresentRef = t__namespace.useRef(present);
9849
- const prevAnimationNameRef = t__namespace.useRef("none");
9850
- const initialState = present ? "mounted" : "unmounted";
9851
- const [state, send] = useStateMachine2(initialState, {
9852
- mounted: {
9853
- UNMOUNT: "unmounted",
9854
- ANIMATION_OUT: "unmountSuspended"
9855
- },
9856
- unmountSuspended: {
9857
- MOUNT: "mounted",
9858
- ANIMATION_END: "unmounted"
9859
- },
9860
- unmounted: {
9861
- MOUNT: "mounted"
9862
- }
9863
- });
9864
- t__namespace.useEffect(() => {
9865
- const currentAnimationName = getAnimationName2(stylesRef.current);
9866
- prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
9867
- }, [state]);
9868
- useLayoutEffect22(() => {
9869
- const styles = stylesRef.current;
9870
- const wasPresent = prevPresentRef.current;
9871
- const hasPresentChanged = wasPresent !== present;
9872
- if (hasPresentChanged) {
9873
- const prevAnimationName = prevAnimationNameRef.current;
9874
- const currentAnimationName = getAnimationName2(styles);
9875
- if (present) {
9876
- send("MOUNT");
9877
- } else if (currentAnimationName === "none" || styles?.display === "none") {
9878
- send("UNMOUNT");
9879
- } else {
9880
- const isAnimating = prevAnimationName !== currentAnimationName;
9881
- if (wasPresent && isAnimating) {
9882
- send("ANIMATION_OUT");
9883
- } else {
9884
- send("UNMOUNT");
9885
- }
9886
- }
9887
- prevPresentRef.current = present;
9888
- }
9889
- }, [present, send]);
9890
- useLayoutEffect22(() => {
9891
- if (node) {
9892
- let timeoutId;
9893
- const ownerWindow = node.ownerDocument.defaultView ?? window;
9894
- const handleAnimationEnd = (event) => {
9895
- const currentAnimationName = getAnimationName2(stylesRef.current);
9896
- const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
9897
- if (event.target === node && isCurrentAnimation) {
9898
- send("ANIMATION_END");
9899
- if (!prevPresentRef.current) {
9900
- const currentFillMode = node.style.animationFillMode;
9901
- node.style.animationFillMode = "forwards";
9902
- timeoutId = ownerWindow.setTimeout(() => {
9903
- if (node.style.animationFillMode === "forwards") {
9904
- node.style.animationFillMode = currentFillMode;
9905
- }
9906
- });
9907
- }
9908
- }
9909
- };
9910
- const handleAnimationStart = (event) => {
9911
- if (event.target === node) {
9912
- prevAnimationNameRef.current = getAnimationName2(stylesRef.current);
9913
- }
9914
- };
9915
- node.addEventListener("animationstart", handleAnimationStart);
9916
- node.addEventListener("animationcancel", handleAnimationEnd);
9917
- node.addEventListener("animationend", handleAnimationEnd);
9918
- return () => {
9919
- ownerWindow.clearTimeout(timeoutId);
9920
- node.removeEventListener("animationstart", handleAnimationStart);
9921
- node.removeEventListener("animationcancel", handleAnimationEnd);
9922
- node.removeEventListener("animationend", handleAnimationEnd);
9923
- };
9924
- } else {
9925
- send("ANIMATION_END");
9926
- }
9927
- }, [node, send]);
9928
- return {
9929
- isPresent: ["mounted", "unmountSuspended"].includes(state),
9930
- ref: t__namespace.useCallback((node2) => {
9931
- stylesRef.current = node2 ? getComputedStyle(node2) : null;
9932
- setNode(node2);
9933
- }, [])
9934
- };
9935
- }
9936
- function getAnimationName2(styles) {
9937
- return styles?.animationName || "none";
9938
- }
9939
- function getElementRef2(element) {
9940
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
9941
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
9942
- if (mayWarn) {
9943
- return element.ref;
9944
- }
9945
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
9946
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
9947
- if (mayWarn) {
9948
- return element.props.ref;
9949
- }
9950
- return element.props.ref || element.ref;
9951
- }
9952
- function createContextScope2(scopeName, createContextScopeDeps = []) {
9953
- let defaultContexts = [];
9954
- function createContext32(rootComponentName, defaultContext) {
9955
- const BaseContext = t__namespace.createContext(defaultContext);
9956
- const index = defaultContexts.length;
9957
- defaultContexts = [...defaultContexts, defaultContext];
9958
- const Provider3 = (props) => {
9959
- const { scope, children, ...context } = props;
9960
- const Context = scope?.[scopeName]?.[index] || BaseContext;
9961
- const value = t__namespace.useMemo(() => context, Object.values(context));
9962
- return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
9963
- };
9964
- Provider3.displayName = rootComponentName + "Provider";
9965
- function useContext22(consumerName, scope) {
9966
- const Context = scope?.[scopeName]?.[index] || BaseContext;
9967
- const context = t__namespace.useContext(Context);
9968
- if (context)
9969
- return context;
9970
- if (defaultContext !== void 0)
9971
- return defaultContext;
9972
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
9973
- }
9974
- return [Provider3, useContext22];
9975
- }
9976
- const createScope = () => {
9977
- const scopeContexts = defaultContexts.map((defaultContext) => {
9978
- return t__namespace.createContext(defaultContext);
9979
- });
9980
- return function useScope(scope) {
9981
- const contexts = scope?.[scopeName] || scopeContexts;
9982
- return t__namespace.useMemo(
9983
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
9984
- [scope, contexts]
9985
- );
9986
- };
9987
- };
9988
- createScope.scopeName = scopeName;
9989
- return [createContext32, composeContextScopes2(createScope, ...createContextScopeDeps)];
9990
- }
9991
- function composeContextScopes2(...scopes) {
9992
- const baseScope = scopes[0];
9993
- if (scopes.length === 1)
9994
- return baseScope;
9995
- const createScope = () => {
9996
- const scopeHooks = scopes.map((createScope2) => ({
9997
- useScope: createScope2(),
9998
- scopeName: createScope2.scopeName
9999
- }));
10000
- return function useComposedScopes(overrideScopes) {
10001
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
10002
- const scopeProps = useScope(overrideScopes);
10003
- const currentScope = scopeProps[`__scope${scopeName}`];
10004
- return { ...nextScopes2, ...currentScope };
10005
- }, {});
10006
- return t__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
10007
- };
10008
- };
10009
- createScope.scopeName = baseScope.scopeName;
10010
- return createScope;
10011
- }
10012
9649
  function useCallbackRef(callback) {
10013
9650
  const callbackRef = t__namespace.useRef(callback);
10014
9651
  t__namespace.useEffect(() => {
@@ -10026,22 +9663,14 @@ function useDirection(localDir) {
10026
9663
  function clamp(value, [min2, max2]) {
10027
9664
  return Math.min(max2, Math.max(min2, value));
10028
9665
  }
10029
- function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
10030
- return function handleEvent(event) {
10031
- originalEventHandler?.(event);
10032
- if (checkForDefaultPrevented === false || !event.defaultPrevented) {
10033
- return ourEventHandler?.(event);
10034
- }
10035
- };
10036
- }
10037
- function useStateMachine3(initialState, machine) {
9666
+ function useStateMachine2(initialState, machine) {
10038
9667
  return t__namespace.useReducer((state, event) => {
10039
9668
  const nextState = machine[state][event];
10040
9669
  return nextState ?? state;
10041
9670
  }, initialState);
10042
9671
  }
10043
9672
  var SCROLL_AREA_NAME = "ScrollArea";
10044
- var [createScrollAreaContext, createScrollAreaScope] = createContextScope2(SCROLL_AREA_NAME);
9673
+ var [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
10045
9674
  var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
10046
9675
  var ScrollArea = t__namespace.forwardRef(
10047
9676
  (props, forwardedRef) => {
@@ -10061,7 +9690,7 @@ var ScrollArea = t__namespace.forwardRef(
10061
9690
  const [cornerHeight, setCornerHeight] = t__namespace.useState(0);
10062
9691
  const [scrollbarXEnabled, setScrollbarXEnabled] = t__namespace.useState(false);
10063
9692
  const [scrollbarYEnabled, setScrollbarYEnabled] = t__namespace.useState(false);
10064
- const composedRefs = useComposedRefs2(forwardedRef, (node) => setScrollArea(node));
9693
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));
10065
9694
  const direction = useDirection(dir);
10066
9695
  return /* @__PURE__ */ jsxRuntime.jsx(
10067
9696
  ScrollAreaProvider,
@@ -10086,7 +9715,7 @@ var ScrollArea = t__namespace.forwardRef(
10086
9715
  onCornerWidthChange: setCornerWidth,
10087
9716
  onCornerHeightChange: setCornerHeight,
10088
9717
  children: /* @__PURE__ */ jsxRuntime.jsx(
10089
- Primitive2.div,
9718
+ Primitive.div,
10090
9719
  {
10091
9720
  dir: direction,
10092
9721
  ...scrollAreaProps,
@@ -10111,7 +9740,7 @@ var ScrollAreaViewport = t__namespace.forwardRef(
10111
9740
  const { __scopeScrollArea, children, nonce, ...viewportProps } = props;
10112
9741
  const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
10113
9742
  const ref = t__namespace.useRef(null);
10114
- const composedRefs = useComposedRefs2(forwardedRef, ref, context.onViewportChange);
9743
+ const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
10115
9744
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10116
9745
  /* @__PURE__ */ jsxRuntime.jsx(
10117
9746
  "style",
@@ -10123,7 +9752,7 @@ var ScrollAreaViewport = t__namespace.forwardRef(
10123
9752
  }
10124
9753
  ),
10125
9754
  /* @__PURE__ */ jsxRuntime.jsx(
10126
- Primitive2.div,
9755
+ Primitive.div,
10127
9756
  {
10128
9757
  "data-radix-scroll-area-viewport": "",
10129
9758
  ...viewportProps,
@@ -10192,7 +9821,7 @@ var ScrollAreaScrollbarHover = t__namespace.forwardRef((props, forwardedRef) =>
10192
9821
  };
10193
9822
  }
10194
9823
  }, [context.scrollArea, context.scrollHideDelay]);
10195
- return /* @__PURE__ */ jsxRuntime.jsx(Presence2, { present: forceMount || visible, children: /* @__PURE__ */ jsxRuntime.jsx(
9824
+ return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsxRuntime.jsx(
10196
9825
  ScrollAreaScrollbarAuto,
10197
9826
  {
10198
9827
  "data-state": visible ? "visible" : "hidden",
@@ -10206,7 +9835,7 @@ var ScrollAreaScrollbarScroll = t__namespace.forwardRef((props, forwardedRef) =>
10206
9835
  const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10207
9836
  const isHorizontal = props.orientation === "horizontal";
10208
9837
  const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100);
10209
- const [state, send] = useStateMachine3("hidden", {
9838
+ const [state, send] = useStateMachine2("hidden", {
10210
9839
  hidden: {
10211
9840
  SCROLL: "scrolling"
10212
9841
  },
@@ -10248,14 +9877,14 @@ var ScrollAreaScrollbarScroll = t__namespace.forwardRef((props, forwardedRef) =>
10248
9877
  return () => viewport.removeEventListener("scroll", handleScroll);
10249
9878
  }
10250
9879
  }, [context.viewport, isHorizontal, send, debounceScrollEnd]);
10251
- return /* @__PURE__ */ jsxRuntime.jsx(Presence2, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
9880
+ return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
10252
9881
  ScrollAreaScrollbarVisible,
10253
9882
  {
10254
9883
  "data-state": state === "hidden" ? "hidden" : "visible",
10255
9884
  ...scrollbarProps,
10256
9885
  ref: forwardedRef,
10257
- onPointerEnter: composeEventHandlers2(props.onPointerEnter, () => send("POINTER_ENTER")),
10258
- onPointerLeave: composeEventHandlers2(props.onPointerLeave, () => send("POINTER_LEAVE"))
9886
+ onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")),
9887
+ onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE"))
10259
9888
  }
10260
9889
  ) });
10261
9890
  });
@@ -10273,7 +9902,7 @@ var ScrollAreaScrollbarAuto = t__namespace.forwardRef((props, forwardedRef) => {
10273
9902
  }, 10);
10274
9903
  useResizeObserver(context.viewport, handleResize);
10275
9904
  useResizeObserver(context.content, handleResize);
10276
- return /* @__PURE__ */ jsxRuntime.jsx(Presence2, { present: forceMount || visible, children: /* @__PURE__ */ jsxRuntime.jsx(
9905
+ return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsxRuntime.jsx(
10277
9906
  ScrollAreaScrollbarVisible,
10278
9907
  {
10279
9908
  "data-state": visible ? "visible" : "hidden",
@@ -10319,8 +9948,7 @@ var ScrollAreaScrollbarVisible = t__namespace.forwardRef((props, forwardedRef) =
10319
9948
  }
10320
9949
  },
10321
9950
  onWheelScroll: (scrollPos) => {
10322
- if (context.viewport)
10323
- context.viewport.scrollLeft = scrollPos;
9951
+ if (context.viewport) context.viewport.scrollLeft = scrollPos;
10324
9952
  },
10325
9953
  onDragScroll: (pointerPos) => {
10326
9954
  if (context.viewport) {
@@ -10344,12 +9972,10 @@ var ScrollAreaScrollbarVisible = t__namespace.forwardRef((props, forwardedRef) =
10344
9972
  }
10345
9973
  },
10346
9974
  onWheelScroll: (scrollPos) => {
10347
- if (context.viewport)
10348
- context.viewport.scrollTop = scrollPos;
9975
+ if (context.viewport) context.viewport.scrollTop = scrollPos;
10349
9976
  },
10350
9977
  onDragScroll: (pointerPos) => {
10351
- if (context.viewport)
10352
- context.viewport.scrollTop = getScrollPosition(pointerPos);
9978
+ if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);
10353
9979
  }
10354
9980
  }
10355
9981
  );
@@ -10361,17 +9987,16 @@ var ScrollAreaScrollbarX = t__namespace.forwardRef((props, forwardedRef) => {
10361
9987
  const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10362
9988
  const [computedStyle, setComputedStyle] = t__namespace.useState();
10363
9989
  const ref = t__namespace.useRef(null);
10364
- const composeRefs3 = useComposedRefs2(forwardedRef, ref, context.onScrollbarXChange);
9990
+ const composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);
10365
9991
  t__namespace.useEffect(() => {
10366
- if (ref.current)
10367
- setComputedStyle(getComputedStyle(ref.current));
9992
+ if (ref.current) setComputedStyle(getComputedStyle(ref.current));
10368
9993
  }, [ref]);
10369
9994
  return /* @__PURE__ */ jsxRuntime.jsx(
10370
9995
  ScrollAreaScrollbarImpl,
10371
9996
  {
10372
9997
  "data-orientation": "horizontal",
10373
9998
  ...scrollbarProps,
10374
- ref: composeRefs3,
9999
+ ref: composeRefs2,
10375
10000
  sizes,
10376
10001
  style: {
10377
10002
  bottom: 0,
@@ -10412,17 +10037,16 @@ var ScrollAreaScrollbarY = t__namespace.forwardRef((props, forwardedRef) => {
10412
10037
  const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10413
10038
  const [computedStyle, setComputedStyle] = t__namespace.useState();
10414
10039
  const ref = t__namespace.useRef(null);
10415
- const composeRefs3 = useComposedRefs2(forwardedRef, ref, context.onScrollbarYChange);
10040
+ const composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);
10416
10041
  t__namespace.useEffect(() => {
10417
- if (ref.current)
10418
- setComputedStyle(getComputedStyle(ref.current));
10042
+ if (ref.current) setComputedStyle(getComputedStyle(ref.current));
10419
10043
  }, [ref]);
10420
10044
  return /* @__PURE__ */ jsxRuntime.jsx(
10421
10045
  ScrollAreaScrollbarImpl,
10422
10046
  {
10423
10047
  "data-orientation": "vertical",
10424
10048
  ...scrollbarProps,
10425
- ref: composeRefs3,
10049
+ ref: composeRefs2,
10426
10050
  sizes,
10427
10051
  style: {
10428
10052
  top: 0,
@@ -10476,7 +10100,7 @@ var ScrollAreaScrollbarImpl = t__namespace.forwardRef((props, forwardedRef) => {
10476
10100
  } = props;
10477
10101
  const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
10478
10102
  const [scrollbar, setScrollbar] = t__namespace.useState(null);
10479
- const composeRefs3 = useComposedRefs2(forwardedRef, (node) => setScrollbar(node));
10103
+ const composeRefs2 = useComposedRefs(forwardedRef, (node) => setScrollbar(node));
10480
10104
  const rectRef = t__namespace.useRef(null);
10481
10105
  const prevWebkitUserSelectRef = t__namespace.useRef("");
10482
10106
  const viewport = context.viewport;
@@ -10495,8 +10119,7 @@ var ScrollAreaScrollbarImpl = t__namespace.forwardRef((props, forwardedRef) => {
10495
10119
  const handleWheel = (event) => {
10496
10120
  const element = event.target;
10497
10121
  const isScrollbarWheel = scrollbar?.contains(element);
10498
- if (isScrollbarWheel)
10499
- handleWheelScroll(event, maxScrollPos);
10122
+ if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);
10500
10123
  };
10501
10124
  document.addEventListener("wheel", handleWheel, { passive: false });
10502
10125
  return () => document.removeEventListener("wheel", handleWheel, { passive: false });
@@ -10515,12 +10138,12 @@ var ScrollAreaScrollbarImpl = t__namespace.forwardRef((props, forwardedRef) => {
10515
10138
  onThumbPositionChange: handleThumbPositionChange,
10516
10139
  onThumbPointerDown: useCallbackRef(onThumbPointerDown),
10517
10140
  children: /* @__PURE__ */ jsxRuntime.jsx(
10518
- Primitive2.div,
10141
+ Primitive.div,
10519
10142
  {
10520
10143
  ...scrollbarProps,
10521
- ref: composeRefs3,
10144
+ ref: composeRefs2,
10522
10145
  style: { position: "absolute", ...scrollbarProps.style },
10523
- onPointerDown: composeEventHandlers2(props.onPointerDown, (event) => {
10146
+ onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
10524
10147
  const mainPointer = 0;
10525
10148
  if (event.button === mainPointer) {
10526
10149
  const element = event.target;
@@ -10528,20 +10151,18 @@ var ScrollAreaScrollbarImpl = t__namespace.forwardRef((props, forwardedRef) => {
10528
10151
  rectRef.current = scrollbar.getBoundingClientRect();
10529
10152
  prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;
10530
10153
  document.body.style.webkitUserSelect = "none";
10531
- if (context.viewport)
10532
- context.viewport.style.scrollBehavior = "auto";
10154
+ if (context.viewport) context.viewport.style.scrollBehavior = "auto";
10533
10155
  handleDragScroll(event);
10534
10156
  }
10535
10157
  }),
10536
- onPointerMove: composeEventHandlers2(props.onPointerMove, handleDragScroll),
10537
- onPointerUp: composeEventHandlers2(props.onPointerUp, (event) => {
10158
+ onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),
10159
+ onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
10538
10160
  const element = event.target;
10539
10161
  if (element.hasPointerCapture(event.pointerId)) {
10540
10162
  element.releasePointerCapture(event.pointerId);
10541
10163
  }
10542
10164
  document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;
10543
- if (context.viewport)
10544
- context.viewport.style.scrollBehavior = "";
10165
+ if (context.viewport) context.viewport.style.scrollBehavior = "";
10545
10166
  rectRef.current = null;
10546
10167
  })
10547
10168
  }
@@ -10554,7 +10175,7 @@ var ScrollAreaThumb = t__namespace.forwardRef(
10554
10175
  (props, forwardedRef) => {
10555
10176
  const { forceMount, ...thumbProps } = props;
10556
10177
  const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
10557
- return /* @__PURE__ */ jsxRuntime.jsx(Presence2, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
10178
+ return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
10558
10179
  }
10559
10180
  );
10560
10181
  var ScrollAreaThumbImpl = t__namespace.forwardRef(
@@ -10563,7 +10184,7 @@ var ScrollAreaThumbImpl = t__namespace.forwardRef(
10563
10184
  const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
10564
10185
  const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
10565
10186
  const { onThumbPositionChange } = scrollbarContext;
10566
- const composedRef = useComposedRefs2(
10187
+ const composedRef = useComposedRefs(
10567
10188
  forwardedRef,
10568
10189
  (node) => scrollbarContext.onThumbChange(node)
10569
10190
  );
@@ -10591,7 +10212,7 @@ var ScrollAreaThumbImpl = t__namespace.forwardRef(
10591
10212
  }
10592
10213
  }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
10593
10214
  return /* @__PURE__ */ jsxRuntime.jsx(
10594
- Primitive2.div,
10215
+ Primitive.div,
10595
10216
  {
10596
10217
  "data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
10597
10218
  ...thumbProps,
@@ -10601,14 +10222,14 @@ var ScrollAreaThumbImpl = t__namespace.forwardRef(
10601
10222
  height: "var(--radix-scroll-area-thumb-height)",
10602
10223
  ...style
10603
10224
  },
10604
- onPointerDownCapture: composeEventHandlers2(props.onPointerDownCapture, (event) => {
10225
+ onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {
10605
10226
  const thumb = event.target;
10606
10227
  const thumbRect = thumb.getBoundingClientRect();
10607
10228
  const x = event.clientX - thumbRect.left;
10608
10229
  const y = event.clientY - thumbRect.top;
10609
10230
  scrollbarContext.onThumbPointerDown({ x, y });
10610
10231
  }),
10611
- onPointerUp: composeEventHandlers2(props.onPointerUp, scrollbarContext.onThumbPointerUp)
10232
+ onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)
10612
10233
  }
10613
10234
  );
10614
10235
  }
@@ -10641,7 +10262,7 @@ var ScrollAreaCornerImpl = t__namespace.forwardRef((props, forwardedRef) => {
10641
10262
  setWidth(width2);
10642
10263
  });
10643
10264
  return hasSize ? /* @__PURE__ */ jsxRuntime.jsx(
10644
- Primitive2.div,
10265
+ Primitive.div,
10645
10266
  {
10646
10267
  ...cornerProps,
10647
10268
  ref: forwardedRef,
@@ -10695,8 +10316,7 @@ function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
10695
10316
  }
10696
10317
  function linearScale(input, output) {
10697
10318
  return (value) => {
10698
- if (input[0] === input[1] || output[0] === output[1])
10699
- return output[0];
10319
+ if (input[0] === input[1] || output[0] === output[1]) return output[0];
10700
10320
  const ratio = (output[1] - output[0]) / (input[1] - input[0]);
10701
10321
  return output[0] + ratio * (value - input[0]);
10702
10322
  };
@@ -10712,8 +10332,7 @@ var addUnlinkedScrollListener = (node, handler = () => {
10712
10332
  const position = { left: node.scrollLeft, top: node.scrollTop };
10713
10333
  const isHorizontalScroll = prevPosition.left !== position.left;
10714
10334
  const isVerticalScroll = prevPosition.top !== position.top;
10715
- if (isHorizontalScroll || isVerticalScroll)
10716
- handler();
10335
+ if (isHorizontalScroll || isVerticalScroll) handler();
10717
10336
  prevPosition = position;
10718
10337
  rAF = window.requestAnimationFrame(loop);
10719
10338
  })();
@@ -10730,7 +10349,7 @@ function useDebounceCallback(callback, delay) {
10730
10349
  }
10731
10350
  function useResizeObserver(element, onResize) {
10732
10351
  const handleResize = useCallbackRef(onResize);
10733
- useLayoutEffect22(() => {
10352
+ useLayoutEffect2(() => {
10734
10353
  let rAF = 0;
10735
10354
  if (element) {
10736
10355
  const resizeObserver = new ResizeObserver(() => {
@@ -10778,6 +10397,185 @@ var ScrollBar = t__namespace.forwardRef(({ className, orientation = "vertical",
10778
10397
  }
10779
10398
  ));
10780
10399
  ScrollBar.displayName = ScrollAreaScrollbar.displayName;
10400
+ var defaultVariants = {
10401
+ up: {
10402
+ hidden: { opacity: 0, y: 50 },
10403
+ visible: { opacity: 1, y: 0 }
10404
+ },
10405
+ down: {
10406
+ hidden: { opacity: 0, y: -50 },
10407
+ visible: { opacity: 1, y: 0 }
10408
+ },
10409
+ left: {
10410
+ hidden: { opacity: 0, x: 50 },
10411
+ visible: { opacity: 1, x: 0 }
10412
+ },
10413
+ right: {
10414
+ hidden: { opacity: 0, x: -50 },
10415
+ visible: { opacity: 1, x: 0 }
10416
+ },
10417
+ fade: {
10418
+ hidden: { opacity: 0 },
10419
+ visible: { opacity: 1 }
10420
+ },
10421
+ scale: {
10422
+ hidden: { opacity: 0, scale: 0.8 },
10423
+ visible: { opacity: 1, scale: 1 }
10424
+ },
10425
+ blur: {
10426
+ hidden: { opacity: 0, filter: "blur(10px)" },
10427
+ visible: { opacity: 1, filter: "blur(0px)" }
10428
+ }
10429
+ };
10430
+ var ScrollReveal = t__namespace.forwardRef(
10431
+ ({
10432
+ children,
10433
+ direction = "up",
10434
+ delay = 0,
10435
+ duration = 0.6,
10436
+ distance = 50,
10437
+ threshold = 0.1,
10438
+ triggerOnce = true,
10439
+ stagger = 0,
10440
+ className,
10441
+ variants,
10442
+ animate: animate2 = true,
10443
+ style,
10444
+ id
10445
+ }, ref) => {
10446
+ const controls = framerMotion.useAnimation();
10447
+ const elementRef = t__namespace.useRef(null);
10448
+ const isInView = framerMotion.useInView(elementRef, {
10449
+ amount: threshold,
10450
+ once: triggerOnce
10451
+ });
10452
+ const customVariants = t__namespace.useMemo(() => {
10453
+ if (variants) return variants;
10454
+ const baseVariants = defaultVariants[direction] || defaultVariants.up;
10455
+ return {
10456
+ hidden: {
10457
+ ...baseVariants.hidden,
10458
+ ...direction === "up" && { y: distance },
10459
+ ...direction === "down" && { y: -distance },
10460
+ ...direction === "left" && { x: distance },
10461
+ ...direction === "right" && { x: -distance }
10462
+ },
10463
+ visible: baseVariants.visible
10464
+ };
10465
+ }, [direction, distance, variants]);
10466
+ t__namespace.useEffect(() => {
10467
+ if (!animate2) return;
10468
+ if (isInView) {
10469
+ controls.start("visible");
10470
+ } else if (!triggerOnce) {
10471
+ controls.start("hidden");
10472
+ }
10473
+ }, [isInView, controls, triggerOnce, animate2]);
10474
+ t__namespace.useImperativeHandle(ref, () => elementRef.current);
10475
+ if (!animate2) {
10476
+ return /* @__PURE__ */ jsxRuntime.jsx(
10477
+ "div",
10478
+ {
10479
+ ref: elementRef,
10480
+ className,
10481
+ style,
10482
+ id,
10483
+ children
10484
+ }
10485
+ );
10486
+ }
10487
+ return /* @__PURE__ */ jsxRuntime.jsx(
10488
+ framerMotion.motion.div,
10489
+ {
10490
+ ref: elementRef,
10491
+ variants: customVariants,
10492
+ initial: "hidden",
10493
+ animate: controls,
10494
+ transition: {
10495
+ duration,
10496
+ delay: delay + stagger,
10497
+ ease: "easeOut"
10498
+ },
10499
+ className: cn(className),
10500
+ style,
10501
+ id,
10502
+ children
10503
+ }
10504
+ );
10505
+ }
10506
+ );
10507
+ ScrollReveal.displayName = "ScrollReveal";
10508
+ var ScrollRevealContainer = t__namespace.forwardRef(
10509
+ ({ children, stagger = 0.1, className, style, id }, ref) => {
10510
+ const containerRef = t__namespace.useRef(null);
10511
+ const isInView = framerMotion.useInView(containerRef, { amount: 0.1, once: true });
10512
+ t__namespace.useImperativeHandle(ref, () => containerRef.current);
10513
+ return /* @__PURE__ */ jsxRuntime.jsx(
10514
+ framerMotion.motion.div,
10515
+ {
10516
+ ref: containerRef,
10517
+ initial: "hidden",
10518
+ animate: isInView ? "visible" : "hidden",
10519
+ variants: {
10520
+ hidden: {},
10521
+ visible: {
10522
+ transition: {
10523
+ staggerChildren: stagger
10524
+ }
10525
+ }
10526
+ },
10527
+ className: cn(className),
10528
+ style,
10529
+ id,
10530
+ children
10531
+ }
10532
+ );
10533
+ }
10534
+ );
10535
+ ScrollRevealContainer.displayName = "ScrollRevealContainer";
10536
+ var ScrollRevealItem = t__namespace.forwardRef(
10537
+ ({
10538
+ children,
10539
+ direction = "up",
10540
+ duration = 0.6,
10541
+ distance = 50,
10542
+ className,
10543
+ variants,
10544
+ style,
10545
+ id
10546
+ }, ref) => {
10547
+ const customVariants = t__namespace.useMemo(() => {
10548
+ if (variants) return variants;
10549
+ const baseVariants = defaultVariants[direction] || defaultVariants.up;
10550
+ return {
10551
+ hidden: {
10552
+ ...baseVariants.hidden,
10553
+ ...direction === "up" && { y: distance },
10554
+ ...direction === "down" && { y: -distance },
10555
+ ...direction === "left" && { x: distance },
10556
+ ...direction === "right" && { x: -distance }
10557
+ },
10558
+ visible: baseVariants.visible
10559
+ };
10560
+ }, [direction, distance, variants]);
10561
+ return /* @__PURE__ */ jsxRuntime.jsx(
10562
+ framerMotion.motion.div,
10563
+ {
10564
+ ref,
10565
+ variants: customVariants,
10566
+ transition: {
10567
+ duration,
10568
+ ease: "easeOut"
10569
+ },
10570
+ className: cn(className),
10571
+ style,
10572
+ id,
10573
+ children
10574
+ }
10575
+ );
10576
+ }
10577
+ );
10578
+ ScrollRevealItem.displayName = "ScrollRevealItem";
10781
10579
  var separatorVariants = classVarianceAuthority.cva(
10782
10580
  "shrink-0 bg-border",
10783
10581
  {
@@ -10898,81 +10696,17 @@ var Separator3 = t__namespace.forwardRef(
10898
10696
  )
10899
10697
  );
10900
10698
  Separator3.displayName = SeparatorPrimitive__namespace.Root.displayName;
10901
- var useInsertionEffect2 = t__namespace[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
10902
- function useControllableState2({
10903
- prop,
10904
- defaultProp,
10905
- onChange = () => {
10906
- },
10907
- caller
10908
- }) {
10909
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState2({
10910
- defaultProp,
10911
- onChange
10912
- });
10913
- const isControlled = prop !== void 0;
10914
- const value = isControlled ? prop : uncontrolledProp;
10915
- {
10916
- const isControlledRef = t__namespace.useRef(prop !== void 0);
10917
- t__namespace.useEffect(() => {
10918
- const wasControlled = isControlledRef.current;
10919
- if (wasControlled !== isControlled) {
10920
- const from = wasControlled ? "controlled" : "uncontrolled";
10921
- const to = isControlled ? "controlled" : "uncontrolled";
10922
- console.warn(
10923
- `${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.`
10924
- );
10925
- }
10926
- isControlledRef.current = isControlled;
10927
- }, [isControlled, caller]);
10928
- }
10929
- const setValue = t__namespace.useCallback(
10930
- (nextValue) => {
10931
- if (isControlled) {
10932
- const value2 = isFunction3(nextValue) ? nextValue(prop) : nextValue;
10933
- if (value2 !== prop) {
10934
- onChangeRef.current?.(value2);
10935
- }
10936
- } else {
10937
- setUncontrolledProp(nextValue);
10938
- }
10939
- },
10940
- [isControlled, prop, setUncontrolledProp, onChangeRef]
10941
- );
10942
- return [value, setValue];
10943
- }
10944
- function useUncontrolledState2({
10945
- defaultProp,
10946
- onChange
10947
- }) {
10948
- const [value, setValue] = t__namespace.useState(defaultProp);
10949
- const prevValueRef = t__namespace.useRef(value);
10950
- const onChangeRef = t__namespace.useRef(onChange);
10951
- useInsertionEffect2(() => {
10952
- onChangeRef.current = onChange;
10953
- }, [onChange]);
10954
- t__namespace.useEffect(() => {
10955
- if (prevValueRef.current !== value) {
10956
- onChangeRef.current?.(value);
10957
- prevValueRef.current = value;
10958
- }
10959
- }, [value, prevValueRef]);
10960
- return [value, setValue, onChangeRef];
10961
- }
10962
- function isFunction3(value) {
10963
- return typeof value === "function";
10964
- }
10965
10699
  var NAME = "Toggle";
10966
10700
  var Toggle = t__namespace.forwardRef((props, forwardedRef) => {
10967
10701
  const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;
10968
- const [pressed, setPressed] = useControllableState2({
10702
+ const [pressed, setPressed] = useControllableState({
10969
10703
  prop: pressedProp,
10970
10704
  onChange: onPressedChange,
10971
10705
  defaultProp: defaultPressed ?? false,
10972
10706
  caller: NAME
10973
10707
  });
10974
10708
  return /* @__PURE__ */ jsxRuntime.jsx(
10975
- Primitive2.button,
10709
+ Primitive.button,
10976
10710
  {
10977
10711
  type: "button",
10978
10712
  "aria-pressed": pressed,
@@ -10980,7 +10714,7 @@ var Toggle = t__namespace.forwardRef((props, forwardedRef) => {
10980
10714
  "data-disabled": props.disabled ? "" : void 0,
10981
10715
  ...buttonProps,
10982
10716
  ref: forwardedRef,
10983
- onClick: composeEventHandlers2(props.onClick, () => {
10717
+ onClick: composeEventHandlers(props.onClick, () => {
10984
10718
  if (!props.disabled) {
10985
10719
  setPressed(!pressed);
10986
10720
  }
@@ -11170,7 +10904,7 @@ var SimpleEditor = t__namespace.default.forwardRef(
11170
10904
  const [content, setContent] = t.useState(value);
11171
10905
  const [isPreview, setIsPreview] = t.useState(false);
11172
10906
  const [sourceContent, setSourceContent] = t.useState(value);
11173
- t.useState(null);
10907
+ const [selection, setSelection] = t.useState(null);
11174
10908
  const editorRef = t__namespace.default.useRef(null);
11175
10909
  const sourceRef = t__namespace.default.useRef(null);
11176
10910
  const [formatState, setFormatState] = t.useState({
@@ -11199,8 +10933,7 @@ var SimpleEditor = t__namespace.default.forwardRef(
11199
10933
  return null;
11200
10934
  }, []);
11201
10935
  t.useCallback((range) => {
11202
- if (!range)
11203
- return;
10936
+ if (!range) return;
11204
10937
  const selection2 = window.getSelection();
11205
10938
  if (selection2) {
11206
10939
  selection2.removeAllRanges();
@@ -11208,8 +10941,7 @@ var SimpleEditor = t__namespace.default.forwardRef(
11208
10941
  }
11209
10942
  }, []);
11210
10943
  const executeCommand = t.useCallback((command, value2) => {
11211
- if (disabled)
11212
- return;
10944
+ if (disabled) return;
11213
10945
  if (editorRef.current) {
11214
10946
  editorRef.current.focus();
11215
10947
  }
@@ -11668,7 +11400,7 @@ var SimpleEditor = t__namespace.default.forwardRef(
11668
11400
  );
11669
11401
  SimpleEditor.displayName = "SimpleEditor";
11670
11402
  var CharacterCount = ({ content }) => {
11671
- const [count4, setCount] = t.useState(0);
11403
+ const [count3, setCount] = t.useState(0);
11672
11404
  t.useEffect(() => {
11673
11405
  const getPlainText = (html) => {
11674
11406
  const div = document.createElement("div");
@@ -11678,7 +11410,7 @@ var CharacterCount = ({ content }) => {
11678
11410
  setCount(getPlainText(content).length);
11679
11411
  }, [content]);
11680
11412
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11681
- count4,
11413
+ count3,
11682
11414
  " characters"
11683
11415
  ] });
11684
11416
  };
@@ -11947,19 +11679,16 @@ var SwipeableCard = t__namespace.forwardRef(
11947
11679
  const [currentX, setCurrentX] = t__namespace.useState(0);
11948
11680
  const [isSwiping, setIsSwiping] = t__namespace.useState(false);
11949
11681
  const handleTouchStart = (e) => {
11950
- if (disabled)
11951
- return;
11682
+ if (disabled) return;
11952
11683
  setStartX(e.touches[0].clientX);
11953
11684
  setIsSwiping(true);
11954
11685
  };
11955
11686
  const handleTouchMove = (e) => {
11956
- if (disabled || !isSwiping)
11957
- return;
11687
+ if (disabled || !isSwiping) return;
11958
11688
  setCurrentX(e.touches[0].clientX);
11959
11689
  };
11960
11690
  const handleTouchEnd = () => {
11961
- if (disabled || !isSwiping)
11962
- return;
11691
+ if (disabled || !isSwiping) return;
11963
11692
  const deltaX = currentX - startX;
11964
11693
  if (Math.abs(deltaX) > threshold) {
11965
11694
  if (deltaX > 0 && onSwipeRight) {
@@ -12063,8 +11792,7 @@ var TagsInput = t__namespace.forwardRef(
12063
11792
  };
12064
11793
  const addTag = () => {
12065
11794
  const tag = inputValue.trim();
12066
- if (!tag)
12067
- return;
11795
+ if (!tag) return;
12068
11796
  if (!allowDuplicates && value.includes(tag)) {
12069
11797
  setError("This tag already exists");
12070
11798
  setTimeout(() => setError(""), 2e3);
@@ -12080,8 +11808,7 @@ var TagsInput = t__namespace.forwardRef(
12080
11808
  setError("");
12081
11809
  };
12082
11810
  const removeTag = (index) => {
12083
- if (disabled)
12084
- return;
11811
+ if (disabled) return;
12085
11812
  onChange(value.filter((_, i) => i !== index));
12086
11813
  };
12087
11814
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
@@ -12345,8 +12072,7 @@ function toast({ ...props }) {
12345
12072
  id,
12346
12073
  open: true,
12347
12074
  onOpenChange: (open) => {
12348
- if (!open)
12349
- dismiss();
12075
+ if (!open) dismiss();
12350
12076
  }
12351
12077
  }
12352
12078
  });
@@ -12416,15 +12142,15 @@ function Toaster() {
12416
12142
  *)
12417
12143
  */
12418
12144
 
12419
- Object.defineProperty(exports, 'Palette', {
12145
+ Object.defineProperty(exports, "Palette", {
12420
12146
  enumerable: true,
12421
12147
  get: function () { return lucideReact.Palette; }
12422
12148
  });
12423
- Object.defineProperty(exports, 'Pipette', {
12149
+ Object.defineProperty(exports, "Pipette", {
12424
12150
  enumerable: true,
12425
12151
  get: function () { return lucideReact.Pipette; }
12426
12152
  });
12427
- Object.defineProperty(exports, 'format', {
12153
+ Object.defineProperty(exports, "format", {
12428
12154
  enumerable: true,
12429
12155
  get: function () { return dateFns.format; }
12430
12156
  });
@@ -12624,6 +12350,9 @@ exports.MoonUIRadioLabel = RadioLabel;
12624
12350
  exports.MoonUIRichTextEditor = RichTextEditor;
12625
12351
  exports.MoonUIScrollArea = ScrollArea2;
12626
12352
  exports.MoonUIScrollBar = ScrollBar;
12353
+ exports.MoonUIScrollReveal = ScrollReveal;
12354
+ exports.MoonUIScrollRevealContainer = ScrollRevealContainer;
12355
+ exports.MoonUIScrollRevealItem = ScrollRevealItem;
12627
12356
  exports.MoonUISelect = Select;
12628
12357
  exports.MoonUISelectContent = SelectContent;
12629
12358
  exports.MoonUISelectGroup = SelectGroup;
@@ -12697,6 +12426,9 @@ exports.RadioLabel = RadioLabel;
12697
12426
  exports.RichTextEditor = RichTextEditor;
12698
12427
  exports.ScrollArea = ScrollArea2;
12699
12428
  exports.ScrollBar = ScrollBar;
12429
+ exports.ScrollReveal = ScrollReveal;
12430
+ exports.ScrollRevealContainer = ScrollRevealContainer;
12431
+ exports.ScrollRevealItem = ScrollRevealItem;
12700
12432
  exports.Select = Select;
12701
12433
  exports.SelectContent = SelectContent;
12702
12434
  exports.SelectGroup = SelectGroup;
@@ -12765,5 +12497,5 @@ exports.toast = toast;
12765
12497
  exports.toggleVariants = toggleVariants;
12766
12498
  exports.tooltipVariants = tooltipVariants;
12767
12499
  exports.useToast = useToast;
12768
- //# sourceMappingURL=out.js.map
12500
+ //# sourceMappingURL=index.js.map
12769
12501
  //# sourceMappingURL=index.js.map