elseware-ui 2.21.0 → 2.21.1
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.
|
@@ -4,11 +4,12 @@ import { hoverAnimations } from "../../../data/animations";
|
|
|
4
4
|
export interface CardProps {
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
-
|
|
7
|
+
bgVariant?: keyof typeof Variant;
|
|
8
|
+
borderVariant?: keyof typeof Variant;
|
|
8
9
|
interactive?: boolean;
|
|
9
10
|
ghost?: boolean;
|
|
10
11
|
shape?: keyof typeof Shape;
|
|
11
12
|
hoverAnimation?: keyof typeof hoverAnimations;
|
|
12
13
|
}
|
|
13
|
-
declare function Card({ children, className,
|
|
14
|
+
declare function Card({ children, className, bgVariant, borderVariant, interactive, ghost, shape, hoverAnimation, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export default Card;
|
package/build/index.es.js
CHANGED
|
@@ -142117,7 +142117,7 @@ var hoverAnimations = {
|
|
|
142117
142117
|
function Card(_a) {
|
|
142118
142118
|
var _b, _c;
|
|
142119
142119
|
var _d, _e, _f;
|
|
142120
|
-
var children = _a.children, className = _a.className, _g = _a.
|
|
142120
|
+
var children = _a.children, className = _a.className, _g = _a.bgVariant, bgVariant = _g === void 0 ? "default" : _g, _h = _a.borderVariant, borderVariant = _h === void 0 ? "default" : _h, _j = _a.interactive, interactive = _j === void 0 ? false : _j, _k = _a.ghost, ghost = _k === void 0 ? false : _k, shape = _a.shape, _l = _a.hoverAnimation, hoverAnimation = _l === void 0 ? "lift" : _l;
|
|
142121
142121
|
var eui = useEUIConfig();
|
|
142122
142122
|
var resolvedShape = (_f = shape !== null && shape !== void 0 ? shape : (_e = (_d = eui === null || eui === void 0 ? void 0 : eui.config) === null || _d === void 0 ? void 0 : _d.global) === null || _e === void 0 ? void 0 : _e.shape) !== null && _f !== void 0 ? _f : "softRoundedSquare";
|
|
142123
142123
|
return (jsxs("div", __assign$1({ className: classnames(
|
|
@@ -142125,14 +142125,14 @@ function Card(_a) {
|
|
|
142125
142125
|
"relative border backdrop-blur-md transition-all duration-300 overflow-hidden",
|
|
142126
142126
|
// Shape
|
|
142127
142127
|
shapes[resolvedShape], (_b = {},
|
|
142128
|
-
_b[cardBgVariants[
|
|
142128
|
+
_b[cardBgVariants[bgVariant]] = !ghost,
|
|
142129
142129
|
_b["bg-transparent"] = ghost,
|
|
142130
142130
|
_b),
|
|
142131
142131
|
// Border
|
|
142132
|
-
cardBorderVariants[
|
|
142132
|
+
cardBorderVariants[borderVariant], (_c = {
|
|
142133
142133
|
"cursor-pointer": interactive
|
|
142134
142134
|
},
|
|
142135
|
-
_c[cardHoverBorderVariants[
|
|
142135
|
+
_c[cardHoverBorderVariants[borderVariant]] = interactive,
|
|
142136
142136
|
_c[hoverAnimations[hoverAnimation]] = interactive,
|
|
142137
142137
|
_c), className) }, { children: [jsx("div", { className: "pointer-events-none absolute inset-0 rounded-inherit ring-1 ring-inset ring-white/10" }), interactive && hoverAnimation === "glow" && (jsx("div", { className: "absolute inset-0 opacity-0 hover:opacity-100 transition duration-300 bg-gradient-to-r from-white/5 via-transparent to-white/5 rounded-inherit" })), children] })));
|
|
142138
142138
|
}
|
package/build/index.js
CHANGED
|
@@ -142144,7 +142144,7 @@ var hoverAnimations = {
|
|
|
142144
142144
|
function Card(_a) {
|
|
142145
142145
|
var _b, _c;
|
|
142146
142146
|
var _d, _e, _f;
|
|
142147
|
-
var children = _a.children, className = _a.className, _g = _a.
|
|
142147
|
+
var children = _a.children, className = _a.className, _g = _a.bgVariant, bgVariant = _g === void 0 ? "default" : _g, _h = _a.borderVariant, borderVariant = _h === void 0 ? "default" : _h, _j = _a.interactive, interactive = _j === void 0 ? false : _j, _k = _a.ghost, ghost = _k === void 0 ? false : _k, shape = _a.shape, _l = _a.hoverAnimation, hoverAnimation = _l === void 0 ? "lift" : _l;
|
|
142148
142148
|
var eui = useEUIConfig();
|
|
142149
142149
|
var resolvedShape = (_f = shape !== null && shape !== void 0 ? shape : (_e = (_d = eui === null || eui === void 0 ? void 0 : eui.config) === null || _d === void 0 ? void 0 : _d.global) === null || _e === void 0 ? void 0 : _e.shape) !== null && _f !== void 0 ? _f : "softRoundedSquare";
|
|
142150
142150
|
return (jsxRuntime.jsxs("div", __assign$1({ className: classnames(
|
|
@@ -142152,14 +142152,14 @@ function Card(_a) {
|
|
|
142152
142152
|
"relative border backdrop-blur-md transition-all duration-300 overflow-hidden",
|
|
142153
142153
|
// Shape
|
|
142154
142154
|
shapes[resolvedShape], (_b = {},
|
|
142155
|
-
_b[cardBgVariants[
|
|
142155
|
+
_b[cardBgVariants[bgVariant]] = !ghost,
|
|
142156
142156
|
_b["bg-transparent"] = ghost,
|
|
142157
142157
|
_b),
|
|
142158
142158
|
// Border
|
|
142159
|
-
cardBorderVariants[
|
|
142159
|
+
cardBorderVariants[borderVariant], (_c = {
|
|
142160
142160
|
"cursor-pointer": interactive
|
|
142161
142161
|
},
|
|
142162
|
-
_c[cardHoverBorderVariants[
|
|
142162
|
+
_c[cardHoverBorderVariants[borderVariant]] = interactive,
|
|
142163
142163
|
_c[hoverAnimations[hoverAnimation]] = interactive,
|
|
142164
142164
|
_c), className) }, { children: [jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 rounded-inherit ring-1 ring-inset ring-white/10" }), interactive && hoverAnimation === "glow" && (jsxRuntime.jsx("div", { className: "absolute inset-0 opacity-0 hover:opacity-100 transition duration-300 bg-gradient-to-r from-white/5 via-transparent to-white/5 rounded-inherit" })), children] })));
|
|
142165
142165
|
}
|