@underverse-ui/underverse 0.2.50 → 0.2.52
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.cjs +112 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +112 -42
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1898,7 +1898,7 @@ var Textarea2 = (0, import_react5.forwardRef)(
|
|
|
1898
1898
|
md: "px-4 py-3 text-sm min-h-[100px]",
|
|
1899
1899
|
lg: "px-5 py-4 text-base min-h-[120px]"
|
|
1900
1900
|
};
|
|
1901
|
-
const
|
|
1901
|
+
const variantClasses2 = {
|
|
1902
1902
|
default: cn(
|
|
1903
1903
|
"border border-input bg-background",
|
|
1904
1904
|
"hover:border-accent-foreground/20",
|
|
@@ -1942,7 +1942,7 @@ var Textarea2 = (0, import_react5.forwardRef)(
|
|
|
1942
1942
|
"focus:outline-none shadow-sm focus:shadow-md",
|
|
1943
1943
|
"backdrop-blur-sm",
|
|
1944
1944
|
sizeClasses2[size],
|
|
1945
|
-
error ? "border-destructive focus:ring-destructive/20 focus:border-destructive" :
|
|
1945
|
+
error ? "border-destructive focus:ring-destructive/20 focus:border-destructive" : variantClasses2[variant],
|
|
1946
1946
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1947
1947
|
className
|
|
1948
1948
|
),
|
|
@@ -1997,7 +1997,7 @@ var Switch = ({
|
|
|
1997
1997
|
translate: "translate-x-6"
|
|
1998
1998
|
}
|
|
1999
1999
|
};
|
|
2000
|
-
const
|
|
2000
|
+
const variantClasses2 = {
|
|
2001
2001
|
default: {
|
|
2002
2002
|
active: "bg-primary border-primary",
|
|
2003
2003
|
inactive: "bg-input border-input"
|
|
@@ -2051,7 +2051,7 @@ var Switch = ({
|
|
|
2051
2051
|
{
|
|
2052
2052
|
className: cn(
|
|
2053
2053
|
"block w-full h-full rounded-full transition-colors duration-200 ease-out border",
|
|
2054
|
-
checked ?
|
|
2054
|
+
checked ? variantClasses2[variant].active : variantClasses2[variant].inactive
|
|
2055
2055
|
)
|
|
2056
2056
|
}
|
|
2057
2057
|
),
|
|
@@ -2225,13 +2225,36 @@ var sizeClasses = {
|
|
|
2225
2225
|
md: "h-10 w-10 text-base",
|
|
2226
2226
|
lg: "h-14 w-14 text-lg"
|
|
2227
2227
|
};
|
|
2228
|
-
var
|
|
2228
|
+
var statusColors = {
|
|
2229
|
+
online: "bg-success",
|
|
2230
|
+
offline: "bg-muted-foreground",
|
|
2231
|
+
busy: "bg-destructive",
|
|
2232
|
+
away: "bg-warning",
|
|
2233
|
+
none: "bg-transparent"
|
|
2234
|
+
};
|
|
2235
|
+
var statusDotSizes = {
|
|
2236
|
+
sm: "w-2 h-2 border",
|
|
2237
|
+
md: "w-3 h-3 border-2",
|
|
2238
|
+
lg: "w-4 h-4 border-2"
|
|
2239
|
+
};
|
|
2240
|
+
var Avatar = ({
|
|
2241
|
+
src,
|
|
2242
|
+
alt = "avatar",
|
|
2243
|
+
fallback = "?",
|
|
2244
|
+
size = "md",
|
|
2245
|
+
showStatus = true,
|
|
2246
|
+
status = "online",
|
|
2247
|
+
hideStatusOnHover = true,
|
|
2248
|
+
className,
|
|
2249
|
+
onClick,
|
|
2250
|
+
...props
|
|
2251
|
+
}) => {
|
|
2229
2252
|
const hasValidSrc = !!(src && src.trim().length > 0);
|
|
2230
2253
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2231
2254
|
"div",
|
|
2232
2255
|
{
|
|
2233
2256
|
className: cn(
|
|
2234
|
-
"relative inline-flex items-center justify-center overflow-
|
|
2257
|
+
"group relative inline-flex items-center justify-center overflow-visible rounded-full bg-muted text-foreground select-none transition-all duration-200 ease-soft",
|
|
2235
2258
|
onClick && "cursor-pointer hover:ring-2 hover:ring-primary/50 hover:ring-offset-2 hover:shadow-lg active:scale-95",
|
|
2236
2259
|
sizeClasses[size],
|
|
2237
2260
|
className
|
|
@@ -2239,31 +2262,44 @@ var Avatar = ({ src, alt = "avatar", fallback = "?", size = "md", className, onC
|
|
|
2239
2262
|
onClick,
|
|
2240
2263
|
...props,
|
|
2241
2264
|
children: [
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
"
|
|
2265
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "absolute inset-0 overflow-hidden rounded-full", children: [
|
|
2266
|
+
hasValidSrc && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2267
|
+
SmartImage,
|
|
2268
|
+
{
|
|
2269
|
+
src,
|
|
2270
|
+
alt,
|
|
2271
|
+
fill: true,
|
|
2272
|
+
ratioClass: void 0,
|
|
2273
|
+
className: "h-full w-full",
|
|
2274
|
+
roundedClass: "rounded-full",
|
|
2275
|
+
fit: "cover",
|
|
2276
|
+
objectPosition: "center",
|
|
2277
|
+
quality: 80
|
|
2278
|
+
}
|
|
2279
|
+
),
|
|
2280
|
+
!hasValidSrc && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2281
|
+
"span",
|
|
2282
|
+
{
|
|
2283
|
+
className: cn(
|
|
2284
|
+
"font-bold uppercase bg-linear-to-br from-primary to-primary/80 bg-clip-text text-transparent",
|
|
2285
|
+
"transition-all duration-200 animate-fade-in"
|
|
2286
|
+
),
|
|
2287
|
+
children: fallback
|
|
2288
|
+
}
|
|
2289
|
+
) })
|
|
2290
|
+
] }),
|
|
2291
|
+
showStatus && status !== "none" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2292
|
+
"div",
|
|
2258
2293
|
{
|
|
2259
2294
|
className: cn(
|
|
2260
|
-
"
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2295
|
+
"absolute bottom-0 right-0 rounded-full border-background z-10",
|
|
2296
|
+
statusColors[status],
|
|
2297
|
+
statusDotSizes[size],
|
|
2298
|
+
"transition-opacity duration-200",
|
|
2299
|
+
hideStatusOnHover ? "opacity-100 group-hover:opacity-50" : "opacity-100"
|
|
2300
|
+
)
|
|
2264
2301
|
}
|
|
2265
|
-
)
|
|
2266
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute bottom-0 right-0 w-3 h-3 bg-success border-2 border-background rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-200" })
|
|
2302
|
+
)
|
|
2267
2303
|
]
|
|
2268
2304
|
}
|
|
2269
2305
|
);
|
|
@@ -2280,7 +2316,7 @@ var Skeleton = ({
|
|
|
2280
2316
|
animation = "pulse",
|
|
2281
2317
|
lines = 1
|
|
2282
2318
|
}) => {
|
|
2283
|
-
const
|
|
2319
|
+
const variantClasses2 = {
|
|
2284
2320
|
rectangular: "rounded-md",
|
|
2285
2321
|
circular: "rounded-full",
|
|
2286
2322
|
rounded: "rounded-lg",
|
|
@@ -2297,7 +2333,7 @@ var Skeleton = ({
|
|
|
2297
2333
|
{
|
|
2298
2334
|
className: cn(
|
|
2299
2335
|
"h-4 bg-muted",
|
|
2300
|
-
|
|
2336
|
+
variantClasses2[variant],
|
|
2301
2337
|
animationClasses[animation],
|
|
2302
2338
|
index === lines - 1 && "w-3/4"
|
|
2303
2339
|
// Last line is shorter
|
|
@@ -2315,7 +2351,7 @@ var Skeleton = ({
|
|
|
2315
2351
|
{
|
|
2316
2352
|
className: cn(
|
|
2317
2353
|
"bg-muted",
|
|
2318
|
-
|
|
2354
|
+
variantClasses2[variant],
|
|
2319
2355
|
animationClasses[animation],
|
|
2320
2356
|
className
|
|
2321
2357
|
),
|
|
@@ -5475,7 +5511,7 @@ var Section = import_react13.default.forwardRef(
|
|
|
5475
5511
|
gradientDirection = "to-br",
|
|
5476
5512
|
...props
|
|
5477
5513
|
}, ref) => {
|
|
5478
|
-
const
|
|
5514
|
+
const variantClasses2 = {
|
|
5479
5515
|
default: "bg-background",
|
|
5480
5516
|
muted: "bg-muted/30",
|
|
5481
5517
|
primary: "bg-primary/5",
|
|
@@ -5491,7 +5527,7 @@ var Section = import_react13.default.forwardRef(
|
|
|
5491
5527
|
{
|
|
5492
5528
|
ref,
|
|
5493
5529
|
className: cn(
|
|
5494
|
-
variant === "gradient" ? getGradientClasses() :
|
|
5530
|
+
variant === "gradient" ? getGradientClasses() : variantClasses2[variant],
|
|
5495
5531
|
spacingClasses[spacing],
|
|
5496
5532
|
paddingXClasses[paddingX],
|
|
5497
5533
|
outlined && "rounded-lg border border-border/60",
|
|
@@ -5510,9 +5546,43 @@ var Section_default = Section;
|
|
|
5510
5546
|
// ../../components/ui/ScrollArea.tsx
|
|
5511
5547
|
var import_react14 = require("react");
|
|
5512
5548
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5513
|
-
var
|
|
5514
|
-
|
|
5515
|
-
|
|
5549
|
+
var variantClasses = {
|
|
5550
|
+
default: "bg-background",
|
|
5551
|
+
muted: "bg-muted/30",
|
|
5552
|
+
primary: "bg-primary/5",
|
|
5553
|
+
accent: "bg-accent/10"
|
|
5554
|
+
};
|
|
5555
|
+
var spacingClasses2 = {
|
|
5556
|
+
none: "",
|
|
5557
|
+
sm: "p-2",
|
|
5558
|
+
md: "p-4",
|
|
5559
|
+
lg: "p-6",
|
|
5560
|
+
xl: "p-8"
|
|
5561
|
+
};
|
|
5562
|
+
var ScrollArea = (0, import_react14.forwardRef)(
|
|
5563
|
+
({ className, contentClassName, children, variant = "default", spacing = "none", fullWidth = true, outlined = false, ...props }, ref) => {
|
|
5564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5565
|
+
"div",
|
|
5566
|
+
{
|
|
5567
|
+
ref,
|
|
5568
|
+
className: cn("relative overflow-hidden", variantClasses[variant], outlined && "rounded-lg border border-border/60", className),
|
|
5569
|
+
...props,
|
|
5570
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5571
|
+
"div",
|
|
5572
|
+
{
|
|
5573
|
+
className: cn(
|
|
5574
|
+
"h-full w-full overflow-y-auto scroll-area-viewport",
|
|
5575
|
+
spacingClasses2[spacing],
|
|
5576
|
+
!fullWidth && "container mx-auto px-4 md:px-6",
|
|
5577
|
+
contentClassName
|
|
5578
|
+
),
|
|
5579
|
+
children
|
|
5580
|
+
}
|
|
5581
|
+
)
|
|
5582
|
+
}
|
|
5583
|
+
);
|
|
5584
|
+
}
|
|
5585
|
+
);
|
|
5516
5586
|
ScrollArea.displayName = "ScrollArea";
|
|
5517
5587
|
|
|
5518
5588
|
// ../../components/ui/DatePicker.tsx
|
|
@@ -9191,7 +9261,7 @@ var ListRoot = React33.forwardRef(
|
|
|
9191
9261
|
const Comp = ordered ? "ol" : as;
|
|
9192
9262
|
const childCount = React33.Children.count(children);
|
|
9193
9263
|
const hasChildren = childCount > 0;
|
|
9194
|
-
const
|
|
9264
|
+
const variantClasses2 = {
|
|
9195
9265
|
plain: "",
|
|
9196
9266
|
outlined: "rounded-lg md:rounded-xl bg-card text-card-foreground border border-border shadow-sm",
|
|
9197
9267
|
soft: "rounded-lg bg-muted/40 border border-border/60",
|
|
@@ -9201,10 +9271,10 @@ var ListRoot = React33.forwardRef(
|
|
|
9201
9271
|
striped: "rounded-lg border border-border overflow-hidden"
|
|
9202
9272
|
};
|
|
9203
9273
|
if (loading2) {
|
|
9204
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Comp, { ref, className: cn("group/list",
|
|
9274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Comp, { ref, className: cn("group/list", variantClasses2[variant], inset && "p-1.5 md:p-2", divided && "divide-y divide-border/60", className), ...rest, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ListItemSkeleton, { size }, i)) });
|
|
9205
9275
|
}
|
|
9206
9276
|
if (!hasChildren && emptyText) {
|
|
9207
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Comp, { ref, className: cn("group/list",
|
|
9277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Comp, { ref, className: cn("group/list", variantClasses2[variant], inset && "p-1.5 md:p-2", className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "text-center py-8 text-muted-foreground text-sm", children: emptyText }) });
|
|
9208
9278
|
}
|
|
9209
9279
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9210
9280
|
Comp,
|
|
@@ -9212,7 +9282,7 @@ var ListRoot = React33.forwardRef(
|
|
|
9212
9282
|
ref,
|
|
9213
9283
|
className: cn(
|
|
9214
9284
|
"group/list",
|
|
9215
|
-
|
|
9285
|
+
variantClasses2[variant],
|
|
9216
9286
|
inset && "p-1.5 md:p-2",
|
|
9217
9287
|
divided && "divide-y divide-border/60",
|
|
9218
9288
|
variant === "striped" && "[&>*:nth-child(even)]:bg-muted/30",
|
|
@@ -9779,7 +9849,7 @@ var TimelineItem = React35.forwardRef(
|
|
|
9779
9849
|
}
|
|
9780
9850
|
};
|
|
9781
9851
|
const padding = ctx.dense ? sz.densePadY : sz.padY;
|
|
9782
|
-
const
|
|
9852
|
+
const variantClasses2 = {
|
|
9783
9853
|
default: "",
|
|
9784
9854
|
outlined: "rounded-lg border border-border bg-card shadow-sm px-4 py-3",
|
|
9785
9855
|
card: "rounded-xl border border-border bg-card shadow-md px-5 py-4",
|
|
@@ -9787,7 +9857,7 @@ var TimelineItem = React35.forwardRef(
|
|
|
9787
9857
|
modern: "rounded-lg bg-linear-to-r from-card to-muted/20 border border-border/50 px-5 py-4 backdrop-blur-sm",
|
|
9788
9858
|
gradient: "rounded-xl bg-linear-to-br from-primary/10 via-card to-accent/10 border border-primary/20 px-5 py-4 shadow-lg"
|
|
9789
9859
|
};
|
|
9790
|
-
const contentBox = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("min-w-0 flex-1",
|
|
9860
|
+
const contentBox = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("min-w-0 flex-1", variantClasses2[ctx.variant]), children: [
|
|
9791
9861
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
9792
9862
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
9793
9863
|
title && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2", children: [
|