@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.
- package/api-reference.json +1 -1
- package/dist/index.cjs +27 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70,6 +70,13 @@ function getBorderRadiusClass(borderMode = "full") {
|
|
|
70
70
|
}
|
|
71
71
|
return borderMode;
|
|
72
72
|
}
|
|
73
|
+
function getPanelBorderRadiusClass(borderMode = "lg") {
|
|
74
|
+
const resolved = borderMode ?? "lg";
|
|
75
|
+
if (resolved === "full" || resolved === "infiniq") {
|
|
76
|
+
return "rounded-2xl";
|
|
77
|
+
}
|
|
78
|
+
return getBorderRadiusClass(resolved);
|
|
79
|
+
}
|
|
73
80
|
|
|
74
81
|
// src/contexts/UnderverseConfigContext.tsx
|
|
75
82
|
import * as React from "react";
|
|
@@ -501,7 +508,7 @@ var Card = React4.forwardRef(
|
|
|
501
508
|
ref,
|
|
502
509
|
className: cn(
|
|
503
510
|
"group bg-card text-card-foreground transition-[transform,box-shadow,border-color,background-color] duration-300 ease-soft",
|
|
504
|
-
resolvedBorderMode ?
|
|
511
|
+
resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl max-md:rounded-xl",
|
|
505
512
|
"border border-border/50 shadow-sm backdrop-blur-sm",
|
|
506
513
|
hoverable && "md:hover:-translate-y-0.5 md:hover:border-primary/15 md:hover:shadow-md",
|
|
507
514
|
clickable && "cursor-pointer active:translate-y-px active:bg-accent/5 md:hover:bg-accent/5 md:hover:shadow-md",
|
|
@@ -519,7 +526,7 @@ var Card = React4.forwardRef(
|
|
|
519
526
|
role: isInteractive ? role ?? "button" : role,
|
|
520
527
|
tabIndex: isInteractive ? tabIndex ?? 0 : tabIndex,
|
|
521
528
|
...rest,
|
|
522
|
-
children: /* @__PURE__ */ jsxs3("div", { className: cn("relative overflow-hidden", resolvedBorderMode ?
|
|
529
|
+
children: /* @__PURE__ */ jsxs3("div", { className: cn("relative overflow-hidden", resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl max-md:rounded-xl", innerClassName), children: [
|
|
523
530
|
(hoverable || clickable) && /* @__PURE__ */ jsx5(
|
|
524
531
|
"div",
|
|
525
532
|
{
|
|
@@ -6938,7 +6945,7 @@ var Modal = ({
|
|
|
6938
6945
|
ref: modalContentRef,
|
|
6939
6946
|
className: cn(
|
|
6940
6947
|
"relative w-full border border-border/40 bg-card text-card-foreground shadow-xl",
|
|
6941
|
-
resolvedBorderMode ?
|
|
6948
|
+
resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
|
|
6942
6949
|
"transition-all duration-200 ease-out",
|
|
6943
6950
|
maxWidthClass,
|
|
6944
6951
|
fullWidth && "mx-0",
|
|
@@ -7638,7 +7645,7 @@ var Popover = ({
|
|
|
7638
7645
|
{
|
|
7639
7646
|
...contentProps,
|
|
7640
7647
|
className: cn(
|
|
7641
|
-
resolvedBorderMode ?
|
|
7648
|
+
resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
|
|
7642
7649
|
"border bg-popover text-popover-foreground shadow-md",
|
|
7643
7650
|
"backdrop-blur-sm bg-popover/95 border-border/60 p-4",
|
|
7644
7651
|
contentProps?.className,
|
|
@@ -9233,7 +9240,7 @@ var Combobox = ({
|
|
|
9233
9240
|
{
|
|
9234
9241
|
"data-combobox-dropdown": true,
|
|
9235
9242
|
"data-state": open ? "open" : "closed",
|
|
9236
|
-
className: cn("w-full overflow-hidden",
|
|
9243
|
+
className: cn("w-full overflow-hidden", getPanelBorderRadiusClass(resolvedBorderMode)),
|
|
9237
9244
|
children: [
|
|
9238
9245
|
enableSearch && /* @__PURE__ */ jsx33("div", { className: cn("relative border-b border-border/30", size === "sm" ? "p-2" : size === "lg" ? "p-3" : "p-2.5"), children: /* @__PURE__ */ jsxs23("div", { className: "relative", children: [
|
|
9239
9246
|
/* @__PURE__ */ jsx33(
|
|
@@ -9429,8 +9436,9 @@ var Combobox = ({
|
|
|
9429
9436
|
}
|
|
9430
9437
|
},
|
|
9431
9438
|
className: cn(
|
|
9432
|
-
"opacity-0 group-hover:opacity-100 transition-all duration-200",
|
|
9433
|
-
"p-1 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive"
|
|
9439
|
+
"opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-all duration-200",
|
|
9440
|
+
"p-1 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
|
|
9441
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-destructive/50 focus-visible:ring-offset-1"
|
|
9434
9442
|
),
|
|
9435
9443
|
children: /* @__PURE__ */ jsx33(X10, { className: "h-3.5 w-3.5" })
|
|
9436
9444
|
}
|
|
@@ -9504,14 +9512,14 @@ var Combobox = ({
|
|
|
9504
9512
|
trigger: triggerButtonForPopover,
|
|
9505
9513
|
placement: "bottom-start",
|
|
9506
9514
|
matchTriggerWidth: true,
|
|
9507
|
-
className: "z-
|
|
9515
|
+
className: "z-50",
|
|
9508
9516
|
borderMode: resolvedBorderMode,
|
|
9509
9517
|
contentClassName: "p-0 overflow-hidden",
|
|
9510
9518
|
children: dropdownBody
|
|
9511
9519
|
}
|
|
9512
9520
|
) : /* @__PURE__ */ jsxs23("div", { className: "relative", children: [
|
|
9513
9521
|
triggerButtonInline,
|
|
9514
|
-
open && /* @__PURE__ */ jsx33("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ jsx33("div", { className: cn("overflow-hidden border text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60",
|
|
9522
|
+
open && /* @__PURE__ */ jsx33("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ jsx33("div", { className: cn("overflow-hidden border text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60", getPanelBorderRadiusClass(resolvedBorderMode)), children: dropdownBody }) })
|
|
9515
9523
|
] }),
|
|
9516
9524
|
(helperText || effectiveError) && /* @__PURE__ */ jsxs23(
|
|
9517
9525
|
"p",
|
|
@@ -10484,32 +10492,6 @@ var DatePicker = ({
|
|
|
10484
10492
|
const node = el;
|
|
10485
10493
|
return node.scrollHeight > node.clientHeight + 1;
|
|
10486
10494
|
};
|
|
10487
|
-
React34.useEffect(() => {
|
|
10488
|
-
if (!isOpen) return;
|
|
10489
|
-
const container = wheelContainerRef.current;
|
|
10490
|
-
if (!container) return;
|
|
10491
|
-
const onWheel = (event) => {
|
|
10492
|
-
if (!container.contains(event.target)) return;
|
|
10493
|
-
if (event.ctrlKey) return;
|
|
10494
|
-
let node = event.target;
|
|
10495
|
-
while (node && node !== container) {
|
|
10496
|
-
if (isElementVerticallyScrollable(node)) return;
|
|
10497
|
-
node = node.parentElement;
|
|
10498
|
-
}
|
|
10499
|
-
if (isElementVerticallyScrollable(container)) return;
|
|
10500
|
-
event.preventDefault();
|
|
10501
|
-
event.stopPropagation();
|
|
10502
|
-
wheelDeltaRef.current += event.deltaY;
|
|
10503
|
-
const threshold = 70;
|
|
10504
|
-
if (Math.abs(wheelDeltaRef.current) < threshold) return;
|
|
10505
|
-
const steps = Math.trunc(wheelDeltaRef.current / threshold);
|
|
10506
|
-
wheelDeltaRef.current -= steps * threshold;
|
|
10507
|
-
const direction = steps > 0 ? "next" : "prev";
|
|
10508
|
-
for (let i = 0; i < Math.abs(steps); i++) navigateMonth(direction);
|
|
10509
|
-
};
|
|
10510
|
-
container.addEventListener("wheel", onWheel, { passive: false });
|
|
10511
|
-
return () => container.removeEventListener("wheel", onWheel);
|
|
10512
|
-
}, [isOpen, navigateMonth]);
|
|
10513
10495
|
const renderCalendar = () => {
|
|
10514
10496
|
const daysInMonth = getDaysInMonth(viewDate);
|
|
10515
10497
|
const firstDayOfMonth = getFirstDayOfMonth(viewDate);
|
|
@@ -10536,10 +10518,10 @@ var DatePicker = ({
|
|
|
10536
10518
|
},
|
|
10537
10519
|
className: cn(
|
|
10538
10520
|
sizeStyles8[size].dayCell,
|
|
10539
|
-
"datepicker-day rounded-lg
|
|
10540
|
-
"transition-all duration-200 font-medium",
|
|
10541
|
-
isDisabled && "opacity-30 cursor-not-allowed text-muted-foreground",
|
|
10542
|
-
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:
|
|
10521
|
+
"datepicker-day rounded-lg relative cursor-pointer",
|
|
10522
|
+
"transition-all duration-200 font-medium active:scale-95",
|
|
10523
|
+
isDisabled && "opacity-30 cursor-not-allowed text-muted-foreground active:scale-100",
|
|
10524
|
+
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",
|
|
10543
10525
|
isToday2 && !isSelected && "bg-primary/15 text-primary font-bold ring-2 ring-primary/30"
|
|
10544
10526
|
),
|
|
10545
10527
|
children: [
|
|
@@ -10566,7 +10548,7 @@ var DatePicker = ({
|
|
|
10566
10548
|
setViewMode("calendar");
|
|
10567
10549
|
},
|
|
10568
10550
|
className: cn(
|
|
10569
|
-
"py-2 px-3 rounded-lg text-sm font-medium transition-all duration-200",
|
|
10551
|
+
"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",
|
|
10570
10552
|
isSelected ? "bg-primary text-primary-foreground shadow-md" : "hover:bg-accent/80 text-foreground hover:scale-105"
|
|
10571
10553
|
),
|
|
10572
10554
|
children: month
|
|
@@ -10590,7 +10572,7 @@ var DatePicker = ({
|
|
|
10590
10572
|
setViewMode("month");
|
|
10591
10573
|
},
|
|
10592
10574
|
className: cn(
|
|
10593
|
-
"py-2 px-3 rounded-lg text-sm font-medium transition-all duration-200",
|
|
10575
|
+
"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",
|
|
10594
10576
|
isSelected ? "bg-primary text-primary-foreground shadow-md" : "hover:bg-accent/80 text-foreground hover:scale-105"
|
|
10595
10577
|
),
|
|
10596
10578
|
children: year
|
|
@@ -19497,7 +19479,7 @@ var MultiCombobox = ({
|
|
|
19497
19479
|
item.value
|
|
19498
19480
|
);
|
|
19499
19481
|
};
|
|
19500
|
-
const dropdownBody = /* @__PURE__ */ jsxs37("div", { "data-combobox-dropdown": true, "data-state": open ? "open" : "closed", className: cn("w-full overflow-hidden",
|
|
19482
|
+
const dropdownBody = /* @__PURE__ */ jsxs37("div", { "data-combobox-dropdown": true, "data-state": open ? "open" : "closed", className: cn("w-full overflow-hidden", getPanelBorderRadiusClass(resolvedBorderMode)), children: [
|
|
19501
19483
|
value.length > 0 && /* @__PURE__ */ jsxs37("div", { className: "px-3 py-2 border-b border-border/40 flex items-center justify-between bg-muted/30", children: [
|
|
19502
19484
|
/* @__PURE__ */ jsx50("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` }),
|
|
19503
19485
|
showClear && /* @__PURE__ */ jsxs37(
|
|
@@ -23113,7 +23095,7 @@ function Carousel({
|
|
|
23113
23095
|
{
|
|
23114
23096
|
onClick: () => scrollTo(idx),
|
|
23115
23097
|
className: cn(
|
|
23116
|
-
"rounded-full transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
|
|
23098
|
+
"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",
|
|
23117
23099
|
"max-md:w-1.5 max-md:h-1.5",
|
|
23118
23100
|
isHorizontal ? "w-2 h-2" : "w-2 h-2",
|
|
23119
23101
|
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"
|
|
@@ -23139,7 +23121,7 @@ function Carousel({
|
|
|
23139
23121
|
{
|
|
23140
23122
|
onClick: () => scrollTo(idx),
|
|
23141
23123
|
className: cn(
|
|
23142
|
-
"shrink-0 w-16 h-16 rounded-lg overflow-hidden border-2 transition-all focus:
|
|
23124
|
+
"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",
|
|
23143
23125
|
"max-md:w-12 max-md:h-12",
|
|
23144
23126
|
idx === currentIndex ? "border-primary md:scale-110" : "border-transparent opacity-70 hover:opacity-100"
|
|
23145
23127
|
),
|
|
@@ -25424,7 +25406,7 @@ var TableContainer = React59.forwardRef(({ className, useOverlayScrollbar = fals
|
|
|
25424
25406
|
},
|
|
25425
25407
|
className: cn(
|
|
25426
25408
|
TABLE_CONTAINER_BASE_CLASS,
|
|
25427
|
-
resolvedBorderMode ?
|
|
25409
|
+
resolvedBorderMode ? getPanelBorderRadiusClass(resolvedBorderMode) : "rounded-2xl md:rounded-3xl",
|
|
25428
25410
|
className
|
|
25429
25411
|
),
|
|
25430
25412
|
...props
|