elseware-ui 2.22.0 → 2.22.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.
|
@@ -3,7 +3,7 @@ import { Variant, Shape } from "../../../data/enums";
|
|
|
3
3
|
import { hoverAnimations } from "../../../data/animations";
|
|
4
4
|
export interface CardProps {
|
|
5
5
|
children?: ReactNode;
|
|
6
|
-
|
|
6
|
+
styles?: string;
|
|
7
7
|
bgVariant?: keyof typeof Variant;
|
|
8
8
|
borderVariant?: keyof typeof Variant;
|
|
9
9
|
interactive?: boolean;
|
|
@@ -11,5 +11,5 @@ export interface CardProps {
|
|
|
11
11
|
shape?: keyof typeof Shape;
|
|
12
12
|
hoverAnimation?: keyof typeof hoverAnimations;
|
|
13
13
|
}
|
|
14
|
-
declare function Card({ children,
|
|
14
|
+
declare function Card({ children, styles, bgVariant, borderVariant, interactive, ghost, shape, hoverAnimation, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export default Card;
|
package/build/index.es.js
CHANGED
|
@@ -142117,12 +142117,12 @@ var hoverAnimations = {
|
|
|
142117
142117
|
function Card(_a) {
|
|
142118
142118
|
var _b, _c;
|
|
142119
142119
|
var _d, _e, _f;
|
|
142120
|
-
var children = _a.children,
|
|
142120
|
+
var children = _a.children, styles = _a.styles, _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(
|
|
142124
142124
|
// Base
|
|
142125
|
-
"relative border backdrop-blur-md transition-all duration-300 overflow-hidden",
|
|
142125
|
+
"relative border backdrop-blur-md transition-all duration-300 overflow-hidden p-5",
|
|
142126
142126
|
// Shape
|
|
142127
142127
|
shapes[resolvedShape], (_b = {},
|
|
142128
142128
|
_b[cardBgVariants[bgVariant]] = !ghost,
|
|
@@ -142134,7 +142134,7 @@ function Card(_a) {
|
|
|
142134
142134
|
},
|
|
142135
142135
|
_c[cardHoverBorderVariants[borderVariant]] = interactive,
|
|
142136
142136
|
_c[hoverAnimations[hoverAnimation]] = interactive,
|
|
142137
|
-
_c),
|
|
142137
|
+
_c), styles) }, { 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
|
}
|
|
142139
142139
|
|
|
142140
142140
|
function CardHeader(_a) {
|
package/build/index.js
CHANGED
|
@@ -142144,12 +142144,12 @@ var hoverAnimations = {
|
|
|
142144
142144
|
function Card(_a) {
|
|
142145
142145
|
var _b, _c;
|
|
142146
142146
|
var _d, _e, _f;
|
|
142147
|
-
var children = _a.children,
|
|
142147
|
+
var children = _a.children, styles = _a.styles, _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(
|
|
142151
142151
|
// Base
|
|
142152
|
-
"relative border backdrop-blur-md transition-all duration-300 overflow-hidden",
|
|
142152
|
+
"relative border backdrop-blur-md transition-all duration-300 overflow-hidden p-5",
|
|
142153
142153
|
// Shape
|
|
142154
142154
|
shapes[resolvedShape], (_b = {},
|
|
142155
142155
|
_b[cardBgVariants[bgVariant]] = !ghost,
|
|
@@ -142161,7 +142161,7 @@ function Card(_a) {
|
|
|
142161
142161
|
},
|
|
142162
142162
|
_c[cardHoverBorderVariants[borderVariant]] = interactive,
|
|
142163
142163
|
_c[hoverAnimations[hoverAnimation]] = interactive,
|
|
142164
|
-
_c),
|
|
142164
|
+
_c), styles) }, { 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
|
}
|
|
142166
142166
|
|
|
142167
142167
|
function CardHeader(_a) {
|