@underverse-ui/underverse 0.2.34 → 0.2.36
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 +36 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -542,7 +542,27 @@ var Badge_default = Badge;
|
|
|
542
542
|
// ../../components/ui/Card.tsx
|
|
543
543
|
var import_react2 = require("react");
|
|
544
544
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
545
|
-
var
|
|
545
|
+
var getPaddingInfo = (className) => {
|
|
546
|
+
if (!className) return { hasAll: false, hasX: false, hasY: false };
|
|
547
|
+
const hasAll = /\b(p)-\d+|\b(p)-\[/.test(className) || /\bmd:p-|lg:p-|sm:p-|xl:p-/.test(className);
|
|
548
|
+
const hasX = /\b(px|pl|pr|ps|pe)-/.test(className);
|
|
549
|
+
const hasY = /\b(py|pt|pb)-/.test(className);
|
|
550
|
+
return { hasAll, hasX, hasY };
|
|
551
|
+
};
|
|
552
|
+
var Card = ({
|
|
553
|
+
title,
|
|
554
|
+
description,
|
|
555
|
+
children,
|
|
556
|
+
footer,
|
|
557
|
+
className,
|
|
558
|
+
hoverable = false,
|
|
559
|
+
clickable = false,
|
|
560
|
+
innerClassName,
|
|
561
|
+
contentClassName,
|
|
562
|
+
noPadding = false,
|
|
563
|
+
onClick,
|
|
564
|
+
...rest
|
|
565
|
+
}) => {
|
|
546
566
|
const [isHovered, setIsHovered] = (0, import_react2.useState)(false);
|
|
547
567
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
548
568
|
"div",
|
|
@@ -582,7 +602,13 @@ var Card = ({ title, description, children, footer, className, hoverable = false
|
|
|
582
602
|
),
|
|
583
603
|
description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm md:text-base text-muted-foreground leading-relaxed", children: description })
|
|
584
604
|
] }),
|
|
585
|
-
children &&
|
|
605
|
+
children && (() => {
|
|
606
|
+
const padding = getPaddingInfo(contentClassName);
|
|
607
|
+
const skipAllPadding = noPadding || padding.hasAll;
|
|
608
|
+
const defaultPaddingX = !skipAllPadding && !padding.hasX ? "px-4 md:px-6" : "";
|
|
609
|
+
const defaultPaddingY = !skipAllPadding && !padding.hasY ? "pt-0 pb-4 md:pb-6" : "";
|
|
610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("relative", defaultPaddingX, defaultPaddingY, contentClassName), children });
|
|
611
|
+
})(),
|
|
586
612
|
footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "relative flex items-center p-4 md:p-6 pt-0 border-t border-border mt-4", children: footer })
|
|
587
613
|
] })
|
|
588
614
|
}
|
|
@@ -5012,14 +5038,14 @@ var CompactPagination = ({
|
|
|
5012
5038
|
var import_react13 = __toESM(require("react"), 1);
|
|
5013
5039
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
5014
5040
|
var gradientDirectionMap = {
|
|
5015
|
-
"to-r": "bg-
|
|
5016
|
-
"to-l": "bg-
|
|
5017
|
-
"to-b": "bg-
|
|
5018
|
-
"to-t": "bg-
|
|
5019
|
-
"to-br": "bg-
|
|
5020
|
-
"to-bl": "bg-
|
|
5021
|
-
"to-tr": "bg-
|
|
5022
|
-
"to-tl": "bg-
|
|
5041
|
+
"to-r": "bg-linear-to-r",
|
|
5042
|
+
"to-l": "bg-linear-to-l",
|
|
5043
|
+
"to-b": "bg-linear-to-b",
|
|
5044
|
+
"to-t": "bg-linear-to-t",
|
|
5045
|
+
"to-br": "bg-linear-to-br",
|
|
5046
|
+
"to-bl": "bg-linear-to-bl",
|
|
5047
|
+
"to-tr": "bg-linear-to-tr",
|
|
5048
|
+
"to-tl": "bg-linear-to-tl"
|
|
5023
5049
|
};
|
|
5024
5050
|
var Section = import_react13.default.forwardRef(
|
|
5025
5051
|
({
|