@speakapbv/dough-component-library 10.3.4 → 10.5.0
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode, ReactNodeArray, UIEvent } from "react";
|
|
2
2
|
import { Colors, Sizes, DoughDataAttributes, BorderStyles } from "../../../utils/constants";
|
|
3
3
|
import "./card.scss";
|
|
4
|
+
import { BoxOverflow } from "../box/box";
|
|
4
5
|
export interface CardProps {
|
|
5
6
|
border?: boolean;
|
|
6
7
|
children?: ReactNode;
|
|
@@ -17,6 +18,7 @@ export interface CardProps {
|
|
|
17
18
|
paddingVertical?: Sizes;
|
|
18
19
|
onScrollReachedBottom?(e?: UIEvent): void;
|
|
19
20
|
borderStyle?: BorderStyles;
|
|
21
|
+
overflow?: BoxOverflow;
|
|
20
22
|
zIndex?: number;
|
|
21
23
|
}
|
|
22
24
|
export declare const Card: {
|
package/dist/index.es.js
CHANGED
|
@@ -1215,7 +1215,7 @@ Box.displayName = "Box";
|
|
|
1215
1215
|
|
|
1216
1216
|
var Card = function (props) {
|
|
1217
1217
|
var _a;
|
|
1218
|
-
var _b = props.border, border = _b === void 0 ? false : _b, _c = props.flat, flat = _c === void 0 ? false : _c, _d = props.color, color = _d === void 0 ? Colors.THEME : _d, _e = props.fullHeight, fullHeight = _e === void 0 ? false : _e, _f = props.shadow, shadow = _f === void 0 ? true : _f, _g = props.headerButtons, headerButtons = _g === void 0 ? [] : _g, zIndex = props.zIndex;
|
|
1218
|
+
var _b = props.border, border = _b === void 0 ? false : _b, _c = props.flat, flat = _c === void 0 ? false : _c, _d = props.color, color = _d === void 0 ? Colors.THEME : _d, _e = props.fullHeight, fullHeight = _e === void 0 ? false : _e, _f = props.shadow, shadow = _f === void 0 ? true : _f, _g = props.headerButtons, headerButtons = _g === void 0 ? [] : _g, zIndex = props.zIndex, _h = props.overflow, overflow = _h === void 0 ? { x: BoxOverflow.HIDDEN, y: BoxOverflow.AUTO } : _h;
|
|
1219
1219
|
var getHeaderItems = function (givenChildren) {
|
|
1220
1220
|
var childrenToCheck = Children.toArray(givenChildren);
|
|
1221
1221
|
var headerItems = childrenToCheck.filter(function (child) {
|
|
@@ -1278,7 +1278,7 @@ var Card = function (props) {
|
|
|
1278
1278
|
: props.padding
|
|
1279
1279
|
? props.padding
|
|
1280
1280
|
: Sizes.NORMAL,
|
|
1281
|
-
}, className: "dough-card-content", overflow:
|
|
1281
|
+
}, className: "dough-card-content", overflow: overflow, flex: props.fullHeight ? "1 1 auto" : undefined }, contentItems));
|
|
1282
1282
|
}
|
|
1283
1283
|
return React.createElement(React.Fragment, null);
|
|
1284
1284
|
};
|
|
@@ -5448,12 +5448,12 @@ var Image = function (props) {
|
|
|
5448
5448
|
"dough-image-with-ratio": props.ratio,
|
|
5449
5449
|
"dough-image-viewer-fit-to-view": props.fitToView,
|
|
5450
5450
|
"dough-image-viewer-show-children-on-hover": props.showChildrenOnHover,
|
|
5451
|
-
}), style: __assign({ height: (_a = props.height) !== null && _a !== void 0 ? _a : "initial", width: (_b = props.width) !== null && _b !== void 0 ? _b : "initial" }, (props.ratio
|
|
5451
|
+
}), style: __assign(__assign({ height: (_a = props.height) !== null && _a !== void 0 ? _a : "initial", width: (_b = props.width) !== null && _b !== void 0 ? _b : "initial" }, (props.ratio
|
|
5452
5452
|
? {
|
|
5453
5453
|
paddingTop: (props.ratio.height * 100) /
|
|
5454
5454
|
props.ratio.width + "%",
|
|
5455
5455
|
}
|
|
5456
|
-
: {})) }, props.dataAttributes),
|
|
5456
|
+
: {})), (props.zIndex ? { zIndex: props.zIndex } : {})) }, props.dataAttributes),
|
|
5457
5457
|
React.createElement("img", { alt: "", src: props.src, style: {
|
|
5458
5458
|
opacity: props.opacity,
|
|
5459
5459
|
} }),
|
package/dist/index.js
CHANGED
|
@@ -1200,7 +1200,7 @@ Box.displayName = "Box";
|
|
|
1200
1200
|
|
|
1201
1201
|
var Card = function (props) {
|
|
1202
1202
|
var _a;
|
|
1203
|
-
var _b = props.border, border = _b === void 0 ? false : _b, _c = props.flat, flat = _c === void 0 ? false : _c, _d = props.color, color = _d === void 0 ? exports.Colors.THEME : _d, _e = props.fullHeight, fullHeight = _e === void 0 ? false : _e, _f = props.shadow, shadow = _f === void 0 ? true : _f, _g = props.headerButtons, headerButtons = _g === void 0 ? [] : _g, zIndex = props.zIndex;
|
|
1203
|
+
var _b = props.border, border = _b === void 0 ? false : _b, _c = props.flat, flat = _c === void 0 ? false : _c, _d = props.color, color = _d === void 0 ? exports.Colors.THEME : _d, _e = props.fullHeight, fullHeight = _e === void 0 ? false : _e, _f = props.shadow, shadow = _f === void 0 ? true : _f, _g = props.headerButtons, headerButtons = _g === void 0 ? [] : _g, zIndex = props.zIndex, _h = props.overflow, overflow = _h === void 0 ? { x: exports.BoxOverflow.HIDDEN, y: exports.BoxOverflow.AUTO } : _h;
|
|
1204
1204
|
var getHeaderItems = function (givenChildren) {
|
|
1205
1205
|
var childrenToCheck = React.Children.toArray(givenChildren);
|
|
1206
1206
|
var headerItems = childrenToCheck.filter(function (child) {
|
|
@@ -1263,7 +1263,7 @@ var Card = function (props) {
|
|
|
1263
1263
|
: props.padding
|
|
1264
1264
|
? props.padding
|
|
1265
1265
|
: exports.Sizes.NORMAL,
|
|
1266
|
-
}, className: "dough-card-content", overflow:
|
|
1266
|
+
}, className: "dough-card-content", overflow: overflow, flex: props.fullHeight ? "1 1 auto" : undefined }, contentItems));
|
|
1267
1267
|
}
|
|
1268
1268
|
return React__default.createElement(React__default.Fragment, null);
|
|
1269
1269
|
};
|
|
@@ -5430,12 +5430,12 @@ var Image = function (props) {
|
|
|
5430
5430
|
"dough-image-with-ratio": props.ratio,
|
|
5431
5431
|
"dough-image-viewer-fit-to-view": props.fitToView,
|
|
5432
5432
|
"dough-image-viewer-show-children-on-hover": props.showChildrenOnHover,
|
|
5433
|
-
}), style: __assign({ height: (_a = props.height) !== null && _a !== void 0 ? _a : "initial", width: (_b = props.width) !== null && _b !== void 0 ? _b : "initial" }, (props.ratio
|
|
5433
|
+
}), style: __assign(__assign({ height: (_a = props.height) !== null && _a !== void 0 ? _a : "initial", width: (_b = props.width) !== null && _b !== void 0 ? _b : "initial" }, (props.ratio
|
|
5434
5434
|
? {
|
|
5435
5435
|
paddingTop: (props.ratio.height * 100) /
|
|
5436
5436
|
props.ratio.width + "%",
|
|
5437
5437
|
}
|
|
5438
|
-
: {})) }, props.dataAttributes),
|
|
5438
|
+
: {})), (props.zIndex ? { zIndex: props.zIndex } : {})) }, props.dataAttributes),
|
|
5439
5439
|
React__default.createElement("img", { alt: "", src: props.src, style: {
|
|
5440
5440
|
opacity: props.opacity,
|
|
5441
5441
|
} }),
|