@underverse-ui/underverse 1.0.195 → 1.0.196

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "1.0.195",
3
+ "version": "1.0.196",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 252,
6
6
  "exports": [
package/dist/index.cjs CHANGED
@@ -267,6 +267,13 @@ function getBorderRadiusClass(borderMode = "full") {
267
267
  }
268
268
  return borderMode;
269
269
  }
270
+ function getPanelBorderRadiusClass(borderMode = "lg") {
271
+ const resolved = borderMode ?? "lg";
272
+ if (resolved === "full" || resolved === "infiniq") {
273
+ return "rounded-2xl";
274
+ }
275
+ return getBorderRadiusClass(resolved);
276
+ }
270
277
 
271
278
  // src/contexts/UnderverseConfigContext.tsx
272
279
  var React = __toESM(require("react"), 1);
@@ -698,7 +705,7 @@ var Card = import_react2.default.forwardRef(
698
705
  ref,
699
706
  className: cn(
700
707
  "group bg-card text-card-foreground transition-[transform,box-shadow,border-color,background-color] duration-300 ease-soft",
701
- resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl max-md:rounded-xl",
708
+ resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl max-md:rounded-xl",
702
709
  "border border-border/50 shadow-sm backdrop-blur-sm",
703
710
  hoverable && "md:hover:-translate-y-0.5 md:hover:border-primary/15 md:hover:shadow-md",
704
711
  clickable && "cursor-pointer active:translate-y-px active:bg-accent/5 md:hover:bg-accent/5 md:hover:shadow-md",
@@ -716,7 +723,7 @@ var Card = import_react2.default.forwardRef(
716
723
  role: isInteractive ? role ?? "button" : role,
717
724
  tabIndex: isInteractive ? tabIndex ?? 0 : tabIndex,
718
725
  ...rest,
719
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn("relative overflow-hidden", resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl max-md:rounded-xl", innerClassName), children: [
726
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn("relative overflow-hidden", resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl max-md:rounded-xl", innerClassName), children: [
720
727
  (hoverable || clickable) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
721
728
  "div",
722
729
  {
@@ -7135,7 +7142,7 @@ var Modal = ({
7135
7142
  ref: modalContentRef,
7136
7143
  className: cn(
7137
7144
  "relative w-full border border-border/40 bg-card text-card-foreground shadow-xl",
7138
- resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
7145
+ resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
7139
7146
  "transition-all duration-200 ease-out",
7140
7147
  maxWidthClass,
7141
7148
  fullWidth && "mx-0",
@@ -7835,7 +7842,7 @@ var Popover = ({
7835
7842
  {
7836
7843
  ...contentProps,
7837
7844
  className: cn(
7838
- resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
7845
+ resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
7839
7846
  "border bg-popover text-popover-foreground shadow-md",
7840
7847
  "backdrop-blur-sm bg-popover/95 border-border/60 p-4",
7841
7848
  contentProps?.className,
@@ -9430,7 +9437,7 @@ var Combobox = ({
9430
9437
  {
9431
9438
  "data-combobox-dropdown": true,
9432
9439
  "data-state": open ? "open" : "closed",
9433
- className: cn("w-full overflow-hidden", getBorderRadiusClass(resolvedBorderMode)),
9440
+ className: cn("w-full overflow-hidden", getPanelBorderRadiusClass(resolvedBorderMode)),
9434
9441
  children: [
9435
9442
  enableSearch && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("relative border-b border-border/30", size === "sm" ? "p-2" : size === "lg" ? "p-3" : "p-2.5"), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
9436
9443
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
@@ -9626,8 +9633,9 @@ var Combobox = ({
9626
9633
  }
9627
9634
  },
9628
9635
  className: cn(
9629
- "opacity-0 group-hover:opacity-100 transition-all duration-200",
9630
- "p-1 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive"
9636
+ "opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-all duration-200",
9637
+ "p-1 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
9638
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-destructive/50 focus-visible:ring-offset-1"
9631
9639
  ),
9632
9640
  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react15.X, { className: "h-3.5 w-3.5" })
9633
9641
  }
@@ -9701,14 +9709,14 @@ var Combobox = ({
9701
9709
  trigger: triggerButtonForPopover,
9702
9710
  placement: "bottom-start",
9703
9711
  matchTriggerWidth: true,
9704
- className: "z-9999",
9712
+ className: "z-50",
9705
9713
  borderMode: resolvedBorderMode,
9706
9714
  contentClassName: "p-0 overflow-hidden",
9707
9715
  children: dropdownBody
9708
9716
  }
9709
9717
  ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
9710
9718
  triggerButtonInline,
9711
- open && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("overflow-hidden border text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60", getBorderRadiusClass(resolvedBorderMode)), children: dropdownBody }) })
9719
+ open && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("overflow-hidden border text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60", getPanelBorderRadiusClass(resolvedBorderMode)), children: dropdownBody }) })
9712
9720
  ] }),
9713
9721
  (helperText || effectiveError) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
9714
9722
  "p",
@@ -10681,32 +10689,6 @@ var DatePicker = ({
10681
10689
  const node = el;
10682
10690
  return node.scrollHeight > node.clientHeight + 1;
10683
10691
  };
10684
- React34.useEffect(() => {
10685
- if (!isOpen) return;
10686
- const container = wheelContainerRef.current;
10687
- if (!container) return;
10688
- const onWheel = (event) => {
10689
- if (!container.contains(event.target)) return;
10690
- if (event.ctrlKey) return;
10691
- let node = event.target;
10692
- while (node && node !== container) {
10693
- if (isElementVerticallyScrollable(node)) return;
10694
- node = node.parentElement;
10695
- }
10696
- if (isElementVerticallyScrollable(container)) return;
10697
- event.preventDefault();
10698
- event.stopPropagation();
10699
- wheelDeltaRef.current += event.deltaY;
10700
- const threshold = 70;
10701
- if (Math.abs(wheelDeltaRef.current) < threshold) return;
10702
- const steps = Math.trunc(wheelDeltaRef.current / threshold);
10703
- wheelDeltaRef.current -= steps * threshold;
10704
- const direction = steps > 0 ? "next" : "prev";
10705
- for (let i = 0; i < Math.abs(steps); i++) navigateMonth(direction);
10706
- };
10707
- container.addEventListener("wheel", onWheel, { passive: false });
10708
- return () => container.removeEventListener("wheel", onWheel);
10709
- }, [isOpen, navigateMonth]);
10710
10692
  const renderCalendar = () => {
10711
10693
  const daysInMonth = getDaysInMonth(viewDate);
10712
10694
  const firstDayOfMonth = getFirstDayOfMonth(viewDate);
@@ -10733,10 +10715,10 @@ var DatePicker = ({
10733
10715
  },
10734
10716
  className: cn(
10735
10717
  sizeStyles8[size].dayCell,
10736
- "datepicker-day rounded-lg focus:outline-none relative cursor-pointer",
10737
- "transition-all duration-200 font-medium",
10738
- isDisabled && "opacity-30 cursor-not-allowed text-muted-foreground",
10739
- isSelected ? "bg-linear-to-br from-primary to-primary/80 text-primary-foreground font-bold shadow-lg shadow-primary/30 scale-110 z-10 hover:from-primary hover:to-primary/70" : !isDisabled && "hover:bg-accent/80 hover:text-accent-foreground hover:scale-105 focus:bg-accent focus:text-accent-foreground",
10718
+ "datepicker-day rounded-lg relative cursor-pointer",
10719
+ "transition-all duration-200 font-medium active:scale-95",
10720
+ isDisabled && "opacity-30 cursor-not-allowed text-muted-foreground active:scale-100",
10721
+ isSelected ? "bg-linear-to-br from-primary to-primary/80 text-primary-foreground font-bold shadow-lg shadow-primary/30 scale-110 z-10 hover:from-primary hover:to-primary/70 focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus:outline-none" : !isDisabled && "hover:bg-accent/80 hover:text-accent-foreground hover:scale-105 focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus:outline-none focus:bg-accent/90",
10740
10722
  isToday2 && !isSelected && "bg-primary/15 text-primary font-bold ring-2 ring-primary/30"
10741
10723
  ),
10742
10724
  children: [
@@ -10763,7 +10745,7 @@ var DatePicker = ({
10763
10745
  setViewMode("calendar");
10764
10746
  },
10765
10747
  className: cn(
10766
- "py-2 px-3 rounded-lg text-sm font-medium transition-all duration-200",
10748
+ "py-2 px-3 rounded-lg text-sm font-medium transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 active:scale-95",
10767
10749
  isSelected ? "bg-primary text-primary-foreground shadow-md" : "hover:bg-accent/80 text-foreground hover:scale-105"
10768
10750
  ),
10769
10751
  children: month
@@ -10787,7 +10769,7 @@ var DatePicker = ({
10787
10769
  setViewMode("month");
10788
10770
  },
10789
10771
  className: cn(
10790
- "py-2 px-3 rounded-lg text-sm font-medium transition-all duration-200",
10772
+ "py-2 px-3 rounded-lg text-sm font-medium transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 active:scale-95",
10791
10773
  isSelected ? "bg-primary text-primary-foreground shadow-md" : "hover:bg-accent/80 text-foreground hover:scale-105"
10792
10774
  ),
10793
10775
  children: year
@@ -19694,7 +19676,7 @@ var MultiCombobox = ({
19694
19676
  item.value
19695
19677
  );
19696
19678
  };
19697
- const dropdownBody = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { "data-combobox-dropdown": true, "data-state": open ? "open" : "closed", className: cn("w-full overflow-hidden", getBorderRadiusClass(resolvedBorderMode)), children: [
19679
+ const dropdownBody = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { "data-combobox-dropdown": true, "data-state": open ? "open" : "closed", className: cn("w-full overflow-hidden", getPanelBorderRadiusClass(resolvedBorderMode)), children: [
19698
19680
  value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "px-3 py-2 border-b border-border/40 flex items-center justify-between bg-muted/30", children: [
19699
19681
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-xs font-medium text-muted-foreground", children: maxSelected ? gi18n.selectedCountWithMax ? gi18n.selectedCountWithMax(value.length, maxSelected) : `${value.length} / ${maxSelected} max` : gi18n.itemSelectedCount ? gi18n.itemSelectedCount(value.length) : `${value.length} selected` }),
19700
19682
  showClear && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
@@ -23294,7 +23276,7 @@ function Carousel({
23294
23276
  {
23295
23277
  onClick: () => scrollTo(idx),
23296
23278
  className: cn(
23297
- "rounded-full transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
23279
+ "rounded-full transition-all focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 active:scale-75 active:opacity-70",
23298
23280
  "max-md:w-1.5 max-md:h-1.5",
23299
23281
  isHorizontal ? "w-2 h-2" : "w-2 h-2",
23300
23282
  idx === currentIndex ? `bg-primary ${isHorizontal ? "w-6 max-md:w-4" : "h-6 max-md:h-4"}` : "bg-muted-foreground/50 hover:bg-muted-foreground/75"
@@ -23320,7 +23302,7 @@ function Carousel({
23320
23302
  {
23321
23303
  onClick: () => scrollTo(idx),
23322
23304
  className: cn(
23323
- "shrink-0 w-16 h-16 rounded-lg overflow-hidden border-2 transition-all focus:outline-none focus:ring-2 focus:ring-primary",
23305
+ "shrink-0 w-16 h-16 rounded-lg overflow-hidden border-2 transition-all focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus:outline-none active:scale-95",
23324
23306
  "max-md:w-12 max-md:h-12",
23325
23307
  idx === currentIndex ? "border-primary md:scale-110" : "border-transparent opacity-70 hover:opacity-100"
23326
23308
  ),
@@ -25605,7 +25587,7 @@ var TableContainer = import_react32.default.forwardRef(({ className, useOverlayS
25605
25587
  },
25606
25588
  className: cn(
25607
25589
  TABLE_CONTAINER_BASE_CLASS,
25608
- resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
25590
+ resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
25609
25591
  className
25610
25592
  ),
25611
25593
  ...props