@underverse-ui/underverse 1.0.82 → 1.0.84

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
@@ -7749,19 +7749,23 @@ var variantClasses2 = {
7749
7749
  accent: "bg-accent/10"
7750
7750
  };
7751
7751
  var ScrollArea = forwardRef6(
7752
- ({ className, contentClassName, children, variant = "default", outlined = false, useOverlayScrollbar = false, ...props }, ref) => {
7752
+ ({
7753
+ className,
7754
+ contentClassName,
7755
+ children,
7756
+ variant = "default",
7757
+ outlined = false,
7758
+ overflowHidden = true,
7759
+ useOverlayScrollbar = false,
7760
+ ...props
7761
+ }, ref) => {
7753
7762
  const viewportRef = useRef11(null);
7754
7763
  useOverlayScrollbarTarget(viewportRef, { enabled: useOverlayScrollbar });
7755
7764
  return /* @__PURE__ */ jsx32(
7756
7765
  "div",
7757
7766
  {
7758
7767
  ref,
7759
- className: cn(
7760
- "relative overflow-hidden rounded-2xl md:rounded-3xl",
7761
- variantClasses2[variant],
7762
- outlined && "border border-border/60",
7763
- className
7764
- ),
7768
+ className: cn("relative", variantClasses2[variant], outlined && "border border-border/60", overflowHidden && "overflow-hidden", className),
7765
7769
  ...props,
7766
7770
  children: /* @__PURE__ */ jsx32("div", { ref: viewportRef, className: cn("h-full w-full overflow-y-auto scroll-area-viewport", contentClassName), children })
7767
7771
  }
@@ -7774,13 +7778,13 @@ ScrollArea.displayName = "ScrollArea";
7774
7778
  import { forwardRef as forwardRef7, useRef as useRef12 } from "react";
7775
7779
  import { jsx as jsx33 } from "react/jsx-runtime";
7776
7780
  var OverlayScrollArea = forwardRef7(
7777
- ({ className, viewportClassName, viewportProps, enabled = true, overlayScrollbarOptions, children, ...props }, ref) => {
7781
+ ({ className, viewportClassName, viewportProps, enabled = true, overflowHidden = true, overlayScrollbarOptions, children, ...props }, ref) => {
7778
7782
  const viewportRef = useRef12(null);
7779
7783
  useOverlayScrollbarTarget(viewportRef, {
7780
7784
  enabled,
7781
7785
  ...overlayScrollbarOptions
7782
7786
  });
7783
- return /* @__PURE__ */ jsx33("div", { ref, className: cn("relative overflow-hidden", className), ...props, children: /* @__PURE__ */ jsx33(
7787
+ return /* @__PURE__ */ jsx33("div", { ref, className: cn("relative", overflowHidden && "overflow-hidden", className), ...props, children: /* @__PURE__ */ jsx33(
7784
7788
  "div",
7785
7789
  {
7786
7790
  ref: viewportRef,
@@ -8568,10 +8572,27 @@ var DatePicker = ({
8568
8572
  effectiveError && /* @__PURE__ */ jsx34("div", { className: "text-xs text-destructive", children: effectiveError })
8569
8573
  ] });
8570
8574
  };
8571
- var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select date range...", className, disablePastDates = false, minDate, maxDate, size = "md" }) => {
8575
+ var DateRangePicker = ({
8576
+ id,
8577
+ startDate,
8578
+ endDate,
8579
+ onChange,
8580
+ placeholder = "Select date range...",
8581
+ className,
8582
+ label,
8583
+ labelClassName,
8584
+ required = false,
8585
+ disablePastDates = false,
8586
+ minDate,
8587
+ maxDate,
8588
+ size = "md"
8589
+ }) => {
8572
8590
  const locale = useSmartLocale();
8573
8591
  const t = useSmartTranslations("DatePicker");
8592
+ const tv = useSmartTranslations("ValidationInput");
8574
8593
  const [isOpen, setIsOpen] = React28.useState(false);
8594
+ const [viewMode, setViewMode] = React28.useState("calendar");
8595
+ const [localRequiredError, setLocalRequiredError] = React28.useState();
8575
8596
  const wheelContainerRef = React28.useRef(null);
8576
8597
  const wheelDeltaRef = React28.useRef(0);
8577
8598
  const sizeStyles8 = {
@@ -8643,6 +8664,16 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
8643
8664
  React28.useEffect(() => {
8644
8665
  setTempEnd(normalizeToLocal(endDate));
8645
8666
  }, [endDate]);
8667
+ React28.useEffect(() => {
8668
+ if (!isOpen) {
8669
+ setViewMode("calendar");
8670
+ }
8671
+ }, [isOpen]);
8672
+ React28.useEffect(() => {
8673
+ if (!required || startDate && endDate) {
8674
+ setLocalRequiredError(void 0);
8675
+ }
8676
+ }, [endDate, required, startDate]);
8646
8677
  const isSameDay2 = (a, b) => {
8647
8678
  if (!a || !b) return false;
8648
8679
  return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
@@ -8653,6 +8684,9 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
8653
8684
  const navigateMonth = React28.useCallback((direction) => {
8654
8685
  setViewDate((prev) => new Date(prev.getFullYear(), prev.getMonth() + (direction === "next" ? 1 : -1), 1));
8655
8686
  }, []);
8687
+ const navigateYearRange = React28.useCallback((direction) => {
8688
+ setViewDate((prev) => new Date(prev.getFullYear() + (direction === "next" ? 12 : -12), prev.getMonth(), 1));
8689
+ }, []);
8656
8690
  const isElementVerticallyScrollable = (el) => {
8657
8691
  const style = window.getComputedStyle(el);
8658
8692
  const overflowY = style.overflowY;
@@ -8697,11 +8731,33 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
8697
8731
  setTempStart(localDate);
8698
8732
  } else {
8699
8733
  setTempEnd(localDate);
8734
+ setLocalRequiredError(void 0);
8700
8735
  onChange(tempStart, localDate);
8701
8736
  setIsOpen(false);
8702
8737
  }
8703
8738
  }
8704
8739
  };
8740
+ const handleSelectToday = () => {
8741
+ const today = /* @__PURE__ */ new Date();
8742
+ today.setHours(0, 0, 0, 0);
8743
+ const localToday = new Date(today.getFullYear(), today.getMonth(), today.getDate());
8744
+ const isPastDate = disablePastDates && localToday < today;
8745
+ const isOutOfRange = !!minDay && localToday < minDay || !!maxDay && localToday > maxDay;
8746
+ if (isPastDate || isOutOfRange) return;
8747
+ setTempStart(localToday);
8748
+ setTempEnd(localToday);
8749
+ setHoveredDate(null);
8750
+ setLocalRequiredError(void 0);
8751
+ onChange(localToday, localToday);
8752
+ setIsOpen(false);
8753
+ };
8754
+ const handleClear = () => {
8755
+ setTempStart(null);
8756
+ setTempEnd(null);
8757
+ setHoveredDate(null);
8758
+ onChange(void 0, void 0);
8759
+ setIsOpen(false);
8760
+ };
8705
8761
  const renderGrid = () => {
8706
8762
  const nodes = [];
8707
8763
  const daysInMonth = getDaysInMonth(viewDate);
@@ -8770,13 +8826,63 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
8770
8826
  }
8771
8827
  return nodes;
8772
8828
  };
8829
+ const renderMonthSelector = () => {
8830
+ const months = locale === "vi" ? ["Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12"] : ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
8831
+ return /* @__PURE__ */ jsx34("div", { className: "grid grid-cols-3 gap-2 p-2", children: months.map((month, idx) => {
8832
+ const isSelected = viewDate.getMonth() === idx;
8833
+ return /* @__PURE__ */ jsx34(
8834
+ "button",
8835
+ {
8836
+ type: "button",
8837
+ onClick: () => {
8838
+ setViewDate(new Date(viewDate.getFullYear(), idx, 1));
8839
+ setViewMode("calendar");
8840
+ },
8841
+ className: cn(
8842
+ "py-2 px-3 rounded-lg text-sm font-medium transition-all duration-200",
8843
+ isSelected ? "bg-primary text-primary-foreground shadow-md" : "hover:bg-accent/80 text-foreground hover:scale-105"
8844
+ ),
8845
+ children: month
8846
+ },
8847
+ month
8848
+ );
8849
+ }) });
8850
+ };
8851
+ const renderYearSelector = () => {
8852
+ const startYear = Math.floor(viewDate.getFullYear() / 12) * 12;
8853
+ const years = Array.from({ length: 12 }, (_, i) => startYear + i);
8854
+ return /* @__PURE__ */ jsx34("div", { className: "grid grid-cols-3 gap-2 p-2", children: years.map((year) => {
8855
+ const isSelected = viewDate.getFullYear() === year;
8856
+ return /* @__PURE__ */ jsx34(
8857
+ "button",
8858
+ {
8859
+ type: "button",
8860
+ onClick: () => {
8861
+ setViewDate(new Date(year, viewDate.getMonth(), 1));
8862
+ setViewMode("month");
8863
+ },
8864
+ className: cn(
8865
+ "py-2 px-3 rounded-lg text-sm font-medium transition-all duration-200",
8866
+ isSelected ? "bg-primary text-primary-foreground shadow-md" : "hover:bg-accent/80 text-foreground hover:scale-105"
8867
+ ),
8868
+ children: year
8869
+ },
8870
+ year
8871
+ );
8872
+ }) });
8873
+ };
8874
+ const todayDate = React28.useMemo(() => {
8875
+ const today = /* @__PURE__ */ new Date();
8876
+ return new Date(today.getFullYear(), today.getMonth(), today.getDate());
8877
+ }, []);
8878
+ const isTodayUnavailable = !!minDay && todayDate < minDay || !!maxDay && todayDate > maxDay;
8773
8879
  const panel = /* @__PURE__ */ jsxs24("div", { ref: wheelContainerRef, className: "w-full", children: [
8774
8880
  /* @__PURE__ */ jsxs24("div", { className: cn("flex items-center justify-between px-1", sizeStyles8[size].headerMargin), children: [
8775
8881
  /* @__PURE__ */ jsx34(
8776
8882
  "button",
8777
8883
  {
8778
8884
  type: "button",
8779
- onClick: () => navigateMonth("prev"),
8885
+ onClick: () => viewMode === "year" ? navigateYearRange("prev") : navigateMonth("prev"),
8780
8886
  className: cn(
8781
8887
  "rounded-xl transition-all duration-200",
8782
8888
  sizeStyles8[size].navButton,
@@ -8787,15 +8893,39 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
8787
8893
  children: /* @__PURE__ */ jsx34(ChevronLeft2, { className: sizeStyles8[size].navIcon })
8788
8894
  }
8789
8895
  ),
8790
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col items-center", children: [
8791
- /* @__PURE__ */ jsx34("span", { className: cn("font-bold text-foreground", size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm"), children: viewDate.toLocaleDateString(locale === "vi" ? "vi-VN" : "en-US", { month: "long" }) }),
8792
- /* @__PURE__ */ jsx34("span", { className: cn("text-muted-foreground font-medium", size === "sm" ? "text-[10px]" : size === "lg" ? "text-sm" : "text-xs"), children: viewDate.getFullYear() })
8896
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1", children: [
8897
+ /* @__PURE__ */ jsx34(
8898
+ "button",
8899
+ {
8900
+ type: "button",
8901
+ onClick: () => setViewMode(viewMode === "month" ? "calendar" : "month"),
8902
+ className: cn(
8903
+ "rounded-lg px-2 py-0.5 font-bold transition-colors duration-200",
8904
+ size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
8905
+ viewMode === "month" ? "bg-primary/15 text-primary" : "text-foreground hover:bg-accent/50"
8906
+ ),
8907
+ children: viewDate.toLocaleDateString(locale === "vi" ? "vi-VN" : "en-US", { month: "long" })
8908
+ }
8909
+ ),
8910
+ /* @__PURE__ */ jsx34(
8911
+ "button",
8912
+ {
8913
+ type: "button",
8914
+ onClick: () => setViewMode(viewMode === "year" ? "calendar" : "year"),
8915
+ className: cn(
8916
+ "rounded-lg px-2 py-0.5 font-medium transition-colors duration-200",
8917
+ size === "sm" ? "text-[10px]" : size === "lg" ? "text-sm" : "text-xs",
8918
+ viewMode === "year" ? "bg-primary/15 text-primary" : "text-muted-foreground hover:bg-accent/50 hover:text-foreground"
8919
+ ),
8920
+ children: viewDate.getFullYear()
8921
+ }
8922
+ )
8793
8923
  ] }),
8794
8924
  /* @__PURE__ */ jsx34(
8795
8925
  "button",
8796
8926
  {
8797
8927
  type: "button",
8798
- onClick: () => navigateMonth("next"),
8928
+ onClick: () => viewMode === "year" ? navigateYearRange("next") : navigateMonth("next"),
8799
8929
  className: cn(
8800
8930
  "rounded-xl transition-all duration-200",
8801
8931
  sizeStyles8[size].navButton,
@@ -8807,82 +8937,167 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
8807
8937
  }
8808
8938
  )
8809
8939
  ] }),
8810
- /* @__PURE__ */ jsx34("div", { className: cn("grid grid-cols-7 gap-1 px-0.5", size === "sm" ? "mb-1" : size === "lg" ? "mb-3" : "mb-2"), children: (locale === "vi" ? ["CN", "T2", "T3", "T4", "T5", "T6", "T7"] : ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]).map((d, idx) => /* @__PURE__ */ jsx34(
8811
- "div",
8812
- {
8813
- className: cn(
8814
- "text-center font-bold uppercase tracking-wide",
8815
- sizeStyles8[size].weekdayLabel,
8816
- idx === 0 || idx === 6 ? "text-primary/70" : "text-muted-foreground/60"
8817
- ),
8818
- children: d
8819
- },
8820
- d
8821
- )) }),
8822
- /* @__PURE__ */ jsx34("div", { className: "grid grid-cols-7 gap-0.5 p-1 rounded-xl bg-muted/20", children: renderGrid() })
8823
- ] });
8824
- const displayFormat = (date) => formatDateShort(date);
8825
- const label = tempStart && tempEnd ? `${displayFormat(tempStart)} - ${displayFormat(tempEnd)}` : tempStart ? `${displayFormat(tempStart)} - ...` : placeholder;
8826
- return /* @__PURE__ */ jsx34(
8827
- Popover,
8828
- {
8829
- open: isOpen,
8830
- onOpenChange: setIsOpen,
8831
- placement: "bottom-start",
8832
- contentWidth: size === "sm" ? 240 : 280,
8833
- contentClassName: cn(
8834
- "p-0",
8835
- "backdrop-blur-xl bg-popover/95 border-border/40 shadow-2xl",
8836
- "rounded-2xl md:rounded-3xl",
8837
- "max-w-[calc(100vw-1rem)] max-h-[calc(100vh-6rem)] overflow-auto overscroll-contain",
8838
- size === "sm" ? "p-3" : "p-5",
8839
- "animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-300"
8840
- ),
8841
- trigger: /* @__PURE__ */ jsxs24(
8940
+ viewMode === "calendar" && /* @__PURE__ */ jsxs24(Fragment6, { children: [
8941
+ /* @__PURE__ */ jsx34("div", { className: cn("grid grid-cols-7 gap-1 px-0.5", size === "sm" ? "mb-1" : size === "lg" ? "mb-3" : "mb-2"), children: (locale === "vi" ? ["CN", "T2", "T3", "T4", "T5", "T6", "T7"] : ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]).map((d, idx) => /* @__PURE__ */ jsx34(
8942
+ "div",
8943
+ {
8944
+ className: cn(
8945
+ "text-center font-bold uppercase tracking-wide",
8946
+ sizeStyles8[size].weekdayLabel,
8947
+ idx === 0 || idx === 6 ? "text-primary/70" : "text-muted-foreground/60"
8948
+ ),
8949
+ children: d
8950
+ },
8951
+ d
8952
+ )) }),
8953
+ /* @__PURE__ */ jsx34("div", { className: "grid grid-cols-7 gap-0.5 p-1 rounded-xl bg-muted/20", children: renderGrid() })
8954
+ ] }),
8955
+ viewMode === "month" && renderMonthSelector(),
8956
+ viewMode === "year" && renderYearSelector(),
8957
+ /* @__PURE__ */ jsxs24("div", { className: cn("flex items-center border-t border-border/50", sizeStyles8[size].footerMargin), children: [
8958
+ /* @__PURE__ */ jsxs24(
8842
8959
  "button",
8843
8960
  {
8844
8961
  type: "button",
8962
+ onClick: handleSelectToday,
8963
+ disabled: isTodayUnavailable,
8845
8964
  className: cn(
8846
- "group flex w-full items-center justify-between rounded-full border bg-background/80 backdrop-blur-sm",
8847
- size === "sm" ? "px-2 py-1.5 text-xs" : "px-3 py-2.5 text-sm",
8848
- "border-border/60 hover:border-primary/40",
8849
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
8850
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5",
8851
- "transition-all duration-300 ease-out",
8852
- isOpen && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
8853
- className
8965
+ "flex-1 font-semibold rounded-xl",
8966
+ "bg-linear-to-r from-primary/10 to-primary/5 border border-primary/30",
8967
+ "text-primary hover:from-primary/20 hover:to-primary/10 hover:border-primary/50",
8968
+ "transition-all duration-300 flex items-center justify-center",
8969
+ "hover:scale-[1.02] active:scale-[0.98] hover:shadow-md hover:shadow-primary/10",
8970
+ sizeStyles8[size].actionButton,
8971
+ isTodayUnavailable && "opacity-50 cursor-not-allowed hover:scale-100 active:scale-100"
8854
8972
  ),
8855
8973
  children: [
8856
- /* @__PURE__ */ jsxs24("div", { className: cn("flex items-center", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
8857
- /* @__PURE__ */ jsx34(
8858
- "div",
8859
- {
8860
- className: cn(
8861
- "flex items-center justify-center transition-colors duration-300",
8862
- isOpen ? "text-primary" : "text-muted-foreground group-hover:text-primary"
8863
- ),
8864
- children: /* @__PURE__ */ jsx34(Calendar, { className: cn("transition-transform duration-300", size === "sm" ? "h-3 w-3" : "h-4 w-4", isOpen && "scale-110") })
8865
- }
8866
- ),
8867
- /* @__PURE__ */ jsx34(
8868
- "span",
8869
- {
8870
- className: cn(
8871
- "truncate font-medium transition-colors duration-200",
8872
- !tempStart && !tempEnd && "text-muted-foreground",
8873
- (tempStart || tempEnd) && "text-foreground"
8874
- ),
8875
- children: label
8876
- }
8877
- )
8878
- ] }),
8879
- /* @__PURE__ */ jsx34("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx34("svg", { className: cn(size === "sm" ? "h-3 w-3" : "h-4 w-4"), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx34("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
8974
+ /* @__PURE__ */ jsx34(Sparkles2, { className: sizeStyles8[size].actionIcon }),
8975
+ t("today")
8880
8976
  ]
8881
8977
  }
8882
8978
  ),
8883
- children: panel
8884
- }
8885
- );
8979
+ /* @__PURE__ */ jsxs24(
8980
+ "button",
8981
+ {
8982
+ type: "button",
8983
+ onClick: handleClear,
8984
+ className: cn(
8985
+ "flex-1 font-semibold rounded-xl",
8986
+ "bg-linear-to-r from-destructive/10 to-destructive/5 border border-destructive/30",
8987
+ "text-destructive hover:from-destructive/20 hover:to-destructive/10 hover:border-destructive/50",
8988
+ "transition-all duration-300 flex items-center justify-center",
8989
+ "hover:scale-[1.02] active:scale-[0.98] hover:shadow-md hover:shadow-destructive/10",
8990
+ sizeStyles8[size].actionButton
8991
+ ),
8992
+ children: [
8993
+ /* @__PURE__ */ jsx34(XIcon, { className: sizeStyles8[size].actionIcon }),
8994
+ t("clear")
8995
+ ]
8996
+ }
8997
+ )
8998
+ ] })
8999
+ ] });
9000
+ const displayFormat = (date) => formatDateShort(date);
9001
+ const displayLabel = tempStart && tempEnd ? `${displayFormat(tempStart)} - ${displayFormat(tempEnd)}` : tempStart ? `${displayFormat(tempStart)} - ...` : placeholder;
9002
+ const effectiveError = localRequiredError;
9003
+ const autoId = useId6();
9004
+ const resolvedId = id ? String(id) : `daterangepicker-${autoId}`;
9005
+ const labelId = label ? `${resolvedId}-label` : void 0;
9006
+ return /* @__PURE__ */ jsxs24("div", { className: cn("space-y-1.5", className), children: [
9007
+ label && /* @__PURE__ */ jsxs24(
9008
+ "label",
9009
+ {
9010
+ id: labelId,
9011
+ htmlFor: resolvedId,
9012
+ className: cn(size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm", "font-medium text-foreground", effectiveError && "text-destructive", labelClassName),
9013
+ children: [
9014
+ label,
9015
+ required && /* @__PURE__ */ jsx34("span", { className: "text-destructive ml-1", children: "*" })
9016
+ ]
9017
+ }
9018
+ ),
9019
+ /* @__PURE__ */ jsx34(
9020
+ "input",
9021
+ {
9022
+ tabIndex: -1,
9023
+ "aria-hidden": "true",
9024
+ value: startDate && endDate ? "selected" : "",
9025
+ onChange: () => {
9026
+ },
9027
+ required,
9028
+ onInvalid: (e) => {
9029
+ e.preventDefault();
9030
+ setLocalRequiredError(tv("required"));
9031
+ },
9032
+ className: "pointer-events-none absolute h-0 w-0 opacity-0"
9033
+ }
9034
+ ),
9035
+ /* @__PURE__ */ jsx34(
9036
+ Popover,
9037
+ {
9038
+ open: isOpen,
9039
+ onOpenChange: setIsOpen,
9040
+ placement: "bottom-start",
9041
+ contentWidth: sizeStyles8[size].contentWidth,
9042
+ contentClassName: cn(
9043
+ "p-0",
9044
+ "backdrop-blur-xl bg-popover/95 border-border/40 shadow-2xl",
9045
+ "rounded-2xl md:rounded-3xl",
9046
+ "max-w-[calc(100vw-1rem)] max-h-[calc(100vh-6rem)] overflow-auto overscroll-contain",
9047
+ sizeStyles8[size].contentPadding,
9048
+ "animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-300"
9049
+ ),
9050
+ trigger: /* @__PURE__ */ jsxs24(
9051
+ "button",
9052
+ {
9053
+ id: resolvedId,
9054
+ type: "button",
9055
+ "aria-labelledby": labelId,
9056
+ "aria-required": required,
9057
+ "aria-invalid": !!effectiveError,
9058
+ className: cn(
9059
+ "group flex w-full items-center justify-between rounded-full border bg-background/80 backdrop-blur-sm",
9060
+ sizeStyles8[size].trigger,
9061
+ "border-border/60 hover:border-primary/40",
9062
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
9063
+ "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5",
9064
+ "transition-all duration-300 ease-out",
9065
+ isOpen && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
9066
+ effectiveError && "border-destructive/60 focus-visible:ring-destructive/50 bg-destructive/5"
9067
+ ),
9068
+ children: [
9069
+ /* @__PURE__ */ jsxs24("div", { className: cn("flex items-center", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
9070
+ /* @__PURE__ */ jsx34(
9071
+ "div",
9072
+ {
9073
+ className: cn(
9074
+ "flex items-center justify-center transition-colors duration-300",
9075
+ effectiveError ? "text-destructive" : isOpen ? "text-primary" : "text-muted-foreground group-hover:text-primary"
9076
+ ),
9077
+ children: /* @__PURE__ */ jsx34(Calendar, { className: cn("transition-transform duration-300", sizeStyles8[size].calendarIcon, isOpen && "scale-110") })
9078
+ }
9079
+ ),
9080
+ /* @__PURE__ */ jsx34(
9081
+ "span",
9082
+ {
9083
+ className: cn(
9084
+ "truncate font-medium transition-colors duration-200",
9085
+ !tempStart && !tempEnd && "text-muted-foreground",
9086
+ (tempStart || tempEnd) && "text-foreground"
9087
+ ),
9088
+ children: displayLabel
9089
+ }
9090
+ )
9091
+ ] }),
9092
+ /* @__PURE__ */ jsx34("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx34("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx34("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
9093
+ ]
9094
+ }
9095
+ ),
9096
+ children: panel
9097
+ }
9098
+ ),
9099
+ effectiveError && /* @__PURE__ */ jsx34("div", { className: "text-xs text-destructive", children: effectiveError })
9100
+ ] });
8886
9101
  };
8887
9102
  var CompactDatePicker = ({ value, onChange, className }) => {
8888
9103
  return /* @__PURE__ */ jsx34(
@@ -18582,6 +18797,7 @@ var ListRoot = React46.forwardRef(
18582
18797
  className,
18583
18798
  itemClassName,
18584
18799
  // New prop
18800
+ overflowHidden = true,
18585
18801
  children,
18586
18802
  ...rest
18587
18803
  }, ref) => {
@@ -18595,21 +18811,36 @@ var ListRoot = React46.forwardRef(
18595
18811
  bordered: "border border-border/50 rounded-2xl md:rounded-3xl max-md:rounded-xl",
18596
18812
  card: "rounded-2xl md:rounded-3xl bg-card shadow-md border border-border/50 max-md:rounded-xl max-md:shadow-sm",
18597
18813
  flush: "",
18598
- striped: "rounded-2xl md:rounded-3xl border border-border/50 overflow-hidden max-md:rounded-xl"
18814
+ striped: "rounded-2xl md:rounded-3xl border border-border/50 max-md:rounded-xl"
18599
18815
  };
18600
18816
  if (loading2) {
18601
18817
  return /* @__PURE__ */ jsx54(
18602
18818
  Comp,
18603
18819
  {
18604
18820
  ref,
18605
- className: cn("group/list", variantClasses3[variant], inset && "p-1.5 md:p-2 max-md:p-1", divided && "divide-y divide-border/60", className),
18821
+ className: cn(
18822
+ "group/list",
18823
+ variantClasses3[variant],
18824
+ variant === "striped" && overflowHidden && "overflow-hidden",
18825
+ inset && "p-1.5 md:p-2 max-md:p-1",
18826
+ divided && "divide-y divide-border/60",
18827
+ className
18828
+ ),
18606
18829
  ...rest,
18607
18830
  children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ jsx54(ListItemSkeleton, { size }, i))
18608
18831
  }
18609
18832
  );
18610
18833
  }
18611
18834
  if (!hasChildren && emptyText) {
18612
- return /* @__PURE__ */ jsx54(Comp, { ref, className: cn("group/list", variantClasses3[variant], inset && "p-1.5 md:p-2 max-md:p-1", className), ...rest, children: /* @__PURE__ */ jsx54("div", { className: "text-center py-8 text-muted-foreground text-sm", children: emptyText }) });
18835
+ return /* @__PURE__ */ jsx54(
18836
+ Comp,
18837
+ {
18838
+ ref,
18839
+ className: cn("group/list", variantClasses3[variant], variant === "striped" && overflowHidden && "overflow-hidden", inset && "p-1.5 md:p-2 max-md:p-1", className),
18840
+ ...rest,
18841
+ children: /* @__PURE__ */ jsx54("div", { className: "text-center py-8 text-muted-foreground text-sm", children: emptyText })
18842
+ }
18843
+ );
18613
18844
  }
18614
18845
  return /* @__PURE__ */ jsx54(
18615
18846
  Comp,
@@ -18618,6 +18849,7 @@ var ListRoot = React46.forwardRef(
18618
18849
  className: cn(
18619
18850
  "group/list",
18620
18851
  variantClasses3[variant],
18852
+ variant === "striped" && overflowHidden && "overflow-hidden",
18621
18853
  inset && "p-1.5 md:p-2 max-md:p-1",
18622
18854
  divided && "divide-y divide-border/60",
18623
18855
  variant === "striped" && "[&>*:nth-child(even)]:bg-muted/30",
@@ -21712,6 +21944,7 @@ function DataTable({
21712
21944
  storageKey,
21713
21945
  stickyHeader = true,
21714
21946
  maxHeight = 500,
21947
+ overflowHidden = true,
21715
21948
  useOverlayScrollbar = false,
21716
21949
  enableHeaderAutoFit = true,
21717
21950
  labels
@@ -21845,7 +22078,8 @@ function DataTable({
21845
22078
  "div",
21846
22079
  {
21847
22080
  className: cn(
21848
- "relative rounded-2xl md:rounded-3xl border border-border/50 bg-card overflow-hidden",
22081
+ "relative rounded-2xl md:rounded-3xl border border-border/50 bg-card",
22082
+ overflowHidden && "overflow-hidden",
21849
22083
  loading2 && "opacity-60 pointer-events-none"
21850
22084
  ),
21851
22085
  children: /* @__PURE__ */ jsx67(